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:

ParameterDescriptionRequired
oidSpecifies 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:

ParameterDescriptionRequired
origin_idSpecifies by origin ID (client-supplied ID) the identifier of the order for which to get related trades.No

📘

Trade Lookup by origin_id

Filtering by the origin_id query parameter retrieves all trades executed for orders sharing that origin_id, regardless of the order book or execution timestamp. For example, the service returns trades from orders placed on distinct books and executed at different times, provided they possess the same origin_id.

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 NameDescriptionTypeUnits
bookThe order book symbolStringMajor_Minor
created_atThe date and time when the service executed the trade.StringISO 8601 timestamp
fees_amountThe amount charged as trade fee.String
fees_currencyThe currency in which the service charged the trade fee.String
majorThe major amount traded.StringMajor
major_currencyThe ticker of the major currency.String
maker_sideThe maker's side for this trade (buy or sell). If it matches with the field side, then you are a maker.String
minorThe minor amount traded.StringMinor
minor_currencyThe ticker of the minor currency.String
oidThe order ID.String
origin_idThe order's client-supplied, unique ID (if any). Valid character set: a to z (lower and uppercase),  0 to 9, underscore, _, and dash, -. Maximum length = 40 characters.String
priceThe price per unit of major.StringMinor
sideThe user's side for this trade. Possible values: buy and sell.String
tidThe trade's ID.String

The following response object exemplifies the JSON array returned:

curl https://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"
        }
    ]
}