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.

huobipro fetchOpenOrders: consider using different endpoints depends on whether symbol param is present

See original GitHub issue
  • OS: MacOS 10.14.5
  • Programming Language version: Nodejs 10.15.3
  • CCXT version: 1.18.829
  • Exchange: huobipro
  • Method: fetchOpenOrders

Suggestion:

  • Use v1/order/openOrders if symbol parameter is present.
  • If not, there’s a way to get open orders of all symbols using v1/order/orders?states=submitted,partial-filled,created. The documentation says the endpoint will be deprecated, but their website is currently using it anyway

This is the request URL comes from their website querying for open orders https://www.hbg.com/-/x/pro/v1/order/orders?states=submitted,partial-filled,created&size=11 (I guess the APIs they’re using are the same except the https://www.hbg.com/-/x/pro/v1/ part)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lostless13commented, Feb 18, 2020

The “fetchOpenOrdersV1” method in the huobipro class that calls is the “order/orders” api endpoint is returning the following error from huobi for me when no symbol is provided:

ExchangeError: huobipro {"status":"error","err-code":"require-symbol","err-msg":"Parameter `symbol` is required.","data":null}

Looking through the docs they too seem to reflect requiring the symbol field on the order/orders endpoint now. image

Unless I’m missing something in the docs, there is not a method that returns all open orders as far as I can tell.

1reaction
kroitorcommented, Jun 29, 2019

We have reverted the defaults and the called endpoints to how they were before adding this change and we have added two options:

exchange = ccxt.huobipro ({
    
    # this option is for open orders only
    'fetchOpenOrdersMethod': 'fetch_open_orders_v1',  # or 'fetch_open_orders_v2'
    
    # this option is for all v1 orders
    'fetchOrdersByStatedMethod': 'private_get_order_orders',  # or 'private_get_order_history'
})

The fetchOpenOrdersV1 method is the default and it will use the privateGetOrderOrders endpoint by default.

Related: #5376.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exchanges — ccxt 2.4.71 documentation
symbols : A non-associative array (a list) of symbols available with an exchange, ... Some exchanges may have varying rate limits for different...
Read more >
Change Log – Huobi API Reference v1.0 - GitHub Pages
Release Time (UTC +8) API New / Update 2022.06.24 POST /v2/sub‑user/api‑key‑generation update 2022.06.17 POST /v1/dw/withdraw/api/create update 2022.01.21 GET v1/common/symbols , GET v1/common/currencys Update
Read more >
CCXT | PDF | Java Script | Software - Scribd
The ccxt library currently supports the following cryptocurrency exchange markets and trading APIs: country / region logo id name ver doc . ....
Read more >
Binance Actual Exchange Site Bitfinex Pc – Astangaayurvedcenter
Play Video. Bitfinex, the controversy-ridden cryptocurrency exchange, announced its collaboration with a hybrid Ethereum-based trading platform, Ethfinex, to ...
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