Skip to content

Query Historical Orders List

Address: openApi/contract/historyList

Design Review

Unaudited

Receiving Parameters

Required

Submission Method: get

Example

Submission Parameters

Parameter Name Required Mandatory Example Description
symbol No string Trading pair (mandatory for current trading pair, not required for all trading pairs)
from No int 122 Start query from order_id
direct No string prev Query direction (default prev), prev goes backward, time (or ID) in descending order; next goes forward, time (or ID) in ascending order. (For example, a list of numbers: 1, 2, 3, 4, 5. from=4, prev has 3, 2, 1; next only has 5)
limit No int 20 Number of results per page returned, default is 20, maximum is 100 (refer to the pagination description for more details)
is_full No int 1 1 Hedge Mode 2 Cross Margin

Return Parameters

Parameter Name Required Type Example Description
errno Yes int 0 Return status code
errmsg Yes string Success Return message
result Yes object See example Return data

result Parameters

Parameter Name Required Type Example Description
order_id Yes string 11535 Order Number
ctime Yes int 1576746253 Order Time
symbol Yes string EOS-USDT Trading Pair
price Yes string 14 Entrust Price
price_avg Yes string 15 Average transaction price
lever_rate Yes int 10 Leverage Ratio
amount Yes string 150 Order Quantity
deal_amount Yes string 100 Completed
type Yes string buy-limit Order type
status Yes int 3 Order status (1=Open, 2=Partially filled, 3=Filled, 4=Cancelling, 5=Partially cancelled, 6=Cancelled)
contract_type Yes string open Entering a position (open for entering a position, close for closing a position)
profit Yes string 10 Total Profit and Loss

Return Example

JSON
{
    "errno": 0,
    "errmsg": "success",
    "result": [
        {
            "order_id": "11535", //Order Number
            "ctime": 1576746253, //Entrustment time
            "symbol": "EOS-USDT", //Trading pair
            "price": "14", //Order price
            "price_avg": "15", //Average transaction price
            "lever_rate": 10, //Leverage multiple
            "amount": "150", // Entrusted quantity
            "deal_amount": "100", //Executed
            "type": "buy-limit", //Order Type
            "status": 3, //1=Pending,2=Partially filled,3=Filled,4=Cancelling,5=Partially cancelled,6=Cancelled
            "contract_type": "open", // open to open a position close to close a position
            "profit": "10" //Total profit and loss
        }
    ]
}