List Open Orders
The method GET /open_orders
enables you to retrieve a list of your open orders. You can retrieve the complete list or filter your search by book or by currency.
HTTP Request
Header Parameters
You must specify the following authorization parameters in your request:
Parameter | Description | Required |
---|---|---|
key | See the section, Authentication | Yes |
signature | See the section, Authentication | Yes |
nonce | See the section, Authentication | Yes |
Query Parameters
You can use the following query parameters in your request:
Parameter | Description | Required | Default Value |
---|---|---|---|
book | Specifies the book to search. | No | all |
currency | Specifies the currency by which to filter the orders (minor or major ). | No | |
limit | Sets a limit to the amount of results obtained from the result set. | No | 500 |
source | Sets a filter on the type of orders returned. Valid values: alpha and all . If set to alpha , then it excludes retail orders from the response. | No | all |
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 executed the trade. | String | ISO 8601 timestamp |
oid | The order's ID. | String | |
origin_id | The order's client-supplied ID. The service returns it when supplied, replacing the user ID. | String | |
original_amount | The order's initial major currency amount. | String | Major |
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 , and partially filled . | String | |
time_in_force | The period a limit order remains active before it is executed or expires. Valid values: goodtillcancelled and postonly . | String | |
type | The order's type. It always has the value limit for open orders. Market orders buy or sell an asset immediately, so they do not remain open. | String | |
unfilled_amount | The order's unfilled major currency amount. | String | Major |
updated_at | The date and time when the service updated the trade. 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/open_orders?book=btc_mxn
{
"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": "543cr2v32a1h68443",
"origin_id": "origin_id1",
"side": "buy",
"status": "partially filled",
"type": "limit",
"time_in_force":"goodtillcancelled"
}, {
"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": "qlbga6b600n3xta7",
"side": "sell",
"status": "open",
"type": "limit",
"time_in_force":"goodtillcancelled"
}, {
"book": "btc_mxn",
"original_amount": "1.12560000",
"unfilled_amount": "1.12560000",
"original_value": "6892.66788",
"created_at": "2016-04-08T17:52:31.000+00:00",
"updated_at": "2016-04-08T17:52:41.000+00:00",
"price": "6123.55",
"oid": "d71e3xy2lowndkfm",
"side": "sell",
"status": "open",
"type": "limit",
"time_in_force":"goodtillcancelled"
}]
}
Updated 26 days ago