End User Accounts

Withdraw from a vault

Changed on

Withdraws the vault's underlying asset (e.g. USDC) from an end user's EVM account's position in a vault. The end user signs an EIP-2612 permit over their vault shares authorizing the withdrawal, and the share approval and withdrawal are executed in a single transaction. The transaction hash is returned in the response. For withdrawals from EVM Smart Accounts, use withdrawFromVaultWithEndUserEvmSmartAccount instead. Provide either amount or withdrawAll: true. The amount field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50") in the standard unit denomination of the vault's underlying asset. Set withdrawAll to true to withdraw the entire position: every vault share held by the account is redeemed, so no residual shares remain from interest that accrues before execution.

post/v2/embedded-wallet-api/end-users/{userId}/evm/{address}/lend/withdraw

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

userId, string required

The ID of the end user.

address, string required

A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).

Example:0x742d35Cc6634C0532925a3b844Bc454e4438f44e

The 0x-prefixed address of the EVM account to withdraw from.

Query parameters

projectID, string
Example:8e03978e-40d5-43e8-bc93-6894a57f9324

The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).

Headers

X-Wallet-Auth, string required

A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.

Request body

EoaVaultWithdrawRequest required

A request to withdraw the vault's underlying asset (e.g. USDC) from a vault position held by an end user's EVM account. The end user signs an EIP-2612 permit over their vault shares authorizing the withdrawal, and the share approval and withdrawal are executed in a single transaction.

Example request

{
  "vaultId": "vault_019f5f10-096a-7a23-86df-f479650d813f",
  "amount": "25.50",
  "withdrawAll": true,
  "receiver": "0x1234567890123456789012345678901234567890",
  "maxSlippageBps": 100,
  "walletSecretId": "e051beeb-7163-4527-a5b6-35e301529ff2"
}

Response

Successfully broadcast the withdrawal.

EoaVaultWithdrawResponse required

The result of a vault withdrawal from an EOA after broadcast.

transactionHash, string required

The hash of the broadcast withdrawal transaction, as a 0x-prefixed hex string.

Example response

{
  "transactionHash": "0xf8f98fb6726fc936f24b2007df5cb20e2b8444ff3dfaa2a929335f432a9be2e7"
}

Changes