> ## Documentation Index
> Fetch the complete documentation index at: https://docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# private/verify_block_trade

> Checks one signed side of a block trade for the caller's subaccount, as private/execute_block_trade would check it now: its signature, nonce and signature lifetime. Takes the signed side in the private/execute_block_trade shape and its role, maker or taker. Returns the total fee the side would pay, its initial margin before and after the trade, expires_at_sec, the last second at which the side can execute, and within_price_band, which is whether the total cost is inside the currency's RFQ price band for both sides, or null if the currency has no band. Fails with invalid_amount (11012) if a leg is smaller than 100 times its instrument's minimum_amount. A side without enough margin returns is_valid false and the reason, not an error. The side stays usable. Requires the block_trade off-chain scope.



## OpenAPI

````yaml /openapi.json post /private/verify_block_trade
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Liquidations
    description: >-
      Open a Dutch auction against a breaching subaccount, quote the auctions
      running right now, bid on them, and review past ones.
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: Onchain Actions
    description: >-
      L1 onchain actions submitted via OnchainActionManager: register deposit
      addresses, list pending deposits, and inspect onchain action history.
  - name: System
    description: Rate limits, transaction lookups, and live incidents.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Maker Scoring
    description: Maker programs, score breakdowns, and detailed scoring snapshots.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Chat
    description: Anonymous chat rooms and conversations with the concierge.
  - name: Other
    description: Uncategorized.
paths:
  /private/verify_block_trade:
    post:
      tags:
        - RFQ
      summary: private/verify_block_trade
      description: >-
        Checks one signed side of a block trade for the caller's subaccount, as
        private/execute_block_trade would check it now: its signature, nonce and
        signature lifetime. Takes the signed side in the
        private/execute_block_trade shape and its role, maker or taker. Returns
        the total fee the side would pay, its initial margin before and after
        the trade, expires_at_sec, the last second at which the side can
        execute, and within_price_band, which is whether the total cost is
        inside the currency's RFQ price band for both sides, or null if the
        currency has no band. Fails with invalid_amount (11012) if a leg is
        smaller than 100 times its instrument's minimum_amount. A side without
        enough margin returns is_valid false and the reason, not an error. The
        side stays usable. Requires the block_trade off-chain scope.
      operationId: private_verify_block_trade
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyBlockTradeRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockTradeSideCheckResponse'
        default:
          description: JSON-RPC error (see Error Codes)
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    $ref: '#/components/schemas/RPCError'
      security:
        - DeriveWallet: []
          DeriveTimestamp: []
          DeriveSignature: []
components:
  schemas:
    VerifyBlockTradeRequest:
      description: A signed side, as `private/execute_block_trade` takes it, and its role.
      type: object
      required:
        - direction
        - legs
        - max_fee
        - nonce
        - role
        - signature
        - signature_expiry_sec
        - signer
        - subaccount_id
      properties:
        client:
          default: ''
          type: string
        direction:
          $ref: '#/components/schemas/Direction'
        extra_fee:
          description: >-
            Broker fee for this side, in USD, paid to the owner of
            `referral_code`. It is not signed. The side's `max_fee` caps the
            total fee.
          default: '0'
          type: string
          format: decimal
        label:
          default: ''
          type: string
        legs:
          type: array
          items:
            $ref: '#/components/schemas/PricedLegParamsAndResponse'
        max_fee:
          description: Highest total fee this side pays, in USD, including `extra_fee`.
          type: string
          format: decimal
        nonce:
          type: string
        referral_code:
          default: ''
          type: string
        role:
          $ref: '#/components/schemas/LiquidityRole'
          description: >-
            The payload this side signed: `maker` (a quote) or `taker` (an
            execution).
        signature:
          type: string
        signature_expiry_sec:
          type: integer
          format: int64
        signer:
          $ref: '#/components/schemas/Address'
        subaccount_id:
          type: integer
          format: int64
    BlockTradeSideCheckResponse:
      description: >-
        Result for `private/simulate_block_trade` and
        `private/verify_block_trade`: one side's fee and margin if it executed
        now.
      type: object
      required:
        - estimated_fee
        - is_valid
        - post_initial_margin
        - pre_initial_margin
      properties:
        estimated_fee:
          description: The side's total fee, `extra_fee` included.
          type: string
          format: decimal
        expires_at_sec:
          description: >-
            The last second at which the signed side can execute. Null for an
            unsigned side.
          type:
            - integer
            - 'null'
          format: int64
        invalid_reason:
          type:
            - string
            - 'null'
        is_valid:
          description: >-
            False if the side does not have enough margin for its trade and
            fees, or if the trade takes the subaccount over its maximum asset
            count.
          type: boolean
        post_initial_margin:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        pre_initial_margin:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        within_price_band:
          description: >-
            Whether both sides are within the currency's RFQ price band. Null if
            it has no band.
          type:
            - boolean
            - 'null'
    RPCError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int64
        data:
          type:
            - string
            - 'null'
        message:
          type: string
    Direction:
      type: string
      enum:
        - buy
        - sell
    PricedLegParamsAndResponse:
      type: object
      required:
        - amount
        - direction
        - instrument_name
        - price
      properties:
        amount:
          description: >-
            Non-negative decimal string of the human value (e.g. `"1.5"`), up to
            12 fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        direction:
          $ref: '#/components/schemas/Direction'
        instrument_name:
          type: string
        price:
          description: >-
            Non-negative decimal string of the human value (e.g. `"1.5"`), up to
            12 fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
    LiquidityRole:
      type: string
      enum:
        - maker
        - taker
    Address:
      description: 20-byte Ethereum address as a 0x-prefixed lowercase hex string.
      type: string
      maxLength: 42
      minLength: 42
      pattern: ^0x[0-9a-fA-F]{40}$
  securitySchemes:
    DeriveWallet:
      type: apiKey
      in: header
      name: X-DeriveWallet
      description: The wallet the request acts for.
    DeriveTimestamp:
      type: apiKey
      in: header
      name: X-DeriveTimestamp
      description: The current time in milliseconds, as a decimal string.
    DeriveSignature:
      type: apiKey
      in: header
      name: X-DeriveSignature
      description: >-
        EIP-191 signature of the timestamp, by the wallet or one of its session
        keys.

````

## Related topics

- [private/execute_block_trade](https://docs.derive.xyz/api-reference/rfq/privateexecute_block_trade.md)
- [RFQ Trading](https://docs.derive.xyz/trading/rfq.md)
- [Changelog](https://docs.derive.xyz/changelog.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.