Market Data
Public

Retrieves the latest trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, and trade ID for all instruments in the currency.

Results can be filtered by instrument kind and trade ID 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).

Note: For currencies with spot instruments routed to Coinbase Exchange, this call is not supported when kind is spot or any — and any is the default when kind is omitted. A currency counts as routed when it is the base or the quote of a routed pair. Other kinds are unaffected. Use Get product trades directly for full trade history by instrument.

📖 Related Articles:

Try in API console

get/public/get_last_trades_by_currency

Request

  • Base URL
    https://test.deribit.com/api/v2
  • URL
    https://test.deribit.com/api/v2/public/get_last_trades_by_currency
  • Auth
    none declared

Query parameters

currency'BTC' | 'ETH' | 'USDC' | 'USDT' | 'EURR' required

Currency, i.e "BTC", "ETH", "USDC"

The currency symbol.

📖 Related Article: Using the currency Parameter

kind'future' | 'option' | 'spot' | 'future_combo' | 'option_combo' | 'combo' | 'any'

Instrument kind: "future", "option", "spot", "future_combo", "option_combo", "combo" for any combo or "any" for all

Instrument kind, "combo" for any combo or "any" for all. If not provided instruments of all kinds are considered

start_idstring

Unique (per currency) trade identifier

The ID of the first trade to be returned. Number for BTC trades, or hyphen name in ex. "ETH-15" # "ETH_USDC-16"

end_idstring

Unique (per currency) trade identifier

The ID of the last trade to be returned. Number for BTC trades, or hyphen name in ex. "ETH-15" # "ETH_USDC-16"

start_timestampinteger

The timestamp (milliseconds since the Unix epoch)

Example:1536569522277

Inclusive earliest timestamp (milliseconds since the Unix epoch); cannot be combined with a start_id or start_seq bound.

end_timestampinteger

The timestamp (milliseconds since the Unix epoch)

Example:1536569522277

Inclusive latest timestamp (milliseconds since the Unix epoch).

countinteger

Number of requested items, default - 10, maximum - 1000

sorting'asc' | 'desc' | 'default'

Result ordering: asc, desc, or the method-specific default.

Response

Success response

jsonrpc'2.0' required

The JSON-RPC version (2.0)

idinteger

The id that was sent in the request

Example response

{
  "result": {
    "trades": [
      {
        "instrument_name": "BTC-PERPETUAL",
        "timestamp": 1517329113791,
        "starbase_timestamp": 1536569522277000000,
        "block_trade_id": "154",
        "block_trade_leg_count": 3
      }
    ]
  }
}

Changes

    • breaking

      the response property /// became nullable for the status

    • info

      added the optional property /// to the response with the status