Huobi Global is going to include “time” filter in existing historical order querying endpoint in REST API –-GET /v1/order/orders

Dear API users,

Currently, existing REST endpoint “GET /v1/order/orders” supports historical order querying based on user defined “start-date” & “end-date”.

Since the effective day of this notification, following new fields will be added into existing REST endpoint “GET /v1/order/orders” –
1) start-time
2) end-time

Upon user defined “start-time” AND/OR “end-time”, Huobi server will revert back historical orders whose order creation time falling into the period. The maximum time span between “start-time” and “end-time” is 2-hour. Farthest order searchable should be within recent 180 days.

In case either “start-time” or “end-time” is defined, Huobi server will ignore “start-date” and “end-date” regardless they were filled or not.

If user does neither define “start-time” nor “end-time”, but “start-date”/”end-date”, the order searching will be based on defined “date range”, as usual.

If user does not define either of “start-time”/”end-time”/”start-date”/”end-date”, by default Huobi server will treat current time as “end-time”, and then revert back historical orders within recent 48 hours.

Huobi Global suggests API users to search historical orders based on “time” filter instead of “date”. In the near future, Huobi Global would remove “start-date”/”end-date” fields from the endpoint, through another notification.

Effective Date: February 6, 2020 (GMT+8)
All the changes will be updated on https://huobiapi.github.io/docs/spot/v1/en/

Huobi Global
February 7, 2020

The following are change details:

REST API – Search Past Orders

GET /v1/order/orders (API Key Permission: Read)

 Request Parameters

ParameterData TypeRequiredDefaultDescriptionValue Range
symbolstringtrueNAThe trading symbolAll supported trading symbols, e.g. btcusdt, bccbtc
typesstringfalseNAOne or more types of order to include in the search, use comma to separate.buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-stop-limit, sell-stop-limit
start-timestringfalse-48hSearch starts time, UTC time in millisecondValue range [((end-time) – 48h), (end-time)], maximum query window size is 48 hours, query window shift should be within past 180 days, query window shift should be within past 24 hours for cancelled order (state = "canceled")
end-timestringfalsepresentSearch ends time, UTC time in millisecondValue range [(present-179d), present], maximum query window size is 48 hours, query window shift should be within past 180 days, queriable range should be within past 24 hours for cancelled order (state = "canceled")
start-datestringfalse-1dSearch starts date, in format yyyy-mm-ddValue range [((end-date) – 1), (end-date)], maximum query window size is 2 days, query window shift should be within past 180 days, query window shift should be within past 1 day for cancelled order (state = "canceled")
end-datestringfalsetodaySearch ends date, in format yyyy-mm-ddValue range [(today-179), today], maximum query window size is 2 days, query window shift should be within past 180 days, queriable range should be within past 1 day for cancelled order (state = "canceled")
statesstringtrueNAOne or more states of order to include in the search, use comma to separate.submitted, partial-filled, partial-canceled, filled, canceled, created
fromstringfalseNASearch order id to begin withNA
directstringfalsebothSearch direction when 'from' is usednext, prev
sizeintfalse100The number of orders to return[1, 100]

Response Content

FieldData TypeDescription
idintegerOrder id
account-idintegerAccount id
user-idintegerUser id
amountstringThe amount of base currency in this order
symbolstringThe trading symbol to trade, e.g. btcusdt, bccbtc
pricestringThe limit price of limit order
created-atintThe timestamp in milliseconds when the order was created
canceled-atintThe timestamp in milliseconds when the order was canceled, or 0 if not canceled
finished-atintThe timestamp in milliseconds when the order was finished, or 0 if not finished
typestringThe order type, possible values are: buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-limit-maker, sell-limit-maker, buy-stop-limit, sell-stop-limit
filled-amountstringThe amount which has been filled
filled-cash-amountstringThe filled total in quote currency
filled-feesstringTransaction fee paid so far
sourcestringThe source where the order was triggered, possible values: sys, web, api, app
statestringcreated, submitted, partial-filled, filled, canceled, partial-canceled
exchangestringInternal data
batchstringInternal data
stop-pricestringtrigger price of stop limit order
operatorstringoperation character of stop price