InsufficientFunds error placing Sell order despite enough Binance balance #31
Description
Describe the bug
Even though my Binance balance is 1000 EUR, InsufficientFunds error is raised when bot_config has starting_balance = 500 and initial_entry_allocation = 20. However, when I try with starting_balance = 100 and initial_entry_allocation = 20 no error appears.
It is important to mention that the error shows up when the bot is trying to place the Sell order.
To Reproduce
Set bot_config to the following, ensure you have more than 500 EUR in your Binance balance. Then run defineBot() and executeBot().
bot_config = {
'name': 'bot0',
'test_run': False,
'exchange': exchange_binance,
'symbols': ['BTC/EUR', 'ETH/EUR', 'ADA/EUR'],
'starting_balance': 500.00,
'strategy': {
'class': BBRSIStrategy,
'params': {
'bb_len': 20,
'n_std': 2.0,
'rsi_len': 14,
'rsi_overbought': 60,
'rsi_oversold': 40,
}
},
'timeframe': '5m',
'entry_settings': {
'initial_entry_allocation': 20,
'signal_distance': 0.1
},
'exit_settings': {
'take_profit': 2,
'stop_loss_value': 1
},
'display_status': True
}
Expected behavior
InsufficientFunds error should not be raised when the Binance balance is greater than the starting_balance.
Desktop (please complete the following information):
- OS: Windows 10
- Browser: N/A
- Version: pyjuque 0.1.1.9
Additional context
Typically it happens placing the second Sell order, but occasionally it happened during the first Sell order.