Huobi API returns 0 on swap balance

60 Views Asked by At

I`m writing a trading bot on golang. I have an account on HTX Exchange, and have an API key to trade automatically. I transferred 180$ to my futures account to trade. Trying to get my balance from Huobi futures, but it returns 0 for all tokens.

Base URL:

https://api.hbdm.com

Tried to use endpoints:

/swap-api/v1/swap_account_info

and

/swap-api/v1/swap_balance_valuation

All currencies returns 0. No errors.

My API key was bind to my account, right? How to retrieve my balance on futures with API?

1

There are 1 best solutions below

0
CupaState On

To retrieve a balance from futures you have to make a POST request to endpoint:

/linear-swap-api/v1/swap_cross_account_info

with parameter:

margin_account: USDT