Posted on Leave a comment

Huobi Rest Api V2 0

This endpoint places an order to apply for a margin loan. Before a conditional order triggering, it can be queried out through this endpoint instead of any endpoint in “Trading” section. • User has to make sure the corresponding account has sufficient fund for triggering this conditional order, otherwise it would cause conditional order triggering failure. If the order price is greater than the highest buy price in the market, the order will be accepted. If the order price is less than or equal to the highest buy price in the market, the order will be rejected. This endpoint places a new order and sends to the exchange to be matched. The full chain name list for all currencies can be retrieved from endpoint GET /v2/reference/currencies.

  • The return data from Cancel An Order Interface only means that order cancelation designation is executed successfully.
  • Query the order status by swap-api/v1/swap_order_info.If the status is 10,the order is failed。
  • Then, you will received messages when there is any update in the subcribed topics.
  • This endpoint allows user to transfer asset between parent and sub account.
  • Before you use API, you need to login the website to create API Key with proper permissions.

Please note that the prohibition from placing orders will cause no effect on order cancellation via API as well as order placement and cancellation via other terminals. We’ll keep you notified on each prohibition via SMS and email. Update when either account balance changed or available balance changed. It will return “too many connection” when the limit is exceeded. Once the Websocket connection is established, Huobi server will periodically send “ping” message at 20s interval, with an integer inside. 4) While there is nothing change between two snapshots in past 100ms, the 150 levels incremental MBP feed still sends out a message which contains two blank objects – bids & asks. This topic sends the latest market by price order book in snapshot mode at 1-second interval.

Subscribe Contract Info No Authentication(sub)

If the user fills in the start-time but does not fill in the end-time parameter, the server will return the historical order from near to far [start-time + 48 hours, start-time]. If an order is created via API, then it’s no longer queryable after being cancelled for 2 hours. Via this endpoint parent user is able to query account list of sub user by specifying a UID.

Singapore to Become Regional Headquarters of Huobi – Global Village space

Singapore to Become Regional Headquarters of Huobi.

Posted: Tue, 07 Dec 2021 19:10:01 GMT [source]

Orderbook will be pushed if orderbook is updated whenever incremental or snapshot. Connect all parameters with ’&’ according to the sequence above. For the Trade WebSocket interface, crypto exchange connectors development server have to do authentication for topics require authentication before making connection. Please note that the WS request connection should not go over 30 normally.

Submit Cancel For Multiple Orders By Ids

This link will take you to a page where you can request that Huobi create a CSV file of your complete transaction data. All you need to do is fill out the form letting Huobi know why you want the data, what data you’d like included and what date range to include. You’ll also need to verify your account with ID to make this request. The lack of export capability on Huobi is bearable for those who don’t trade regularly. However, for investors with old Huobi accounts or investors with hundreds of transactions, manually adding all this information is tedious to say the least! There is no way to export this data, so you’ll need to add deposit, withdrawal, conversion and other history manually in Koinly or create your own CSV file to import.

huobi price api

If it is an order-related issue, use the API order query interface swap-api/ v1/swap_order_info to keep the complete log returned and provide your UID and order number. Calling the “Get Contract Index Price Information” interface (/swap-api/v1/swap_index), the returned “index_price” will be the latest index price.

When the “risk_rate” is less than or equal to 0, the position will be liquidated. For the “order_id” with 18 bits, the “JSON.parse” in “nodejs” and “javascript” will be “int” by default, and mistakes will occur when analyzing. It’s recommended to use a AWS Tokyo c-zone server and the domain name “api.hbdm.vn” to connect to the system. Status 2 is the sequential submission of internal process, which can be considered that it has been accepted by the system. Status 3 indicated that the order has been already submitted to market.

Get Sub User’s List

The success return of order cancellation or placement only represents that the command is excuted successfully and doesn’t mean that the order has been cancelled . You can check the order status through the interface option-api/v1/option_order_info. After the subscription is successful, when the contract information changes, the latest contract information will be pushed. When multiple fields changes simultaneously, only the latest contract information will be pushed, and the event is update. When clients choose merged depth data, WebSocket server will only display the merged price within price steps in order book. Please note that the merged depth price will not make any change on the actual order price. To apply/change API key, please go to “Account-API Management” on Huobi Swap.

