Vault Shareholders

private/request_vault_deposit

Changed on

Submits a signed deposit action from the user's source subaccount and enqueues it in the vault's pending-deposit queue for the curator to settle. Inputs are the target vault subaccount, the deposit asset, and the amount as a decimal string. Returns an acknowledgement with the queued request; requires the user-deposit permission.

post/private/request_vault_deposit

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

RequestVaultDepositRequest required

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

amount, string decimal required

Deposit amount in the vault's deposit asset, as a decimal string (e.g. "1").

deposit_spot_asset, string required

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

nonce, string required
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