RFQ

private/get_block_trades

Changed on

Returns a paginated history of the caller's block trades for a wallet or one of its subaccounts, newest first. Pages count blocks, not trades. Each block has its time, the caller's liquidity role and the caller's trades, one per leg, in the private/get_trade_history shape. Optional filters: a time window, an instrument name and a direction. A block matches the instrument filter if it has a trade in that instrument, and the direction filter if any of the caller's trades has that direction. A matching block returns all of its trades. A session key restricted to some subaccounts sees only their blocks.

post/private/get_block_trades

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

GetBlockTradesRequest required
direction, 'buy' | 'sell' nullable
from_timestamp, integer nullable
instrument_name, string nullable

Returns the blocks with a trade in this instrument.

page, integer nullable
page_size, integer nullable
subaccount_id, integer nullable
to_timestamp, integer nullable
wallet, string nullable

Response

Success

PaginatedBlockTradesResult required
block_trades, BlockTradeHistoryResponse[] required
pagination, Pagination required

Response envelope for paginated RPCs.

Changes