gateio / gateapi-python

250 stars 92 forks source link

[Question] How to list main spot account balances? #48

Closed discosultan closed 3 years ago

discosultan commented 3 years ago

From the API, I found the following method for listing sub-account balances: https://github.com/gateio/gateapi-python/blob/b559a15386b412d815fe3808a3e6c04e337952ee/gate_api/api/wallet_api.py#L853. I am not using sub-accounts and it returns an empty list for me.

I also tried the websocket API described here: https://www.gate.io/docs/apiv4/ws/index.html#client-subscription-9. This one only seems to deliver updates to balances, but cannot provide current snapshot of all balances.

How to list balances for main spot account? Should I use v2 REST API instead?

revilwang commented 3 years ago

Use this one https://github.com/gateio/gateapi-python/blob/master/docs/SpotApi.md#list_spot_accounts

discosultan commented 3 years ago

Thanks @revilwang, totally missed this one!

acairon commented 3 years ago

its possible to get all in one query? or i need to changue currency variable?

revilwang commented 3 years ago

Currency is optional. Omitting it returns all currencies

acairon commented 3 years ago

whit this https://github.com/gateio/gateapi-python/blob/master/docs/SpotApi.md#list_spot_accounts give me empty list , or only returns that i have

revilwang commented 3 years ago

Currencies that you have deposited