---
title: "GET /private/get_user_trades_by_instrument"
method: GET
path: "/private/get_user_trades_by_instrument"
tags: ["Trading", "Private"]
---

# GET /private/get_user_trades_by_instrument

`GET /private/get_user_trades_by_instrument`

Retrieves the latest user trades that have occurred for a specific instrument. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID.

Results can be filtered by sequence number range or timestamp range. Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID). Use `historical` to retrieve historical trade data.

Main accounts may use the `subaccount_id` parameter to retrieve trade data for a specific subaccount (requires `mainaccount` scope).

**📖 Related Article:** [Accessing Historical Trades and Orders Using API](https://docs.deribit.com/articles/accessing-historical-trades-orders)

**Scope:** `trade:read`

[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_user_trades_by_instrument)

## Query parameters

- `instrument_name` string, required — Unique instrument identifier
- `start_seq` integer
- `end_seq` integer
- `count` integer
- `start_timestamp` integer — The timestamp (milliseconds since the Unix epoch)
- `end_timestamp` integer — The timestamp (milliseconds since the Unix epoch)
- `historical` boolean
- `sorting` 'asc' | 'desc' | 'default'
- `subaccount_id` integer

## Response `200`

Success response

- PrivateGetUserTradesHistoryResponse
  - `jsonrpc` '2.0', required — The JSON-RPC version (2.0)
  - `id` integer — The id that was sent in the request
  - `result` object, required
    - `trades` UserTrade[], required
      - `trade_id` string, required — Unique (per currency) trade identifier
      - `trade_seq` integer, required — The sequence number of the trade within instrument
      - `instrument_name` string, required — Unique instrument identifier
      - `timestamp` integer, required — The timestamp of the trade (milliseconds since the UNIX epoch)
      - `starbase_timestamp` integer — Optional field: timestamp of the match (trade) in [Starbase](https://docs.deribit.com/starbase/overview), in nanoseconds since the UNIX epoch (present only for trades matched in Starbase)
      - `order_type` 'limit' | 'market' | 'liquidation' — Order type: `"limit`, `"market"`, or `"liquidation"`
      - `advanced` 'usd' | 'implv' — Advanced type of user order: `"usd"` or `"implv"` (only for options; omitted if not applicable)
      - `order_id` string, required — Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
      - `matching_id` string, required — Always `null`
      - `starbase_match_id` integer — Optional field containing the Starbase match identifier (present only for trades matched via Starbase)
      - `starbase_order_id` integer — Optional field: the id in [Starbase](https://docs.deribit.com/starbase/overview) of the user's own order (maker or taker side) that took part in the trade; for self-trades this is always the taker order's id, and for combo legs it is the parent combo order's id (present only for trades matched in Starbase)
      - `direction` 'buy' | 'sell', required — Direction: `buy`, or `sell`
      - `tick_direction` 0 | 1 | 2 | 3, required — Direction of the "tick" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick).
      - `index_price` number, required — Index Price at the moment of trade
      - `price` number, required — Price in base currency
      - `amount` number, required — Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
      - `contracts` number — Trade size in contract units (optional, may be absent in historical trades)
      - `iv` number — Option implied volatility for the price (Option only)
      - `underlying_price` number — Underlying price for implied volatility calculations (Options only)
      - `liquidation` 'M' | 'T' | 'MT' — Optional field (only for trades caused by liquidation): `"M"` when maker side of trade was under liquidation, `"T"` when taker side was under liquidation, `"MT"` when both sides of trade were under liquidation
      - `liquidity` 'M' | 'T' — Describes what was role of users order: `"M"` when it was maker order, `"T"` when it was taker order
      - `fee` number, required — User's fee in units of the specified `fee_currency`
      - `fee_currency` 'BTC' | 'ETH' | 'USDC' | 'USDT' | 'EURR', required — Currency, i.e `"BTC"`, `"ETH"`, `"USDC"`
      - `label` string — User defined label (presented only when previously set for order by user)
      - `state` 'open' | 'filled' | 'rejected' | 'cancelled' | 'untriggered' | 'archive', required — Order state: `"open"`, `"filled"`, `"rejected"`, `"cancelled"`, `"untriggered"` or `"archive"` (if order was archived)
      - `block_trade_id` string — Block trade id - when trade was part of a block trade
      - `block_rfq_id` integer — ID of the Block RFQ - when trade was part of the Block RFQ
      - `block_rfq_quote_id` integer — ID of the Block RFQ quote - when trade was part of the Block RFQ
      - `reduce_only` string — `true` if user order is reduce-only
      - `post_only` string — `true` if user order is post-only
      - `mmp` boolean — `true` if user order is MMP
      - `risk_reducing` boolean — `true` if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)
      - `api` boolean — `true` if user order was created with API
      - `profit_loss` number — Profit and loss in base currency.
      - `mark_price` number, required — Mark Price at the moment of trade
      - `legs` unknown[] — Optional field containing leg trades if trade is a combo trade (present when querying for **only** combo trades and in `combo_trades` events)
        - unknown
      - `combo_id` string — Optional field containing combo instrument name if the trade is a combo trade
      - `combo_trade_id` string — Optional field containing combo trade identifier if the trade is a combo trade
      - `quote_set_id` string — QuoteSet of the user order (optional, present only for orders placed with `private/mass_quote`)
      - `quote_id` string — QuoteID of the user order (optional, present only for orders placed with `private/mass_quote`)
      - `trade_allocations` object[] — List of allocations for Block RFQ pre-allocation. Each allocation specifies `user_id`, `amount`, and `fee` for the allocated part of the trade. For broker client allocations, a `client_info` object will be included.
        - `user_id` integer — User ID to which part of the trade is allocated. For brokers the User ID is obstructed.
        - `amount` number, required — Amount allocated to this user.
        - `fee` number, required — Fee for the allocated part of the trade.
        - `client_info` object — Optional client allocation info for brokers.
          - `client_id` integer — ID of a client; available to broker. Represents a group of users under a common name.
          - `client_link_id` integer — ID assigned to a single user in a client; available to broker.
          - `name` string — Name of the linked user within the client; available to broker.
    - `has_more` boolean, required

---

[API](https://skmtc.net/deribit/apis/deribit-api-2.md) · [All operations](https://skmtc.net/deribit/apis/deribit-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deribit/deribit-api-2/versions/430b3f0bc67c/schema)
