Closed Mehdi-Verfaillie closed 1 year ago
Hi, looks like the endpoint configuration is correct. The API expects something like this:
GET /api/v5/account/subaccount/balances?subAcct=test1
https://www.okx.com/docs-v5/en/#rest-api-subaccount-get-sub-account-trading-balance
Which is what the request correctly builds: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L733-L735
Near the end of the api docs for that endpoint, it does state:
"" will be returned for inapplicable fields with the current account level.
I'll ask OKX what that means, using your issue here as context.
OKX comments are that this is expected since some of the fields are special to the account level. Account level refers to the account mode level (e.g. simple/single/multi/portfolio). You can see it via this endpoint "acctLv": https://www.okx.com/docs-v5/en/#rest-api-account-get-account-configuration https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L560
Since this is more a question about their API behaviour, if you have further questions I recommend reaching out in their API group on telegram: https://t.me/OKXAPI
Let me know if you run into any issues with this SDK though. Thanks
Good evening @tiagosiebler,
I encounter a problem with the function
getSubAccountBalances
but I have no idea to what this issue is related to.returns an empty
details
arrayI expect to actually get the amount in here:
Did I miss something on the OKX documentation ?
Thanks you~
okx-api: 1.0.2