RFQ

private/get_block_trade

Changed on

Returns the caller's side of one block trade, by block_trade_id, for a wallet or one of its subaccounts: the block's time, the caller's liquidity role and the caller's trades, one per leg, in the private/get_trade_history shape with their batch status and tx_hash. Fails with a block-trade-not-found error if no trade of the wallet or subaccount has that id. A session key restricted to some subaccounts sees only their blocks.

post/private/get_block_trade

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

GetBlockTradeRequest required
block_trade_id, string uuid required

The block_trade_id of the block's trades.

subaccount_id, integer nullable
wallet, string nullable

Response

Success

BlockTradeHistoryResponse required

A block trade as returned by private/get_block_trades and private/get_block_trade. It holds the caller's side only: the two sides of a block belong to different wallets.

block_trade_id, string uuid required

UUID v4 string

liquidity_role, 'maker' | 'taker' required
timestamp, integer required
trades, TradeHistoryResponse[] required

One trade per leg.

Changes