HuobiRDCenter / huobi_Python

Python SDK for Huobi Spot API
https://huobiapi.github.io/docs/spot/v1/en
Apache License 2.0
680 stars 332 forks source link

Noobie doubt #144

Open zetag33 opened 7 months ago

zetag33 commented 7 months ago

I'm trying to place an order like this:

trade_client = TradeClient(api_key=acces_key, secret_key=secret_key) order_id = trade_client.create_order(symbol=symbol, account_id=*****, order_type=OrderType.BUY_MARKET, source=OrderSource.API, amount=volume, price=price)

and i'm getting this error: raise HuobiApiException(HuobiApiException.EXEC_ERROR, huobi.exception.huobi_api_exception.HuobiApiException: ('ExecuteError', '[Executing] account-get-accounts-inexistent-error: account for type ********* and user id ********* does not exist')

The account_id is an integer that I have taken from my huobi account profile that appears as UID under the email of the account. It's a 9 digit number and as said its displayed on your profile in the huobi webpage. I'm entering the account_id without errors and as an integer, I have created the account today and verified it, I keep getting the error, does anyone know how could I solve it?

Thanks in advance.

131093 commented 2 months ago

Please confirm your are using the corresponding id from GET /v1/account/accounts on parameter account-id when placing the order https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b291-7773-11ed-9966-0242ac110003