kucoin-python-sdk
kucoin-python-sdk copied to clipboard
account not exist
I am trying to do
acc = client.get_account('XXX')
where XXX is my 8 digit account UID. When i do this i get: Exception: 200-{"code":"230008","msg":"account not exist"}
Should I not be using UID for this?
I am trying to do
acc = client.get_account('XXX')
where XXX is my 8 digit account UID. When i do this i get: Exception: 200-{"code":"230008","msg":"account not exist"}
Should I not be using UID for this?
GET /api/v1/accounts
This value is the id
of the data returned by this endpoint
refer to: https://docs.kucoin.com/#list-accounts
example:
[
{
"id": "5bd6e9286d99522a52e458de", //accountId
"currency": "BTC", //Currency
"type": "main", //Account type, including main and trade
"balance": "237582.04299", //Total assets of a currency
"available": "237582.032", //Available assets of a currency
"holds": "0.01099" //Hold assets of a currency
},
{
"id": "5bd6e9216d99522a52e458d6",
"currency": "BTC",
"type": "trade",
"balance": "1234356",
"available": "1234356",
"holds": "0"
}]
I had the same issue understanding what means "accountId"
Each currency you hold in your main/trading/margin Kucoin account has its own "accountId"
You can get them using client.get_accounts()
This will return you a list of dict, where each dict is one of your currencies actually held, its accountId, its quantity, account type etc
Be carreful to call get_accounts with an 's' and not get_account
Due to many changes in the SDK, please refer to our latest documentation. https://www.kucoin.com/docs/beginners/introduction Since this issue has had no updates for a long time, we will now close it. Please try updating to the latest version of the SDK and modify your code to try again. If you encounter any issues, feel free to provide feedback.