Get orders
GETπ Trading
Returns open orders. When orderId or clOrderId is provided, returns that single order; otherwise returns the caller's open orders, optionally filtered by symbol.
Request Parametersβ
| Name | Type | Required | Description |
|---|---|---|---|
| orderId | String | No | Server-assigned order id to look up a single order. |
| clOrderId | String | No | Client-assigned order id to look up a single order. |
| symbol | String | No | Trading pair symbol to filter open orders. Ignored when orderId or clOrderId is provided. |
| includeCancelled | Boolean | No | If true, cancelled orders are included in the result. Only honored when looking up by orderId or clOrderId. |
Response Contentβ
| Name | Type | Description |
|---|---|---|
| orderId | String | Server-assigned order id. |
| clOrderId | String | Client-assigned order id echoed from placement. |
| symbol | String | Trading pair symbol. |
| orderSide | String | Order side: BUY or SELL. |
| type | Integer | Order type code. |
| orderPrice | Double | Limit price of the order. |
| originalOrderSize | Integer | Original order size in number of contracts at placement. |
| currentOrderSize | Integer | Current remaining order size in number of contracts after fills and amendments. |
| totalFilledSize | Integer | Cumulative filled size in number of contracts. |
| remainingSize | Integer | Remaining unfilled size in number of contracts. |
| averageFillPrice | Double | Average fill price across executions so far. |
| orderState | String | Human-readable order state name. |
| timestamp | Long | Server timestamp of the last state change, in milliseconds since epoch. |
| reduceOnly | Boolean | True if the order can only reduce an existing position. |
| positionMode | String | Position mode this order applies to (one-way or hedge). β ONE_WAY Β· HEDGE Β· ISOLATED |
| positionDirection | String | Position direction the order affects: LONG or SHORT. |
| positionId | String | Identifier of the position the order is bound to. |
| closeOrder | Boolean | True if the order is a close-position order. |
| pegPriceMin | Double | Lower bound of the peg order price band. |
| pegPriceMax | Double | Upper bound of the peg order price band. |
| pegPriceDeviation | Double | Offset applied to the pegged reference price. |
| currentPegPrice | Double | Current pegged working price. |
| triggerOrder | Boolean | True if this order is a conditional trigger order that has not yet fired. |
| triggered | Boolean | True once the trigger condition has fired. |
| triggerPrice | Double | Configured trigger price. |
| triggerOriginalPrice | Double | Original submitted trigger price prior to any amendment. |
| triggerOrderType | Integer | Order type code the trigger will submit once fired. |
| triggerTrailingStopDeviation | Double | Trailing distance for the trigger's trailing-stop behavior. |
| triggerStopPrice | Double | Stop price used by the triggered order once activated. |
| triggerUseLastPrice | Boolean | True if last-traded-price is used as the trigger reference, otherwise mark price is used. |
| trailValue | Double | Trailing distance the stop maintains from the best reached reference price. |
| trailValueType | String | How trailValue is interpreted (absolute price offset or percentage). β DISTANCE Β· PERCENTAGE |
| activationPrice | Double | Price at which trailing or scheduled logic activates. |
| activationPriceType | String | Reference price type used to evaluate the activation price. β INDEX_PRICE Β· LAST_PRICE Β· MARK_PRICE |
| cancelDuration | Long | Cancel duration in milliseconds derived from time-in-force. Zero for GTC. |
| timeInForce | String | Time-in-force policy applied to the order (e.g. GTC, IOC, FOK). |
| stealth | Double | Portion of the order size displayed on the book; the remainder is hidden. |
| contractSize | Double | Contract size (units of underlying per contract) for this symbol. |
| wrapperOrder | Boolean | True if the order is a wrapper that spawns child orders (e.g. activation wrappers). |
| ocoPeerOrderId | String | Order id of the peer OCO leg, if this order is part of an OCO pair. |
| orderDetailType | String | Fine-grained order detail type classification. β TWAP Β· PARTIAL_LIQUIDATION Β· FORCED_MARKET_BUY Β· FORCED_MARKET_SELL |
| originalOrderValue | Double | Notional value at placement, computed from original size, contract size and reference price. |
| currentOrderValue | Double | Current notional value, computed from remaining size, contract size and current working price. |
takeProfitOrder:
| Name | Type | Description |
|---|---|---|
| orderId | String | Server-assigned order id of the attached trigger order. |
| side | String | Order side of the trigger leg: BUY or SELL. |
| triggerPrice | Double | Price at which this trigger fires. |
| triggerUseLastPrice | Boolean | True if last-traded-price is used as the trigger reference, otherwise mark price is used. |
stopLossOrder:
| Name | Type | Description |
|---|---|---|
| orderId | String | Server-assigned order id of the attached trigger order. |
| side | String | Order side of the trigger leg: BUY or SELL. |
| triggerPrice | Double | Price at which this trigger fires. |
| triggerUseLastPrice | Boolean | True if last-traded-price is used as the trigger reference, otherwise mark price is used. |
example
GET
https://api.btse.com/futures/api/v3/trade/ordersResponse (default)
[
{
"orderId": "0251ea47-88b5-48c0-aeb3-b38774fd1f90",
"clOrderId": "",
"symbol": "BTC-PERP",
"orderSide": "BUY",
"type": 76,
"orderPrice": 56439.4,
"originalOrderSize": 1,
"currentOrderSize": 1,
"totalFilledSize": 0,
"remainingSize": 1,
"averageFillPrice": 0,
"orderState": "STATUS_ACTIVE",
"timestamp": 1784882344358,
"reduceOnly": false,
"positionMode": "ONE_WAY",
"positionDirection": null,
"positionId": "BTC-PERP-USDT",
"closeOrder": false,
"pegPriceMin": 0,
"pegPriceMax": 0,
"pegPriceDeviation": 1,
"currentPegPrice": 56439.4,
"triggerOrder": false,
"triggered": false,
"triggerPrice": 0,
"triggerOriginalPrice": 0,
"triggerOrderType": 0,
"triggerTrailingStopDeviation": 0,
"triggerStopPrice": 0,
"triggerUseLastPrice": false,
"trailValue": 0,
"trailValueType": "DISTANCE",
"activationPrice": null,
"activationPriceType": null,
"takeProfitOrder": null,
"stopLossOrder": null,
"cancelDuration": 0,
"timeInForce": "GTC",
"stealth": 1,
"contractSize": 0.00001,
"wrapperOrder": false,
"ocoPeerOrderId": null,
"orderDetailType": null,
"originalOrderValue": 0.564394,
"currentOrderValue": 0.564394
}
]