For the complete documentation index, see llms.txt. This page is also available as Markdown.

Withdraw from vault

Redeem vault shares and withdraw funds from a vault.

POST /api/v1/lake/withdraw

The operation type for signing is "withdraw_from_lake".

Use this endpoint to redeem shares from a vault. Withdrawals are idempotent when an idempotency_key is supplied.

Request Body

Field
Type
Need
Description
Example

"account"

string

required

Depositor wallet address

42trU9A5...

"signature"

string

required

Cryptographic signature

5J3mBbAH...

"timestamp"

integer

required

Current timestamp in milliseconds

1716200000000

"lake"

string

required

Vault address

AbCdEfGh123456789...

"shares"

decimal string

required

Number of shares to redeem

50.00

"idempotency_key"

UUID string

optional

Client-generated key to prevent duplicate withdrawals

550e8400-e29b-41d4-a716-446655440000

"agent_wallet"

string

optional

Agent wallet address

69trU9A5...

"expiry_window"

integer

optional

Signature expiry in milliseconds

30000

{
  "account": "42trU9A5...",
  "signature": "5J3mBbAH...",
  "timestamp": 1716200000000,
  "lake": "AbCdEfGh123456789...",
  "shares": "50.00",
  "idempotency_key": "550e8400-e29b-41d4-a716-446655440000"
}

Response

  • Status 200: Withdrawal successful

Field
Type
Description

'amount_withdrawn'

decimal string

USDC returned to the depositor

  • Status 400: Invalid request parameters

  • Status 401: Unauthorized access

  • Status 409: Duplicate idempotency key

  • Status 500: Internal server error

Last updated