Get Closed Orders
POST/private/ClosedOrders
Retrieve information about orders that have been closed (filled or cancelled). 50 results are returned at a time, the most recent by default.
Note: If an order's tx ID is given for start
or end
time, the order's opening time (opentm
) is used
API Key Permissions Required: Orders and trades - Query closed orders & trades
Request
- application/json
Body
required
Nonce used in construction of API-Sign
header
Whether or not to include trades related to position in output
Restrict results to given user reference
Restrict results to given client order id
Starting unix timestamp or order tx ID of results (exclusive)
Ending unix timestamp or order tx ID of results (inclusive)
Result offset for pagination
Possible values: [open
, close
, both
]
Default value: both
Which time to use to search
Default value: true
Whether or not to consolidate trades by individual taker trades
Responses
- 200
Closed orders info retrieved.
- application/json
- Schema
- Example (from schema)
Schema
- pending = order pending book entry
- open = open order
- closed = closed order
- canceled = order canceled
- expired = order expired
last
is the implied trigger if this field is not set.stopped
triggered by stop pricetouched
triggered by touch priceliquidated
liquidationpartial
partial fillamended
order parameters modifiedpost
post-only order (available when ordertype = limit)fcib
prefer fee in base currency (default if selling)fciq
prefer fee in quote currency (default if buying, mutually exclusive withfcib
)nompp
disable market price protection for market ordersviqc
order volumes expressed in quote currency.
result object
Closed Orders
closed object
property name* txid
Closed Order
Referral order transaction ID that created this order
Optional numeric, client identifier associated with one or more orders.
Optional alphanumeric, client identifier associated with the order.
Possible values: [pending
, open
, closed
, canceled
, expired
]
Status of order
Unix timestamp of when order was placed
Unix timestamp of order start time (or 0 if not set)
Unix timestamp of order end time (or 0 if not set)
descr object
Order description info
Asset pair
Possible values: [buy
, sell
]
Type of order (buy/sell)
Possible values: [market
, limit
, iceberg
, stop-loss
, take-profit
, trailing-stop
, stop-loss-limit
, take-profit-limit
, trailing-stop-limit
, settle-position
]
Order type
primary price
Secondary price
Amount of leverage
Order description
Conditional close order description (if conditional close set)
Volume of order (base currency)
Volume executed (base currency)
Total cost (quote currency unless)
Total fee (quote currency)
Average price (quote currency)
Stop price (quote currency)
Triggered limit price (quote currency, when limit based order type triggered)
Possible values: [last
, index
]
Default value: last
Price signal used to trigger "stop-loss" "take-profit" "stop-loss-limit" "take-profit-limit" orders.
Indicates if the order is funded on margin.
Comma delimited list of miscellaneous info:
Comma delimited list of order flags:
List of trade IDs related to order (if trades info requested and data available)
For institutional accounts, identifies underlying sub-account/trader for Self Trade Prevention (STP).
Unix timestamp of when order was closed
Additional info on status (if any)
Amount of available order info matching criteria
{
"error": [],
"result": {
"closed": {
"O37652-RJWRT-IMO74O": {
"refid": "None",
"userref": 1,
"status": "canceled",
"reason": "User requested",
"opentm": 1688148493.7708,
"closetm": 1688148610.0482,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTGBP",
"type": "buy",
"ordertype": "stop-loss-limit",
"price": "23667.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTGBP @ limit 23667.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
},
"O6YDQ5-LOMWU-37YKEE": {
"refid": "None",
"userref": 36493663,
"status": "canceled",
"reason": "User requested",
"opentm": 1688148493.7708,
"closetm": 1688148610.0477,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTEUR",
"type": "buy",
"ordertype": "take-profit-limit",
"price": "27743.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTEUR @ limit 27743.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
}
},
"count": 2
}
}