huobi price api

Created_at should use timestamp of long type as 13 bits , if send the accurate timestamp for “created_at”, query performance will be improved. This interface only supports users to query data for the last 90 days. Only return data for activated contract sub-account (i.e. sub-accounts that have gained contract trading permission). When enable the transaction authority on the sub-account for the first time, deemed to agree to access the contract market. When the “settlement_type” is “delivery”, the “estimated_settlement_price” will be calculated and updated from 10 minutes before settlement and until the delivery.

This endpoint returns the balance of the margin loan account. Isolated/cross margin loan APIs provide loan related functionality such as requesting and repaying loan, loan querying and transfer. 3) As advanced conditional order, trailing stop order does support additional triggering condition i.e. trailing rate.

Coin Marketplace

The records of cancelled and unfilled limit orders are only kept for 24 hours. Lightning close means that the order can be filled instantly at the price within BBO-Optimal30, and the unfilled part will be converted to a limit order automatically. If there is “contract_code” parameter, canceling all contracts under this code. Futures and Coin-margined Swaps are using seperate API rate limits.

So the number over 18 bits need be parsed by json-bigint package. Settlement_time for this term is the start time of the settlement.

The current CoinMarketCap ranking is #72, with a live market cap of $1,570,669,237 USD. It has a circulating supply of 159,308,566 HT coins and a max. When the symbol is USDT, the return parameter only presents the transfer permission of USDT asset, and the permission for opening/closing positions or cancelling orders could be ignored. If all input parameters are not filled, query all contracts info under the USDT trading zone by default. If contract_code is filled, query according to contract_code first. For restful interfaces:all products 800 times/second for one IP at most The rate limit for “req” request is 50 times/s at most. No limit for “sub” request as the data will be pushed by server voluntarily.

Add Periodical Push Of Websocket Subscription Of Position: Every 5s

Only those endpoints marked with rate limit value separately are applied with new rate limit rule. It is suggested to connect to domain api-aws.huobi.pro if your server is based on AWS, because this domain is optimized for AWS client, the latency will be lower.

You can use our API to access all market data, trading, and account management endpoints. Query history orders interface can only query the API order cancellation information within the last 2 hours. Only return data of sub-accounts that have agreed to access the contract market.

API Explorer allows user to invoke and observe each API request and response without writing any program. The UI is designed as the same as document, which has input parameters and response description, user can use it easily without any additional user guide.

Huobiservices.py contains all the functions that allow for interaction with the exchange functionality. Utils.py contains the required code to perform the API requests. In this file the API ACCESS_KEY and SECRET_KEY are set. Any time you trade crypto for crypto, buy crypto with fiat or sell crypto for fiat, this is an exchange.

Get Sub User’s Status

Our goal is to create an order which will rest in the book for a certain amount of time before the algo cancels it. In the case when you don’t have open orders, the server will respond with specially formatted ExecutionReport. So we will “feed” all market data events into our simple book. This way we can be sure that we have an accurate picture of what is going on in a market . Huobi Global is a Singapore based cryptocurrency exchange founded in 2013. With daily volumes of around $2 billion per day, Huobi Global is an extremely liquid exchange for multiple crypto trading pairs including BTC, ETH, LTC, XRP, and more. As of January 2020, it has around 400 verified markets and about 25 unverified markets.

For each ticker that matches and is of the type trade, their balance is taken and added to the balances dict. This Huobi Spot API has updated features for version 2.0 that include the ability to allow a sub user to make a deposit, an added account ledger query and others. Huobi is Requirements engineering a Chinese BitCoin and cryptocurrency online digital asset exchange for BTC, ETH, XRP, LTC, HUSD, LINK and more. When querying order cancellation data from Order Details Acquisition interface, if there are parameters created_at and order_type, only 90 days data can be queried.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.