question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Huobi fututres balance

See original GitHub issue

Trying to get huobi futures balance. I have dollars in account, but ccxt doesnt see them

huobi_futures = ccxt.huobipro({
    "apiKey": config.HUOBI_API_KEY,
    "secret": config.HUOBI_SECRET_KEY,
    "options" : {'createMarketBuyOrderRequiresPrice' : False, 'defaultType': 'future'}
})
balance = huobi_futures.fetch_balance()["USDT"]
print(balance)

Shows

{'free': 0.0, 'used': 0.0, 'total': 0.0}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KindSpideycommented, May 15, 2022

It helped. Thank you very much!

0reactions
kroitorcommented, May 15, 2022

@KindSpidey let me know if this does not help:

huobi_futures = ccxt.huobi({
    "apiKey": config.HUOBI_API_KEY,
    "secret": config.HUOBI_SECRET_KEY,
    "options" : {
        'createMarketBuyOrderRequiresPrice' : False,
        'defaultType': 'swap',
        "defaultSubType":'linear',
        'marginMode': 'cross',
    }
})
balance = huobi_futures.fetch_balance()
print(balance)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Huobi USDT Margined Perpetual Insurance Fund Balance ...
Get the funding rate history, funding interval, and funding balance of USDT margined perpetual futures from Huobi.
Read more >
Huobi Futures Insurance Fund Balance History
Get the funding rate history, funding interval, and funding balance of futures contracts from Huobi.
Read more >
Huobi Coin-Margined Perpetual Insurance Fund Balance ...
Get the funding rate history, funding interval, and funding balance of coin-margined perpetual futures from Huobi.
Read more >
Huobi Coin-Margined Delivery Insurance Fund Balance History
Get the funding rate history, funding interval, and funding balance of coin-marigned delivery futures from Huobi.
Read more >
Huobi Futures Operation Guide (APP)
Currently only supports the exchange between "exchange" and "futures accounts". ... Click "Balances" in the right bottom corner, choose "Contract Account ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found