kraken-dca
kraken-dca copied to clipboard
DCA doesn't work when allocating (part of) funds to earn
Example Situation
- User buys 10USDT daily in BTC using USDT in the spot wallet
- This works fine for weeks
- User opts-in to opt-in rewards
- DCA stops working
Error details
- Pair balances are no longer extracted (shown as 0), even though funds are in the spot wallet
- Value error indicating insuffucient funds is thrown
There are funds in the spot wallet, yet with Earn active the bot stops working. As soon as I opt-out of earn all together, the bot starts working again.
Detailed error code:
2024-10-17 08:00:02,397 - INFO:krakendca.dca: Pair balances: 0.0 USDT, 0.0 XETH. Traceback (most recent call last): File "__main__.py", line 23, in <module> kdca.handle_pairs_dca() File "/app/krakendca/krakendca.py", line 75, in handle_pairs_dca dca.handle_dca_logic() File "/app/krakendca/dca.py", line 89, in handle_dca_logic self.check_account_balance() File "/app/krakendca/dca.py", line 194, in check_account_balance raise ValueError( ValueError: Insufficient funds to buy 6.0 USDT of XETH