Retrieves the latest user trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID for all instruments in the currency.
Results can be filtered by instrument kind, trade ID range, or timestamp range. Use the count parameter to limit the number of trades returned, and sorting to control the order. To retrieve trades for a specific subaccount, use the subaccount_id parameter. Use historical to retrieve historical trade data.
📖 Related Article: Accessing Historical Trades and Orders Using API
Scope: trade:read
Request
- Base URLhttps://test.deribit.com/api/v2
- URLhttps://test.deribit.com/api/v2/private/get_user_trades_by_currency
- Authnone declared
Query parameters
Currency, i.e "BTC", "ETH", "USDC"
The currency symbol.
📖 Related Article: Using the currency Parameter
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
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"
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"
Number of requested items, default - 10, maximum - 1000
The timestamp (milliseconds since the Unix epoch)
Inclusive earliest timestamp (milliseconds since the Unix epoch); cannot be combined with a start_id or start_seq bound.
The timestamp (milliseconds since the Unix epoch)
Inclusive latest timestamp (milliseconds since the Unix epoch).
Result ordering: asc, desc, or the method-specific default.
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
The user id for the subaccount
Response
Success response
Example response
{
"result": {
"trades": [
{
"instrument_name": "BTC-PERPETUAL",
"timestamp": 1517329113791,
"starbase_timestamp": 1536569522277000000,
"starbase_order_id": 103148386170,
"block_trade_id": "154",
"block_trade_leg_count": 3
}
]
}
}Changes
- breaking
the response property
///became nullable for the status - breaking
the response property
///became nullable for the status - breaking
the response property
///became nullable for the status - breaking
the
///response's property type changed fromstringtobooleanfor status - breaking
the
///response's property type changed fromstringtobooleanfor status
- breaking
- info
added the optional property
///to the response with the status
- info