Liquidity Provider (LP) API

Query and subscribe to liquidity pool data including vaults, deposits, withdrawals, and revenue tracking.

Table of Contents

Queries

vaults

List all liquidity vaults with their metrics.

Signature:

Parameters:

  • where: Filter object (optional)

    • address: Filter by vault address

  • limit: Max results

  • offset: Skip results

  • order_by: Sort by address

  • order_desc: Sort descending

Returns: Array of LpVault objects

Example - Get All Vaults:

Example - Get Specific Vault:

Key Fields Explained:

  • tvl: Total value locked in the vault

  • sharePrice: Current value of one vault share

  • apy: Annual percentage yield (annualized return)

  • availableAssets: Assets not currently in open positions

  • currentEpoch: Current epoch number

  • epochStart: Unix timestamp when current epoch started

Use Cases:

  • Display vault list with metrics

  • Compare vault performance

  • Show available liquidity

  • Calculate potential returns


deposits

Get user deposits in vaults.

Signature:

Parameters:

  • where: Filter object (optional)

    • depositor: Filter by depositor address

    • vault: Filter by vault address

  • limit: Max results

  • offset: Skip results

  • order_by: Sort by depositor or vault

  • order_desc: Sort descending

Returns: Array of LpDeposit objects

Example - Get User Deposits:

Example - Calculate Deposit Value:

To calculate value:

Use Cases:

  • Display user's LP positions

  • Calculate total deposited value

  • Track share ownership

  • Portfolio management


depositHistory

Get historical deposit and withdrawal events.

Signature:

Parameters:

  • where: Filter object (optional)

    • depositor: Filter by depositor address

    • vault: Filter by vault address

  • limit: Max results

  • offset: Skip results

  • order_by: Sort by depositor, sequence, or vault

  • order_desc: Sort descending

Returns: Array of LpDepositHistoryItem objects

Example - Get Deposit History:

Example - Filter Vault History:

Key Fields:

  • isWithdraw: true for withdrawals, false for deposits

  • amount: Amount of collateral deposited/withdrawn

  • shares: Shares minted (deposit) or burned (withdrawal)

Use Cases:

  • Build activity timeline

  • Track deposit/withdrawal events

  • Audit vault operations

  • Calculate historical returns


withdrawRequests

Get pending withdrawal requests.

Signature:

Parameters:

  • where: Filter object (optional)

    • depositor: Filter by depositor address

    • vault: Filter by vault address

  • limit: Max results

  • offset: Skip results

  • order_by: Sort by depositor, unlock_epoch, or vault

  • order_desc: Sort descending

Returns: Array of LpWithdrawRequest objects

Example - Get User Withdrawals:

Example - Check Withdrawal Status:

To check if ready:

Key Fields:

  • status: Withdrawal request status

  • unlockEpoch: Epoch when withdrawal becomes available

  • autoRedeem: If true, automatically redeemed when unlocked

Use Cases:

  • Display pending withdrawals

  • Calculate withdrawal timing

  • Show estimated withdrawal value

  • Notify when ready


epochDurationDays

Get epoch duration in days.

Signature:

Example:


epochDurationHours

Get epoch duration in hours.

Signature:


Subscriptions

Subscribe to real-time LP data updates.

lpVaults

Subscribe to all vault updates.

Signature:

Example:

Use Cases:

  • Real-time TVL tracking

  • Live APY updates

  • Monitor available liquidity

  • Track epoch changes


lpDeposits

Subscribe to user deposit updates.

Signature:

Example:

Use Cases:

  • Update user portfolio in real-time

  • Track share balance changes

  • Monitor position value


lpDepositHistory

Subscribe to deposit/withdrawal events.

Signature:

Example:

Use Cases:

  • Real-time activity feed

  • Instant transaction notifications

  • Live history updates


lpWithdrawRequests

Subscribe to withdrawal request updates.

Signature:

Example:

Use Cases:

  • Notify when withdrawal ready

  • Track withdrawal status

  • Update UI when unlocked


Types Reference

LpVault

LpDeposit

LpDepositHistoryItem

LpWithdrawRequest

RevenueInfo

Tracks vault revenue and performance.


Calculations

Deposit Value

Estimated Withdrawal Value

Time Until Withdrawal

APY Calculation

APY is calculated from historical revenue:

Last updated