List User Trades
The method GET /user_trades/
enables you to retrieve a list of your trades or specific trades.
HTTP Request
Path Parameters
When you want a specific trade or set of trades, use the following path parameter:
Parameter | Description | Required |
---|---|---|
tid | Specifies the trade's unique identifier. You can use several identifiers in your request. Separate each with a dash. | No |
Query Parameters
You can use the following query parameters in your request:
Parameter | Description | Required | Default Value |
---|---|---|---|
book | Specifies which book to use. | No | |
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 and 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 |
---|---|---|---|
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 user's order ID. | String | |
origin_id | The client-provided order 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/user_trades?book=btc_mxn
{
"success": true,
"payload": [
{
"book": "btc_mxn",
"major": "0.00050327",
"minor": "-188.08206440",
"major_currency": "btc",
"minor_currency": "mxn",
"price": "373720.00",
"side": "buy",
"maker_side": "sell",
"fees_currency": "btc",
"fees_amount": "0.00000327",
"tid": "156478320",
"oid": "mZ3DDN4VxOMTEQZU",
"created_at": "2023-03-09T22:40:37+0000",
"origin_id": "1029384756"
},
{
"book": "btc_mxn",
"major": "0.00050327",
"minor": "-187.91598530",
"major_currency": "btc",
"minor_currency": "mxn",
"price": "373390.00",
"side": "buy",
"maker_side": "sell",
"fees_currency": "btc",
"fees_amount": "0.00000327",
"tid": "156476894",
"oid": "YD0NNMY2NzkyikEj",
"created_at": "2023-03-09T21:29:26+0000",
"origin_id": "6848302747"
}
]
}
Updated 3 months ago