Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

InsufficientFunds error placing Sell order despite enough Binance balance #31

Open
cantami opened this issue Jul 25, 2022 · 2 comments
Open

Comments

@cantami
Copy link

cantami commented Jul 25, 2022

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.

Screenshots
image

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.

@tudorelu
Copy link
Owner

tudorelu commented Aug 2, 2022

For what amount are the orders placed? Perhaps there's a bug with the trade amount allocation and it each trade places is worth 500 euro.

@cantami
Copy link
Author

cantami commented Aug 2, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants