Skip to navigation

Get order history 7 days

Get completed orders which are placed in the last 7 days, including those placed 7 days ago but completed in the last 7 days. The incomplete orders that have been canceled are only reserved for 2 hours.

Authentication

OK-ACCESS-KEYstring
Your API key.
OK-ACCESS-SIGNstring

Base64-encoded HMAC-SHA256 signature of the prehash string.

OK-ACCESS-TIMESTAMPstring

ISO 8601 UTC timestamp, e.g. 2020-12-08T09:08:57.715Z.

OK-ACCESS-PASSPHRASEstring
The passphrase you set when creating the API key.

Query parameters

instTypeenumRequired

Instrument type SPOT MARGIN SWAP FUTURES OPTION EVENTS

Allowed values:
ulystringOptional

Underlying. Applicable to FUTURES/SWAP/OPTION.

instFamilystringOptional

Instrument family Applicable to FUTURES/SWAP/OPTION

instIdstringOptional

Instrument ID, e.g. BTC-USDT

ordTypestringOptional

Order type market: market order limit: limit order post_only: Post-only order fok: Fill-or-kill order ioc: Immediate-or-cancel order optimal_limit_ioc: Market order with immediate-or-cancel order mmp: Market Maker Protection (only applicable to Option in Portfolio Margin mode) mmp_and_post_only: Market Maker Protection and Post-only order(only applicable to Option in Portfolio Margin mode) op_fok: Simple options (fok) rpi: Retail Price Improvement order elp: Enhanced Liquidity Program order (Deprecated; use rpi. Accepted until October 31, 2026.)

stateenumOptional

State canceled filled mmp_canceled: Order canceled automatically due to Market Maker Protection

Allowed values:
afterstringOptional

Pagination of data to return records earlier than the requested ordId

beforestringOptional

Pagination of data to return records newer than the requested ordId

beginstringOptional

Filter with a begin timestamp cTime. Unix timestamp format in milliseconds, e.g. 1597026383085

endstringOptional

Filter with an end timestamp cTime. Unix timestamp format in milliseconds, e.g. 1597026383085

limitstringOptional

Number of results per request. The maximum is 100; The default is 100

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional