Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/private/get_user_trades_by_order \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 3466,
  "method": "private/get_user_trades_by_order",
  "params": {
    "order_id": "ETH-584830574"
  }
}
'
{
  "jsonrpc": "2.0",
  "id": 3466,
  "result": [
    {
      "trade_seq": 1966042,
      "trade_id": "ETH-2696068",
      "timestamp": 1590480712800,
      "tick_direction": 3,
      "state": "filled",
      "reduce_only": false,
      "price": 203.8,
      "post_only": false,
      "order_type": "market",
      "order_id": "ETH-584830574",
      "matching_id": null,
      "mark_price": 203.78,
      "liquidity": "T",
      "instrument_name": "ETH-PERPETUAL",
      "index_price": 203.89,
      "fee_currency": "ETH",
      "fee": 0.00036801,
      "direction": "buy",
      "amount": 100
    }
  ]
}

Query Parameters

order_id
string
required

The order id Unique order identifier

Example:

"ETH-100234"

sorting
enum<string>

Direction of results sorting (default value means no sorting, results will be returned in order in which they left the database)

Available options:
asc,
desc,
default
historical
boolean

Determines whether historical trade and order records should be retrieved.

  • false (default): Returns recent records: orders for 30 min, trades for 24h.
  • true: Fetches historical records, available after a short delay due to indexing. Recent data is not included.

📖 Related Article: Accessing historical trades and orders using API

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
id
integer

The id that was sent in the request