Transfers & Withdrawals

private/withdraw

Changed on

Submits a signed request to withdraw a spot asset out of a subaccount. You provide the subaccount id, asset name, amount in underlying units, a nonce, the signer, an EIP-712 signature with its expiry, and the maximum sequencer fee (in USD) you authorise; setting force_batch controls whether the withdrawal is batched. Requires a session key with withdraw permission, and returns the accepted operation id and its uuid for tracking.

post/private/withdraw

Request

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

Request body

PrivateWithdrawRequest required
amount_in_underlying, string required
asset_name, string required
force_batch, boolean required
max_fee_usd, string decimal required

Maximum sequencer fee the signer authorises, in USD, as a decimal string (e.g. "1.5") or a JSON number.

nonce, string required
recipient, string nullable

L1 address the funds are paid out to. Defaults to the subaccount's owner wallet when omitted.

Owners and all-subaccount admin keys may withdraw to any recipient. All other session keys may only withdraw to: - owner wallet, or - address in whitelisted_recipients

signature, string required
signature_expiry_sec, integer required
signer, string required
subaccount_id, integer required

Response

Success

PrivateWithdrawResponse required
op_uuid, string required
operation_id, integer required

Changes

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status