Comments (26)
I need to go through verification with Binance again. I stopped using Binance after it said I need to go through verification again. I need to sort this out to be able to troubleshoot this.
from pycryptobot.
Maybe i found the problem: doing some debug i see in line 191 it try to set variable quote_min by index name MIN_NOTIONAL but dataframe doesn't have that index, instead it return this:
0 PRICE_FILTER 1 LOT_SIZE 2 ICEBERG_PARTS 3 MARKET_LOT_SIZE 4 TRAILING_DELTA 5 PERCENT_PRICE_BY_SIDE 6 NOTIONAL 7 MAX_NUM_ORDERS 8 MAX_NUM_ALGO_ORDERS
pycryptobot/models/AppState.py
Line 191 in bff0c33
You are right about this... I was able to re-create this with a script.
import sys
sys.path.insert(0, ".")
from controllers.PyCryptoBot import PyCryptoBot # noqa: E402
from models.TradingAccount import TradingAccount # noqa: E402
from models.AppState import AppState # noqa: E402
from models.exchange.binance import AuthAPI as BAuthAPI, PublicAPI as BPublicAPI # noqa: E402
app = PyCryptoBot(exchange="binance")
account = TradingAccount(app)
state = AppState(app, account)
state.minimum_order_quote()
And returns this:
Traceback (most recent call last):
File "<removed>/pycryptobot/examples/script-binance_v2.py", line 13, in <module>
state.minimum_order_quote()
File "<removed>/pycryptobot/./models/AppState.py", line 191, in minimum_order_quote
df[df["filterType"] == "MIN_NOTIONAL"][["minNotional"]].values[0][0]
IndexError: index 0 is out of bounds for axis 0 with size 0
Although I'm not getting an error running the bot I can see the error above. I'll fix this and hopefully it fixed it for all of you. Thanks, this helped a lot.
from pycryptobot.
8.0.7 is available now. Docker image is building now. The issue should be fixed.
from pycryptobot.
I have the same. Did you already find a solution?
from pycryptobot.
from pycryptobot.
So far no solution, at least here. It seems that all config is fine, might be something with binance API handling maybe?
from pycryptobot.
update: same config works fine in kucoin
from pycryptobot.
I am having the same issue as well, using the Helm chart on a Kubernetes cluster.
from pycryptobot.
I could provide a temporary API key from a subaccount in Binance for testing? Would that make it easier to investigate and solve?
from pycryptobot.
Maybe i found the problem: doing some debug i see in line 191 it try to set variable quote_min by index name MIN_NOTIONAL but dataframe doesn't have that index, instead it return this:
0 PRICE_FILTER
1 LOT_SIZE
2 ICEBERG_PARTS
3 MARKET_LOT_SIZE
4 TRAILING_DELTA
5 PERCENT_PRICE_BY_SIDE
6 NOTIONAL
7 MAX_NUM_ORDERS
8 MAX_NUM_ALGO_ORDERS
pycryptobot/models/AppState.py
Line 191 in bff0c33
from pycryptobot.
Same problem here. If it helps, the "opentrades" bot runs normally, but I am not able to start a bot manually or trough telegram.
I'll share the JSON from the "opentrades" bots, and the "scanner" bots.
This one WORKS:
{
"botcontrol": {
"status": "active",
"manualsell": false,
"manualbuy": false,
"started": "2023-04-23T16:36:32.134203",
"startmethod": "telegram",
"watchdog_ping": "2023-04-24T07:34:01.420447"
},
"preventlosstriggered": false,
"exchange": "binance",
"margin": "-11.2487%",
"delta": "-45.57",
"price": 2.948,
"df_high": " ",
"from_df_high": " ",
"trailingstoplosstriggered": false,
"change_pcnt_high": 0.0,
"indicators": {
"EMA": true,
"BULL": false,
"MACD": true
},
"signal": "WAIT"
}
This one, DOESN'T work:
{
"botcontrol": {
"status": "active",
"manualsell": false,
"manualbuy": false,
"started": "2023-04-23T23:23:48.310596",
"startmethod": "telegram"
},
"preventlosstriggered": false,
"exchange": "binance",
"margin": "",
"delta": "",
"price": 0.0,
"df_high": " ",
"from_df_high": " ",
"trailingstoplosstriggered": false,
"change_pcnt_high": 0.0
}
from pycryptobot.
Maybe i found the problem: doing some debug i see in line 191 it try to set variable quote_min by index name MIN_NOTIONAL but dataframe doesn't have that index, instead it return this:
0 PRICE_FILTER 1 LOT_SIZE 2 ICEBERG_PARTS 3 MARKET_LOT_SIZE 4 TRAILING_DELTA 5 PERCENT_PRICE_BY_SIDE 6 NOTIONAL 7 MAX_NUM_ORDERS 8 MAX_NUM_ALGO_ORDERS
pycryptobot/models/AppState.py
Line 191 in bff0c33
Thanks, I will take a look.
from pycryptobot.
Guys, can you confirm if this is a Telegram issue or a general issue? I used the config at the top and I don't get an error message when I run the bot on that market for live or test modes. If the issue happens just as the bot starts, I don't get it.
Config:
{
"binance": {
"api_url": "https://api.binance.com",
"config": {
"autorestart": 1,
"base_currency": "SHIB",
"disablebuynearhigh": 1,
"enableinsufficientfundslogging": 1,
"enabletelegrambotcontrol": 1,
"granularity": "15m",
"live": 0,
"nobuynearhighpcnt": 1,
"nosellmaxpcnt": 3,
"nosellminpcnt": -13,
"quote_currency": "BRL",
"selllowerpcnt": -21,
"telegram": 1,
"trailingbuypcnt": 1,
"trailingstoploss": -1,
"trailingstoplosstrigger": 3,
"disablelog": 0,
"use_sell_fee": 1,
"buypercent": 99,
"termwidth": 180,
"termcolor": 1,
"verbose": 0,
"log": 1,
"debug": 0
},
"api_key_file": "binance.key"
},
"telegram": {
"token": "<removed>",
"client_id": "<removed>"
}
}
Running bot like this:
% python3 pycryptobot.py
from pycryptobot.
from pycryptobot.
I believe it's fixed. Doing a release now.
from pycryptobot.
from pycryptobot.
/addnew from telegram - WORKS
/scanner and open bot - WORKS
Thank you!
from pycryptobot.
Found a issue with the new release 8.0.7
The Index 0 is fixed, but now the Telegram Bot don't recognize the active bots. I think that maybe could be the same problem as this one:
from pycryptobot.
In 8.0.7 BOTs are not buying due to "Insufficient Funds":
Bot1 2023-04-25 02:15:00 POLYXUSDT 15m *** Skipping LIVE Buy Order -- Insufficient Funds ***
Manual Buy doesn't work either.
from pycryptobot.
I am still getting indexError when I stopped previous session and set LIMIT sell order.
On lower price levels I tried to start but got IndexError. When I unlock funds from LIMIT order bot works but start where ends. And that's what I don't want.
from pycryptobot.
In 8.0.7 BOTs are not buying due to "Insufficient Funds":
Bot1 2023-04-25 02:15:00 POLYXUSDT 15m *** Skipping LIVE Buy Order -- Insufficient Funds ***
Manual Buy doesn't work either.
This may sound like a thick question, but I have to ask. You definitely have sufficient funds? E.g., at least 10 of the quote currently (as a guide)
from pycryptobot.
This week is super busy for me but I'll take a look next week. If anyone can help narrow down the problem, that would help. For example, is it Binance only? Is it Docker or CLI or both? Is it happening with the Telegram bot only or both?, If you can provide more info to help me recreate what you are seeing that would help. If you can provide your config.json and the way you are running your bots that would help as well.
from pycryptobot.
In 8.0.7 BOTs are not buying due to "Insufficient Funds":
Bot1 2023-04-25 02:15:00 POLYXUSDT 15m *** Skipping LIVE Buy Order -- Insufficient Funds ***
Manual Buy doesn't work either.This may sound like a thick question, but I have to ask. You definitely have sufficient funds? E.g., at least 10 of the quote currently (as a guide)
Hi Michael, it was solved in the Chat. Another guy told me to ser "buymaxsize". I did it and problem solved!
from pycryptobot.
This week is super busy for me but I'll take a look next week. If anyone can help narrow down the problem, that would help. For example, is it Binance only? Is it Docker or CLI or both? Is it happening with the Telegram bot only or both?, If you can provide more info to help me recreate what you are seeing that would help. If you can provide your config.json and the way you are running your bots that would help as well.
I tried only on Binance. Without Telegram or Docker/Kubernetes, running in shell through python3 ./pycryptobot.py --logfile cryptobot-BTCUSDT.log --market BTCUSDT --granularity 3600
Issue is occured when:
- 1st bot run - success
- Stop bot
- Previously bought funds by bot are locked in LIMIT order
- 2nd bot run - fail
- Unlock funds
- Bot run - success and started where ends
from pycryptobot.
I'm getting same "*** Skipping LIVE Buy Order -- Insufficient Funds ***" message. There is definitely a bug. I'm troubleshooting it and just waiting for the next buy signal to see what happens.
from pycryptobot.
Fixed for me in 8.0.9. Give it a try and let me know.
from pycryptobot.
Related Issues (20)
- V7.0.28 The bot crashes with an error in the simulation if you enable the setting "smartswitch": 1 HOT 1
- UnboundLocalError("local variable 'trading_data' referenced before assignment") HOT 4
- BadRequest error when using the /stats command HOT 5
- No bots running after scanner process is complete HOT 5
- Bot HOT 1
- Issue with restart HOT 2
- 8.0.2 kucoin granularity causes failure HOT 1
- TypeError("'>' not supported between instances of 'NoneType' and 'int'") HOT 3
- IndexError('index 0 is out of bounds for axis 0 with size 0') after restart HOT 3
- Run tests using config files HOT 2
- Preventloss does not work with declining market HOT 1
- trading account.py uses the same critical error message for both Coinbase and coinbasepro. HOT 1
- Gihub Actions "container.yml" failing, build locally works! HOT 5
- Issue with Coinbase API grabbing Quote Currency HOT 1
- Market not found when using Binance sub accounts
- FutureWarning in AppState.py stops the bot
- Cleanup non issue
- Insufficient Quote Funds HOT 2
- Missing contributing guidelines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycryptobot.