While the ideal scenario is to use one wallet per bot, it’s not that easy to have multiple wallets in one exchange account. Some exchanges might give you free access to sub-accounts (for example bybit and kucoin) so you can assign different sub-accounts per bot (although there is maximum number of sub-accounts you can create, so if you have plenty of bots, you might face the same situation), while others either have no such feature or offer it to certain level of users (for example binance offer sub-account feature only for selected tier levels) which means you have to use one wallet for multiple bots.
Is it possible to have multiple bots using one same wallet? Yes it’s possible. You just need to make sure that you are setting each bots’ balance using available_capital
instead of tradable_balance_ratio
. How much you give to each bots is up to your judgement and understanding of your bots.
For example, I have 1000 USDT in my wallet and I have 20 bots. I can have multiple options on how I split the money. For example:
- I can split the money equally, which means each bots get 50 USDT. I will do this if I want to have the best risk management approach, or if you predict/designed the strategies as such that there would be times that all the bots are actively trading at same times, for example at times when BTC is dumping
- I can also give each bots bigger money, for example 100 USDT. I will use this option if I know that the chance of all of my bots to open trades at the same time is very low. I won’t have the issue of some bots unable to open trades because I have no more money in the wallet.
Apart from splitting the money, there are specific possible issues you need to be aware of for each markets
Spot Market
If you are going to use multiple bots in a single spot wallet, the only thing you need to be worried is how the trading fee is being charged to you. You might wonder how the fee can cause issue. Let me give a simple example
Let’s say I have 100 USDT. I want to buy DOGEUSDT pair at rate of $1. How much amount of DOGE will I get? If your answer is 100 DOGE, then you might be right or wrong depending on how much money I actually have in the wallet. Lets’s say the trading fee is fixed at 0.1%, which means for the buy order of 100 USDT, I will need to pay trading fee of 0.1 USDT.
- If I have more money in my wallet, let’s say I have 200 USDT, then the fee will be taken from the extra money I have, so if the buy order filled, I will have 100 DOGE and 99.9 USDT
- But if I have exactly 100 USDT in my wallet, then the fee will be taken from the bot’s money, which means when the buy order filled, I will have only 99.9 DOGE.
Let’s apply the concept above on a scenario if I have multiple bots. Let’s say I have I have 300 USDT and I split the money equally on 3 bots.
- Bot #1 buy 100 USDT worth of DOGE. Because I have more money in the wallet, buy fee is taken from the spare money. After the buy order filled, my wallet will consist of 100 DOGE and 199.9 USDT.
- Bot #2 want to buy another 100 USDT worth of DOGE. Similar to bot #1, because I have more money in the wallet, the trading fee is taken from it, which means after buy order #2 is filled, my wallet will have 200 DOGE AND 99.8 USDT
- When bot #3 want to open a trade, the bot will assume that it has the same 100 USDT, but in reality, only 99.8 USDT is left in the wallet. Let’s assume that bot #3 can still open a buy order. Because now you have no extra money in the wallet, the buy fee is taken from the available money, which means bot #3 only able to buy 99.7002 DOGE. So in the end, your wallet will have 299.7002 DOGE and zero USDT.
But where is the issue, you might ask. First issue is the fact that bot #3 is trading less than max, so the profit would be smaller than what it would be if it has the full 100 USDT. Second issue will come when it’s time to sell.
Let’s move to the point where all three bots want to sell their DOGE. The same rule about buy fee will be applied to sell fee as well.
- Bot #1 sell 100 DOGE. Fee of 0.1 DOGE is taken from the wallet. 199.6002 DOGE left.
- Bot #2 sell 100 DOGE. Fee of 0.1 DOGE is taken from wallet. 99.5002 DOGE left.
- Bot #3 try to sell its 99.7002 DOGE, but it find that the amount in wallet (99.5002) is smaller than that. It will fail to sell its DOGE. You will have to sell it manually.
The best ways to avoid the issue above is to either allocate spare money in the wallet to be used for fee, or to use the exchange’s fee-paying coin to pay for the fee, for example BNB for binance and KCS for kucoin. You will need to manually buy the fee-paying coin when the amount is low because the bot won’t be able to buy it itself.
Futures Market
For futures, the trading fees issue still exist, but only for the entry fee. For the exit fee issue, the fee will be taken from your wallet after the exit order filled, so you won’t have failed exit attempt that exist in the spot market.
The possible fatal issue is when two or several bots are trading in different directions, for example one bot opening long position, and one bot opening short position. While both bots won’t have issue entering their respective trades, both of them would have problem exiting the trades. The cause is that for exit order, reduce only
option is set to true
. Let me explain this with a simple example.
Bot A open a long trade for 0.03 BTC/USDT:USDT. In the wallet, it’s recorded that you have 0.03 BTC/USDT:USDT. 1 candle later, bot B open a short trade for 0.03 BTC/USDT:USDT. In the wallet, it’s recorded that you have zero BTC/USDT:USDT. The issue come when either one of them want to exit their trade
- When bot A want to exit their trade, that means they need to sell 0.03 BTC/USDT:USDT. The issue is that if they open a sell order of 0.03 BTC/USDT:USDT and it got filled, your wallet balance will be less than zero, and it’s not allowed since it has
reduce only
set totrue
. Bot A will fail to exit their trade. - When bot B want to exit their trade, that means they need to buy 0.03 BTC/USDT:USDT. The issue is that if they open a buy order of 0.03 BTC/USDT:USDT and it got filled, your wallet balance will be more than zero, and it’s not allowed since it has
reduce only
set totrue
. Bot B will fail to exit their trade.
So if you want to use multiple bots on a single futures wallet, it’s extremely important to make sure that they will never open trades with opposite directions at any point of time.
[…] Multiple bots using one wallet […]