Vault API

The Vault API provides access to vault information, protocol statistics, whitelisted assets, and transaction history. Most endpoints are public, but some require authentication for private vaults and admin operations.

Protocol Statistics

Get Protocol Stats

Get protocol-level statistics including total TVL, max APY, and user counts.

// Public endpoint - no authentication required
const stats = await sdk.vault.getProtocolStats();

console.log(`Total TVL: ${stats.stats.totalTvl}`);
console.log(`Max APY: ${stats.stats.maxApy}`);
console.log(`Total Users: ${stats.stats.totalUsers}`);
console.log(`Total Fund Managers: ${stats.stats.totalFundManagers}`);
console.log(`YPO: ${stats.stats.ypo}`);

Get Strategies

Get distinct strategy types available across all vaults.

// Public endpoint
const strategies = await sdk.vault.getStrategies();

console.log(`Available strategies: ${strategies.strategies.join(", ")}`);
// Example output: ["DeFi", "Trading", "Lending", ...]

Refresh Protocol Stats

Refresh protocol statistics (requires authentication).

Vault Information

Get All Vaults

Get a paginated list of vaults with optional filters.

Filter Options:

  • chainId - Filter by blockchain chain ID

  • status - Filter by vault status

  • strategy - Filter by strategy type

  • page - Page number (default: 1)

  • pageSize - Items per page (default: 20, max: 100)

Get Vault by Key

Get a specific vault by its key and chain ID.

Get Vault by Symbol

Get a vault by its symbol and chain ID.

Get Private Vault

Get a private vault (requires authentication).

Get Vault Details

Get detailed vault information including fact sheet data.

Get Vault FAQs

Get frequently asked questions for a vault.

Whitelisted Assets

Get Whitelisted Assets

Get all whitelisted assets for a vault.

Parameters:

  • vaultKey - Vault key identifier

  • chainId - Blockchain chain ID

  • includeInactive - Include inactive assets (default: false)

Get Whitelisted Asset

Get a specific whitelisted asset.

Check Asset Whitelisted

Check if an asset is whitelisted for a vault.

Add Whitelisted Asset

Add a new whitelisted asset (requires admin authentication).

Remove Whitelisted Asset

Remove a whitelisted asset (requires admin authentication).

Transactions

All transaction endpoints require authentication and implement role-based filtering:

  • Regular users: Automatically filtered to show only their own transactions

  • Admins/Moderators/Managers/LPs: Can see all transactions

Get Transactions

Get transactions with pagination and filters.

Filter Parameters:

  • chainId - Filter by blockchain chain ID

  • vaultAddress - Filter by vault address

  • userAddress - Filter by user address (admins only - regular users are automatically filtered)

  • receiverAddress - Filter by receiver address

  • assetAddress - Filter by asset address

  • type - Filter by transaction type: 'deposit' or 'redemption'

  • status - Filter by status: 'PENDING', 'PROCESSED', 'CANCELLED', 'NO-RETRY', or 'FAILED'

  • startDate - Filter by start date (ISO 8601 format)

  • endDate - Filter by end date (ISO 8601 format)

  • page - Page number (default: 1)

  • pageSize - Items per page (default: 20, max: 100)

Get Transaction by ID

Get a specific transaction by its ID.

Get Transaction by Hash

Get a transaction by its blockchain transaction hash.

Get Transaction Filter Options

Get available filter options for transactions.

Complete Example

Here's a complete example combining multiple Vault API calls:

Next Steps

  • Glassbook API - Partner transactions and referrals

  • Examples - More vault operation examples

Last updated