Look Up Orders
The method GET /orders/
enables you to retrieve the details of one or more of your orders. The method only returns open or partially filled orders. When the service fully matches or cancels an order, it will not include it in the response. For further details on how to pull the list of trades for a given order, refer to the section, List Order Trades.
You can specify the order's identifier via:
- A path parameter: Use the Bitso-supplied ID.
- A query parameter: Use either one or several Bitso-supplied or user-supplied IDs.
HTTP Request
-
GET https://api-stage.bitso.com/api/v3/orders?oids={oid},{oid},{oid}
-
GET https://api-stage.bitso.com/api/v3/orders?origin_ids={origin_id},{origin_id},{origin_id}
Path Parameters
Use the following path parameter to specify the order:
Parameter | Description | Required |
---|---|---|
oid | Specifies the Bitso-supplied identifier of the order to retrieve. | No |
Query Parameters
However, if you want to retrieve several orders' details, use either of the following query parameters to identify the orders. When specifying more than one order, use a comma to separate the IDs:
Parameter | Description | Required |
---|---|---|
oids | Specifies the Bitso-supplied identifiers of the orders to retrieve. | No |
origin_ids | Specifies by origin ID (client-supplied ID) the orders to retrieve. | No |
JSON Response Payload
The endpoint returns a JSON array of open orders. Every element in the array is a JSON object that includes the following fields:
Field Name | Description | Type | Units |
---|---|---|---|
book | The order book symbol. | String | Major_Minor |
created_at | The date and time when the service created the order. | String | ISO 8601 timestamp |
oid | The order's ID. | String | |
original_amount | The order's initial major currency amount. | String | Major |
origin_id | The client-supplied unique order ID (if any). | String | |
original_value | The order's initial minor currency amount. | String | Minor |
price | The order's price. | String | Minor |
side | The order's side. Possible values: buy and sell . | String | |
status | The order's status. Possible values: queued , open , partially filled , cancelled , and completed .NOTE: A lookup does not return completed or cancelled orders because the endpoint only retrieves open or partially filled orders. However, a one-hour window exists in which retrieval of orders with these status values is possible. | String | |
stop | The stop price for Stop Orders. | String | |
time_in_force | The time in force parameter for Limit Orders. | String | |
triggered_at | The date and time when the service triggered a Stop Order. | String | ISO 8601 timestamp |
type | The order's type. Possible values: market and limit. | String | |
unfilled_amount | The order's unfilled major currency amount. | String | Major |
updated_at | The date and time when the service updated the order. It might be "null". | String | ISO 8601 timestamp |
The following response object exemplifies the JSON array returned:
curl https://api-stage.bitso.com/api/v3/orders?oids=543cr2v32a1h6844,qlbga6b600n3xta7a
{
"success": true,
"payload": [{
"book": "btc_mxn",
"original_amount": "0.01000000",
"unfilled_amount": "0.00500000",
"original_value": "56.0",
"created_at": "2016-04-08T17:52:31.000+00:00",
"updated_at": "2016-04-08T17:52:51.000+00:00",
"price": "5600.00",
"oid": "543cr2v32a1h6844",
"side": "buy",
"status": "partially filled",
"type": "limit"
}, {
"book": "btc_mxn",
"original_amount": "0.12680000",
"unfilled_amount": "0.12680000",
"original_value": "507.2",
"created_at": "2016-04-08T17:52:31.000+00:00",
"updated_at": "2016-04-08T17:52:41.000+00:00",
"price": "4000.00",
"oid": "qlbga6b600n3xta7a",
"side": "sell",
"status": "open",
"type": "limit"
}]
}
Updated about 2 months ago