Skip to main content
GET
/
v1
/
earn
/
ethereum
/
vaults
/
{vault_id}
Get earn vault details
curl --request GET \
  --url https://api.privy.io/v1/earn/ethereum/vaults/{vault_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'privy-app-id: <privy-app-id>'
HttpResponse<String> response = Unirest.get("https://api.privy.io/v1/earn/ethereum/vaults/{vault_id}")
  .header("privy-app-id", "<privy-app-id>")
  .header("Authorization", "Basic <encoded-value>")
  .asString();
const options = {
  method: 'GET',
  headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};

fetch('https://api.privy.io/v1/earn/ethereum/vaults/{vault_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.privy.io/v1/earn/ethereum/vaults/{vault_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Basic <encoded-value>",
    "privy-app-id: <privy-app-id>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.privy.io/v1/earn/ethereum/vaults/{vault_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("privy-app-id", "<privy-app-id>")
	req.Header.Add("Authorization", "Basic <encoded-value>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
{
  "id": "cm7oxq1el000e11o8iwp7d0d0",
  "name": "Aave USDC Vault",
  "provider": "aave",
  "vault_address": "0x1234567890abcdef1234567890abcdef12345678",
  "asset": {
    "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "symbol": "usdc",
    "decimals": 6
  },
  "caip2": "eip155:8453",
  "user_apy": 500,
  "app_apy": 50,
  "tvl_usd": 64000000,
  "available_liquidity_usd": 64000000,
  "admin_wallet_id": "fmfdj6yqly31huorjqzq38zc",
  "admin_wallet_address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
  "available_fees": "10000000"
}

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.

Path Parameters

vault_id
string
required

The Privy vault ID.

Response

200 - application/json

Vault details retrieved successfully.

Vault details for an Aave earn vault, including fee visibility.

id
string
required

Vault identifier.

name
string
required

Human-readable vault name from the yield provider.

vault_address
string
required

Onchain vault contract address.

asset
EarnAsset · object
required

Asset metadata for an earn vault position.

Example:
{
  "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "symbol": "usdc",
  "decimals": 6
}
caip2
string
required

CAIP-2 chain identifier (e.g. "eip155:8453").

user_apy
number | null
required

Annual percentage yield available to the user, after fees and excluding rewards, in basis points (e.g. 500 for 5%). 1 basis point = 0.01%.

app_apy
number | null
required

Annual percentage yield earned by the app from fee wrapper fees, in basis points.

tvl_usd
number | null
required

Total value locked in USD.

available_liquidity_usd
number | null
required

Available liquidity in USD.

admin_wallet_id
string
required

Privy wallet ID of the vault admin.

admin_wallet_address
string
required

EVM address of the vault admin wallet.

provider
enum<string>
required
Available options:
aave
available_fees
string
required

Fees available to collect, in smallest unit of the underlying asset.