System

public/decode_action

Changed on

Runs a hex-encoded Action.data payload through the exchange's own ABI decoder and returns either the decoded fields or the exact reason the bytes were rejected, naming the 32-byte word and the field that broke. Reach for this first when a request fails signature verification (14014): every other route encodes Action.data server-side, so a client whose encoder emits a bad word never sees a decode error - the hashes simply disagree. This is the only route a client's own bytes reach the decoder. Needs no auth and executes nothing.

post/public/decode_action

Request

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

Request body

DecodeActionRequest required
action_type, 'order' | 'rfq_maker' | 'rfq_taker' | 'transfer' | 'external_transfer' | 'withdrawal' | 'liquidation' | 'set_session_key' | 'update_whitelisted_recipients' | 'delete_subaccount' | 'vault_deposit' | 'vault_withdraw' | 'vault_cancel' | 'vault_create' | 'vault_mint_shares' | 'vault_burn_shares' | 'vault_force_burn' required

Which action layout the bytes are meant to be.

encoded_data, string required

ABI-encoded action data (the Action.data bytes), 0x-prefixed hex. Same value the *_debug routes return as encoded_data.

Response

Success

DecodeActionResponse required
action_type, 'order' | 'rfq_maker' | 'rfq_taker' | 'transfer' | 'external_transfer' | 'withdrawal' | 'liquidation' | 'set_session_key' | 'update_whitelisted_recipients' | 'delete_subaccount' | 'vault_deposit' | 'vault_withdraw' | 'vault_cancel' | 'vault_create' | 'vault_mint_shares' | 'vault_burn_shares' | 'vault_force_burn' required

Echoed back so a batch of probes stays attributable.

decoded, unknown required

Changes