Historical Orders
Address: openApi/contract/entrustDetail
Received Parameters
Required
Submission Method: get
Example
Submission Parameters
Parameter Name | Required | Type | Example | Description |
---|---|---|---|---|
order_id | Yes | string | BM121241631598302178LNZN11 | Order Number |
Return Parameters
Parameter Name | Required | Mandatory | Example | Description |
---|---|---|---|---|
errno | Yes | int | 0 | Return status code |
errmsg | Yes | string | Success | Retrieval Information |
result | Yes | string | 见示例 | Return Data |
result parameters
Parameter Name | Required | Type | Example | Description |
---|---|---|---|---|
order_id | Yes | string | BM121241631598302178LNZN11 | Order ID |
ctime | Yes | int | 1576746253 | Order time |
symbol | Yes | string | EOS-USDT | Trading pair |
price | Yes | string | 14 | Order 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 | Deal done |
type | Yes | string | buy-limit | Order type |
status | Yes | int | 3 | Order status (1=Pending,2=Partially filled,3=Filled,4=Cancelling,5=Partially cancelled,6=Cancelled) |
contract_type | Yes | string | open/close | Indicator of open position or close position (open for opening a position, close for closing a position) |
profit | Yes | string | 20 | Total Profit/Loss |
closeOrders | Yes | array | Array containing close order information | Array of close order information corresponding to open positions |
Result -> CloseOrders Parameters
Parameter Name | Required | Type | Example | Description |
---|---|---|---|---|
order_id | Yes | string | 11532 | Order ID |
ctime | Yes | int | 1576746253 | Commission Time |
symbol | Yes | string | EOS-USDT | Trading pair |
price | Yes | string | 14 | Order Price |
price_avg | Yes | string | 15 | Average Transaction Price |
lever_rate | Yes | int | 10 | Leverage Multiplier |
amount | Yes | string | 150 | Order Quantity |
deal_amount | Yes | string | 100 | Completed deal |
type | Yes | string | buy-limit | Order type |
status | Yes | int | 3 | Order status{1=Pending,2=Partial transaction,3=Completed,4=Cancelling,5=Partial cancellation,6=Cancelled} |
contract_type | Yes | string | close | Liquidation (open for opening position, close for closing position) |
profit | Yes | string | 10 | Total Profit/Loss |
Return Example
JSON
{
"errno": 0,
"errmsg": "success",
"result": {
"order_id": "BM121241631598302178LNZN11", //Order Number
"ctime": 1576746253, //Order time
"symbol": "EOS-USDT", //Trading Pair
"price": "14", //Order Price
"price_avg": "15", //Average Transaction Price
"lever_rate": 10, //Leverage ratio
"amount": "150", // Order Quantity
"deal_amount": "100", //Traded
"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 Positions open close Positions close
"profit": "20", //Total Profit/Loss
"closeOrders": [ // Open position corresponding take profit and stop loss orders
{
"order_id": "11532", //Order number
"ctime": 1576746253, //Order Time
"symbol": "EOS-USDT", //Trading pair
"price": "14", //Order price
"price_avg": "15", //Average transaction price
"lever_rate": 10, //Leverage multiplier
"amount": "150", // Entrusted amount
"deal_amount": "100", //Deal Done
"type": "buy-limit", //Order type
"status": 3, //1=Pending,2=Partially Filled,3=Filled,4=Cancellation Pending,5=Partially Cancelled,6=Cancelled
"contract_type": "close", //close position
"profit": "10" //Total profit and loss
},
{
"order_id": "11533", //Order Number
"ctime": 1576746253, //Order Time
"symbol": "EOS-USDT", //Trading pair
"price": "14", //Order price
"price_avg": "15", //Average transaction price
"lever_rate": 10, //Leverage multiplier
"amount": "150", //Quantity Commissioned
"deal_amount": "100", //Deal Completed
"type": "buy-limit", //Order type
"status": 3, //1=Pending,2=Partially filled,3=Filled,4=Cancelling,5=Partially cancelled,6=Cancelled
"contract_type": "close", //close liquidation
"profit": "10" //Total profit and loss
}
]
}
}