Skip to main content
POST
/
v1
/
wallets
/
{wallet_id}
/
ethereum_yield_deposit
Deposit into Vault
curl --request POST \
  --url https://api.privy.io/v1/wallets/{wallet_id}/ethereum_yield_deposit \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '
{
  "vault_id": "cm7oxq1el000e11o8iwp7d0d0",
  "asset_amount": "1000000"
}
'
{
  "id": "cm7oxq1el000e11o8iwp7d0d0",
  "wallet_id": "fmfdj6yqly31huorjqzq38zc",
  "vault_id": "cm7oxq1el000e11o8iwp7d0d0",
  "type": "deposit",
  "status": "pending",
  "asset_amount": "1000000",
  "share_amount": "987654321",
  "created_at": 1631573050000,
  "updated_at": 1631573050000
}

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

privy-authorization-signature
string

Request authorization signature. If multiple signatures are required, they should be comma separated.

privy-request-expiry
string

Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.

privy-idempotency-key
string

Idempotency keys ensure API requests are executed only once within a 24-hour window.

Path Parameters

wallet_id
string
required

ID of the wallet.

Body

application/json

Input for depositing assets into an ERC-4626 vault.

vault_id
string
required

The ID of the vault to deposit into.

asset_amount
string
required

The amount of the underlying asset to deposit, in the smallest unit (e.g., wei for ETH, 6 decimals for USDC). Must be a non-negative integer string.

Required string length: 1 - 78
Pattern: ^\d+$

Response

200 - application/json

Yield sweep created successfully.

A yield sweep record representing a deposit or withdrawal.

id
string
required

Unique identifier for the yield sweep.

wallet_id
string
required

The ID of the wallet involved in the sweep.

vault_id
string
required

The ID of the vault involved in the sweep.

type
enum<string>
required

Type of yield sweep.

Available options:
deposit,
withdraw
status
enum<string>
required

Status of a yield sweep.

Available options:
pending,
confirmed,
failed
asset_amount
string | null
required

The amount of underlying assets involved. Set after the sweep is confirmed on-chain.

share_amount
string | null
required

The amount of vault shares involved. Set after the sweep is confirmed on-chain.

created_at
number
required

Unix timestamp of when the sweep was created, in milliseconds.

updated_at
number
required

Unix timestamp of when the sweep was last updated, in milliseconds.