Skip to main content
POST
/
v1
/
wallets
/
{wallet_id}
/
earn
/
ethereum
/
deposit
Earn deposit
curl --request POST \
  --url https://api.privy.io/v1/wallets/{wallet_id}/earn/ethereum/deposit \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '
{
  "vault_id": "cm7oxq1el000e11o8iwp7d0d0",
  "amount": "1.5"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "wallet_id": "fmfdj6yqly31huorjqzq38zc",
  "type": "earn_deposit",
  "caip2": "eip155:8453",
  "vault_id": "cm7oxq1el000e11o8iwp7d0d0",
  "vault_address": "0x1234567890abcdef1234567890abcdef12345678",
  "asset": "usdc",
  "asset_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "decimals": 6,
  "amount": "1.5",
  "raw_amount": "1500000",
  "share_amount": null
}

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.

Path Parameters

wallet_id
string
required

ID of the wallet.

Body

application/json

Input for depositing assets into an ERC-4626 vault. Exactly one of amount or raw_amount must be provided.

vault_id
string
required

The ID of the vault to deposit into.

amount
string

Human-readable decimal amount to deposit (e.g. "1.5" for 1.5 USDC). Exactly one of amount or raw_amount must be provided.

Required string length: 1 - 200
Pattern: ^\d+(\.\d+)?$
raw_amount
string

Amount in smallest unit to deposit (e.g. "1500000" for 1.5 USDC with 6 decimals). Exactly one of amount or raw_amount must be provided.

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

Response

200 - application/json

Earn deposit initiated successfully.

Response for an earn deposit action.

id
string
required

The ID of the wallet action.

status
enum<string>
required

The current status of the wallet action.

Available options:
pending,
succeeded,
rejected,
failed
wallet_id
string
required

The ID of the wallet involved in the action.

created_at
string<date-time>
required

ISO 8601 timestamp of when the wallet action was created.

type
enum<string>
required
Available options:
earn_deposit
caip2
string
required

CAIP-2 chain identifier.

vault_id
string
required

The vault ID.

vault_address
string
required

ERC-4626 vault contract address.

asset_address
string
required

Underlying asset token address.

raw_amount
string
required

Base-unit amount of asset deposited (e.g. "1500000").

share_amount
string | null
required

Vault shares received in base units. Populated after on-chain confirmation.

failure_reason
FailureReason · object

Top-level failure context for the wallet action. Present on rejected or failed actions when available.

steps
(EVMTransactionWalletActionStep · object | EVMUserOperationWalletActionStep · object | SVMTransactionWalletActionStep · object)[]

The steps of the wallet action. Only returned if ?include=steps is provided.

A wallet action step consisting of an EVM transaction.

asset
string

Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in the asset registry.

decimals
integer

Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only present when the token is known in the asset registry.

amount
string

Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when the token is known in the asset registry.