Orderbook

private/order_debug

Takes the same params as private/order and rebuilds the order Action without executing anything, returning 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 order action data. Byte-compare these against your local computation to find why a signature is rejected. Requires a logged-in session; no trade scope needed.

post/private/order_debug

Request

  • Base URL: https://api.derive.xyz/v3
  • URL: https://api.derive.xyz/v3/private/order_debug
  • Auth: none declared

Request body

algo_duration_secinteger nullable
algo_num_slicesinteger nullable
algo_type'twap'
amountstring decimal required

Order amount in units of the base, as a decimal string (e.g. "1.5") or a JSON number.

clientstring nullable
direction'buy' | 'sell' required
extra_feestring decimal nullable

Optional extra fee per unit of volume, as a decimal string or JSON number. Defaults to zero.

instrument_namestring required
is_atomic_signingboolean nullable
labelstring nullable
limit_pricestring decimal required

Limit price in quote currency, as a decimal string (e.g. "3100.5") or a JSON number.

max_feestring decimal required

Max fee per unit of volume in quote currency, as a decimal string or a JSON number.

mmpboolean nullable

Tags the order for market maker protection. Only tagged orders are cancelled by cancel on disconnect.

noncestring required
order_type'limit' | 'market'
reduce_onlyboolean nullable
referral_codestring nullable
reject_post_onlyboolean nullable
reject_timestampinteger nullable
signaturestring required
signature_expiry_secinteger required
signerstring required
subaccount_idinteger required
time_in_force'gtc' | 'post_only' | 'fok' | 'ioc'
trigger_pricestring decimal nullable

Trigger price as a decimal string or JSON number; omit for non-trigger orders.

trigger_price_type'mark' | 'index'
trigger_type'stoploss' | 'takeprofit'

Response

Success

action_hashstring required

EIP-712 struct hash of the Action: keccak256(abi.encode(action_typehash, …, encoded_data_hashed, …)).

action_typehashstring required

ACTION_TYPEHASH — keccak of the Action struct type string; invariant across deployments.

domain_separatorstring required

EIP-712 domain separator of the Matching contract for this deployment.

encoded_datastring required

ABI-encoded, module-specific action payload (the data bytes), 0x-hex.

encoded_data_hashedstring required

keccak256(encoded_data) — the value packed into the struct hash.

expected_signerstring required

The signer the signature is checked against.

modulestring required

Per-action module contract address bound into the signed struct.

ownerstring required

Wallet that owns the subaccount the action applies to.

recovered_signerstring nullable

null on the debug routes (no signature is checked there); on a signature-mismatch error this is the address actually recovered.

typed_data_hashstring required

Final EIP-712 digest the client signs: keccak256(0x1901 || domain_separator || action_hash).

Changes

No recorded changes to this operation across all 1 revision of this API.