List Order Trades
The method GET /order_trades/
enables you to retrieve the list of trades that the service created from one of your orders. You can specify the order's identifier via:
- A path parameter: Use the Bitso-supplied ID
- A query parameter: Use the client-supplied ID.
HTTP Request
Path Parameters
Use the following path parameter to specify the order for which you want the trades list:
Parameter | Description | Required |
---|---|---|
oid | Specifies the unique, Bitso-supplied identifier of the order for which to get corresponding trades. | No |
Query Parameters
However, if you prefer it, you can instead use the following query parameter to identify the order:
Parameter | Description | Required |
---|---|---|
origin_id | Specifies by origin ID (client-supplied ID) the identifier of the order for which to get related trades. | No |
JSON Response Payload
The endpoint returns a descending JSON array of transactions. Every element in the array is a JSON object that contains 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 |
fees_amount | The amount charged as trade fee. | String | |
fees_currency | The currency in which the service charged the trade fee. | String | |
major | The major amount traded. | String | Major |
major_currency | The ticker of the major currency. | String | |
maker_side | The maker's side for this trade (buy or sell ). If it matches with the field side , then you are a maker. | String | |
minor | The minor amount traded. | String | Minor |
minor_currency | The ticker of the minor currency. | String | |
oid | The order ID. | String | |
origin_id | The order's client-supplied ID (if any). | String | |
price | The price per unit of major. | String | Minor |
side | The user's side for this trade. Possible values: buy and sell . | String | |
tid | The trade's ID. | String |
The following response object exemplifies the JSON array returned:
curl https://api-stage.bitso.com/api/v3/order_trades/Jvqrschkgdkc1go3
{
"success": true,
"payload": [{
"book": "btc_mxn",
"major": "-0.25232073",
"major_currency": "btc",
"created_at": "2021-06-11T09:25:05.000+00:00",
"minor": "1013.540958479115",
"minor_currency": "mxn",
"fees_amount": "-10.237787459385",
"fees_currency": "mxn",
"price": "4057.45",
"tid": "51756",
"oid": "Jvqrschkgdkc1go3",
"origin_id": "origin_id1",
"side": "sell",
"maker_side": "sell"
},
{
"book": "btc_mxn",
"major": "-0.25",
"major_currency": "btc",
"created_at": "2021-06-11T09:25:05.000+00:00",
"minor": "513.540958479115",
"minor_currency": "mxn",
"fees_amount": "-10.237787459385",
"fees_currency": "mxn",
"price": "4057.45",
"tid": "51755",
"oid": "Jvqrschkgdkc1go3",
"origin_id": "origin_id1",
"side": "sell",
"maker_side": "sell"
}
]
}
Updated 2 months ago