List Trades
The method GET /trades/
enables you to retrieve a list of recent trades from the specified book.
HTTP Request
Query Parameters
You can use the following query parameters in your request:
Parameter | Description | Required | Default Value |
---|---|---|---|
book | Specifies which book to use. | Yes | |
limit | Specifies the number of objects to return. Maximum is 100. | No | 25 |
marker | Specifies to return older or newer objects (depending on the value of the sort parameter) than the object with the given ID. | No | |
sort | Specifies the ordering direction of returned objects. Valid values: asc, desc. | No | desc |
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 |
---|---|---|---|
amount | The major amount transacted. | String | Major |
book | The order book symbol. | String | Major_Minor |
created_at | The date and time when the service executed the trade. | String | ISO 8601 timestamp |
maker_side | An indicator of the maker order side (maker order is the order that was opened in the order book). | String | |
price | The price per unit of major. | String | Minor |
tid | The trade's ID. | Long |
The following response object exemplifies the JSON array returned:
curl https://api-stage.bitso.com/api/v3/trades?book=btc_mxn
{
"success": true,
"payload": [{
"book": "btc_mxn",
"created_at": "2016-04-08T17:52:31.000+00:00",
"amount": "0.02000000",
"maker_side": "buy",
"price": "5545.01",
"tid": 55845
}, {
"book": "btc_mxn",
"created_at": "2016-04-08T17:52:31.000+00:00",
"amount": "0.33723939",
"maker_side": "sell",
"price": "5633.98",
"tid": 55844
}]
}
Updated 3 months ago