Skip to content
Advertisement

fetch_balance method in ccxt won’t return all assets

As I call the fetch_balance method from kucoinfutures in ccxt, it only returns BTC, not any other assets. Shouldn’t there be other assets like USDT or ETH too?

Here’s the python code:

JavaScript

Here’s what I get from print(balance):

JavaScript

Am I missing something?

Advertisement

Answer

It seems like fetchBalance only returns one currency at a time. To get USDT as the asset to be returned, you must pass the param currency via params currently using the exchange-specific currency id.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement