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 orders, refer to the section, List Order Trades.
HTTP Request
-
GET https://sandbox.bitso.com/api/v3/orders?oids={oid},{oid},{oid}
-
GET https://sandbox.bitso.com/api/v3/orders?origin_ids={origin_id},{origin_id},{origin_id}
Path Parameters
When you want to retrieve a specific trade, use the following path parameter:
Parameter | Description | Required |
---|---|---|
oid | Specifies the identifier of the order to retrieve. | No |
Query Parameters
You can use the following query parameters in your request:
Parameter | Description | Required |
---|---|---|
oids | Specifies the identifiers of the orders to retrieve. | No |
origin_ids | Specifies by origin 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, and closed. | 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://sandbox.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 9 months ago