---
title: "GET /public/get_last_trades_by_instrument_and_time"
method: GET
path: "/public/get_last_trades_by_instrument_and_time"
tags: ["Market Data", "Public"]
---

# GET /public/get_last_trades_by_instrument_and_time

`GET /public/get_last_trades_by_instrument_and_time`

## Request

- Base URL: `https://test.deribit.com/api/v2`
- URL: `https://test.deribit.com/api/v2/public/get_last_trades_by_instrument_and_time`
- Auth: none declared

Retrieves the latest trades that have occurred for a specific instrument within a specified time range. Returns trade details including price, amount, direction, timestamp, and trade ID.

Use the `count` parameter to limit the number of trades returned, and `sorting` to control the order (ascending or descending by trade ID). This method is useful for analyzing trading activity over specific time periods.

**Note:** For spot instruments routed to Coinbase Exchange, this call is not supported. Use [Get product trades](https://docs.cdp.coinbase.com/api-reference/exchange-api/rest-api/products/get-product-trades) directly for full trade history.

**📖 Related Article:** [Spot Trading: Deribit and Coinbase-Routed Instruments](https://docs.deribit.com/articles/spot-trading-venues)

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

## Query parameters

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

## Response `200`

Success response

- PublicTradesHistoryResponse
  - `jsonrpc` '2.0', required: The JSON-RPC version (2.0)
  - `id` integer: The id that was sent in the request
  - `result` object, required
    - `trades` PublicTrade[], 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: The Starbase causal timestamp of the trade (nanoseconds since the Unix epoch)
      - `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)
      - `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
      - `mark_price` number, required: Mark Price at the moment of trade
      - `block_trade_id` string: Block trade id - when trade was part of a block trade
      - `block_trade_leg_count` integer: Block trade leg count - when trade was part of a block trade
      - `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
      - `starbase_match_id` integer: Optional field containing the Starbase match identifier (present only for trades matched via Starbase)
      - `block_rfq_id` integer: ID of the Block RFQ - when trade was part of the Block RFQ
    - `has_more` boolean, required

---

[API](https://skmtc.dev/deribit/apis/deribit-api-2.md) - [All operations](https://skmtc.dev/deribit/apis/deribit-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/deribit/apis/deribit-api-2/revisions/78543b1b2259?raw)
