GET /public/get_last_trades_by_currency_and_time

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/deribit/public/get_last_trades_by_currency_and_timeCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Public trades for a currency/kind inside a millisecond time window.

Parameters

nameintypedescription
currencyquerystrrequiredCurrency, e.g. BTC.
example: BTC
start_timestampqueryintrequiredWindow start in milliseconds since epoch.
example: 1795278108832
end_timestampqueryintrequiredWindow end in milliseconds since epoch.
example: 1795882908832
kindquerystr
future | option | spot | future_combo | option_combo
optionalInstrument kind.
example: future
countqueryintoptionalNumber of trades (max 1000).
example: 2
sortingquerystr
asc | desc | default
optionalasc, desc or default.
example: desc

Response

type: object
pagination: none
sample: {
  "jsonrpc": "str",
  "result": "object",
  "usIn": "int",
  "usOut": "int",
  "usDiff": "int",
  "testnet": "bool"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/deribit/public/get_last_trades_by_currency_and_time?currency=BTC&start_timestamp=1795278108832&end_timestamp=1795882908832&kind=future&count=2&sorting=desc"