---
title: "private/transfer_positions_debug"
method: POST
path: "/private/transfer_positions_debug"
tags: ["Transfers & Withdrawals"]
---

# private/transfer_positions_debug

`POST /private/transfer_positions_debug`

## Request

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

Takes the same params as private/transfer_positions and rebuilds both the maker and taker Actions without executing anything, returning for each side the EIP-712 encoded_data, encoded_data_hashed, action_hash, typed_data_hash, domain_separator, action_typehash, module, owner and expected_signer, plus the decoded action data (the maker's priced legs, and the taker's order_hash committing to them). Byte-compare these against your local computation to find why a signature is rejected. Requires a logged-in session; no transfer scope needed.

## Request body

- TransferPositionsRequest: Params for `private/transfer_positions`.
  - `maker_params` SignedTransferQuoteRequest, required: Action info that needs to be signed by quoter or RFQ executor for a transfer. The quoter signs the legs hash + max fee; the executor signs the same legs hash + their own max fee.
    - `direction` 'buy' | 'sell', required
    - `legs` PricedLegParamsAndResponse[], required
      - `amount` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
      - `direction` 'buy' | 'sell', required
      - `instrument_name` string, required
      - `price` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `max_fee` string, decimal, required: Maximum fee the signer authorises, in USD, as a decimal string (e.g. `"1.5"`) or a JSON number.
    - `nonce` string, required
    - `signature` string, required
    - `signature_expiry_sec` integer, required
    - `signer` string, required: 20-byte Ethereum address as a 0x-prefixed lowercase hex string.
    - `subaccount_id` integer, required
  - `taker_params` SignedTransferQuoteRequest, required: Action info that needs to be signed by quoter or RFQ executor for a transfer. The quoter signs the legs hash + max fee; the executor signs the same legs hash + their own max fee.
    - `direction` 'buy' | 'sell', required
    - `legs` PricedLegParamsAndResponse[], required
      - `amount` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
      - `direction` 'buy' | 'sell', required
      - `instrument_name` string, required
      - `price` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
    - `max_fee` string, decimal, required: Maximum fee the signer authorises, in USD, as a decimal string (e.g. `"1.5"`) or a JSON number.
    - `nonce` string, required
    - `signature` string, required
    - `signature_expiry_sec` integer, required
    - `signer` string, required: 20-byte Ethereum address as a 0x-prefixed lowercase hex string.
    - `subaccount_id` integer, required
  - `wallet` string, required: 20-byte Ethereum address as a 0x-prefixed lowercase hex string.

## Response `200`

Success

- TransferPositionsDebugResponse: `private/transfer_positions_debug` result: the maker and taker actions the route rebuilds, exactly as `private/transfer_positions` verifies them.
  - `maker_result` TransferPositionsMakerDebugResponse, required: Debug-route payload for one rebuilt action: the EIP-712 hashes plus the action input fields.
    - `action_hash` string, required: EIP-712 struct hash of the `Action`: `keccak256(abi.encode(action_typehash, …, encoded_data_hashed, …))`.
    - `action_typehash` string, required: `ACTION_TYPEHASH` — keccak of the `Action` struct type string; invariant across deployments.
    - `domain_separator` string, required: EIP-712 domain separator of the Matching contract for this deployment.
    - `encoded_data` string, required: ABI-encoded, module-specific action payload (the `data` bytes), 0x-hex.
    - `encoded_data_hashed` string, required: `keccak256(encoded_data)` — the value packed into the struct hash.
    - `expected_signer` string, required: The signer the signature is checked against.
    - `input_data` TransferPositionsMakerActionInputData, required: The rebuilt `Action` envelope and its decoded module-specific `data`.
      - `data` RfqMakerActionDataResponse, required
        - `max_fee` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
        - `trades` RfqLegResponse[], required
          - `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
          - `asset_address` string, required
          - `asset_sub_id` string, required
          - `price` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
      - `expiry` integer, required
      - `module` string, required
      - `nonce` string, required
      - `owner` string, required
      - `signer` string, required
      - `subaccount_id` integer, required
    - `module` string, required: Per-action module contract address bound into the signed struct.
    - `owner` string, required: Wallet that owns the subaccount the action applies to.
    - `recovered_signer` string, nullable: null on the debug routes (no signature is checked there); on a signature-mismatch error this is the address actually recovered.
    - `typed_data_hash` string, required: Final EIP-712 digest the client signs: `keccak256(0x1901 || domain_separator || action_hash)`.
  - `taker_result` TransferPositionsTakerDebugResponse, required: Debug-route payload for one rebuilt action: the EIP-712 hashes plus the action input fields.
    - `action_hash` string, required: EIP-712 struct hash of the `Action`: `keccak256(abi.encode(action_typehash, …, encoded_data_hashed, …))`.
    - `action_typehash` string, required: `ACTION_TYPEHASH` — keccak of the `Action` struct type string; invariant across deployments.
    - `domain_separator` string, required: EIP-712 domain separator of the Matching contract for this deployment.
    - `encoded_data` string, required: ABI-encoded, module-specific action payload (the `data` bytes), 0x-hex.
    - `encoded_data_hashed` string, required: `keccak256(encoded_data)` — the value packed into the struct hash.
    - `expected_signer` string, required: The signer the signature is checked against.
    - `input_data` TransferPositionsTakerActionInputData, required: The rebuilt `Action` envelope and its decoded module-specific `data`.
      - `data` RfqTakerActionDataResponse, required
        - `max_fee` string, decimal, required: Non-negative decimal string of the human value (e.g. `"1.5"`), up to 12 fractional digits; a string or JSON number is accepted
        - `order_hash` string, required: `keccak(abi.encode(maker_trades))` — the maker bundle hash the taker commits to.
      - `expiry` integer, required
      - `module` string, required
      - `nonce` string, required
      - `owner` string, required
      - `signer` string, required
      - `subaccount_id` integer, required
    - `module` string, required: Per-action module contract address bound into the signed struct.
    - `owner` string, required: Wallet that owns the subaccount the action applies to.
    - `recovered_signer` string, nullable: null on the debug routes (no signature is checked there); on a signature-mismatch error this is the address actually recovered.
    - `typed_data_hash` string, required: Final EIP-712 digest the client signs: `keccak256(0x1901 || domain_separator || action_hash)`.

## Other responses

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

## Changes

- **2026-10-20** `0c500202be49`: 2 info
  - the endpoint scheme security `DeriveWallet AND DeriveTimestamp AND DeriveSignature` was added to the API
  - added the media type `application/json` for the response with the status `default`

[Operation history](https://skmtc.dev/lyra/apis/derive-v3-api/changes/private/transfer_positions_debug/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)
