---
title: "private/get_block_trade"
method: POST
path: "/private/get_block_trade"
tags: ["RFQ"]
---

# private/get_block_trade

`POST /private/get_block_trade`

## Request

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

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.

## Request body

- GetBlockTradeRequest
  - `block_trade_id` string, uuid, required: The `block_trade_id` of the block's trades.
  - `subaccount_id` integer, nullable
  - `wallet` string, nullable

## Response `200`

Success

- BlockTradeHistoryResponse: 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.
    - `batch_status` 'Batching' | 'Executing' | 'Da' | 'Proving' | 'Settling' | 'Settled' | 'BatchingError' | 'ExecutingError' | 'DaError' | 'ProvingError' | 'SettlingError' | 'SettledError', nullable: Batch lifecycle status — the single source of lifecycle truth for every operation in the batch (individual ops carry no status of their own). Each stage has a healthy variant and a corresponding `...Error` variant meaning that stage failed. Serialized as the variant name (string) in API responses.
    - `block_trade_id` string, uuid, nullable, required: Optional UUID v4 string
    - `direction` 'buy' | 'sell', required
    - `expected_rebate` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `extra_fee` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `index_price` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `instrument_name` string, required
    - `is_transfer` boolean, required
    - `label` string, required
    - `liquidity_role` 'maker' | 'taker', required
    - `mark_price` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `op_uuid` string, required
    - `order_id` string, required
    - `quote_id` string, uuid, nullable, required: Optional UUID v4 string
    - `realized_pnl` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `realized_pnl_excl_fees` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `rfq_id` string, uuid, nullable, required: Optional UUID v4 string
    - `subaccount_id` integer, required
    - `timestamp` integer, required
    - `trade_amount` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `trade_fee` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `trade_id` string, required
    - `trade_price` string, decimal, required: Decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `tx_hash` string, nullable

## Other responses

- `default`: JSON-RPC error (see Error Codes)

## Changes

- **2026-11-12** `1daf38a69a7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lyra/apis/derive-v3-api/changes/private/get_block_trade/post.md)

---

[API](https://skmtc.dev/lyra/apis/derive-v3-api.md) - [All operations](https://skmtc.dev/lyra/apis/derive-v3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lyra/apis/derive-v3-api/revisions/415f8a73b10c?raw)
