Vault Shareholders

private/request_vault_withdraw

Changed on

Submits a signed withdraw action that enqueues a request to burn a given number of vault shares and redeem the proceeds to the user's subaccount. Inputs are the vault subaccount and the share quantity to burn (decimal string). Returns an acknowledgement with the queued request; requires the user-withdraw permission.

post/private/request_vault_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

RequestVaultWithdrawRequest required

Fields common to every signed vault action. They appear alongside each endpoint's action-specific parameters in the same request object.

nonce, string required
shares_to_burn, string decimal required

Number of vault shares to burn, as a decimal string.

signature, string required

0x-prefixed hex of the 65-byte EOA signature.

signature_expiry_sec, integer required
signer, string required

20-byte Ethereum address as a 0x-prefixed lowercase hex string.

subaccount_id, integer required

The subaccount the action is signed on; which subaccount applies depends on the specific method — see that method's reference.

vault_subaccount_id, integer required

Response

Success

VaultRequestAckResponse required

Returned by request_vault_deposit / request_vault_withdraw: the id the queued request was assigned (the user's handle for polling / cancelling).

request_id, VaultRequestId required

Composite vault request id: (vault_subaccount_id, wallet, vault_nonce)

Useful as a stable dedup key across off-chain and on-chain vault events.

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