Home > database >  Kucoin API wallet balance
Kucoin API wallet balance

Time:11-08

I am trying to check my Spot account balance using the Kucoin API, get_accounts().(Github: Link) And although on github and API documentation get_accounts specifies 2 optional arguments, when I pass any args I get an error. (client.get_accounts(currency='USDT') does not work either)

Am I doing something wrong? / Is there a better way to check my spot wallet balance for a specific coin?

from kucoin.client import Client
import config_ku

client = Client(config_ku.API_KEY, config_ku.API_SECRET, config_ku.API_PASSPHRASE)
results = client.get_accounts('USDT')
print(results) 

Error:

Traceback (most recent call last):
  File "c:\Users\Ajitesh Singh Thakur\Documents\Visual Studio Code\kucoin\test2.py", line 5, in <module>       
    results = client.get_accounts('USDT')
TypeError: get_accounts() takes 1 positional argument but 2 were given

CodePudding user response:

I uninstalled the package and installed it again and now it works. Thanks all.

  • Related