Skip to main content

Vault Details

Fetch comprehensive vault statistics including shares, assets, price, and positions.

Query Structure​

query GetVault($termId: String!, $curveId: numeric!) {
vault(term_id: $termId, curve_id: $curveId) {
term_id
curve_id
total_shares
total_assets
current_share_price
market_cap
position_count
}
}

Interactive Example​

Query

query GetVaultStats($termId: String!, $curveId: numeric!) {
  vault(term_id: $termId, curve_id: $curveId) {
    term_id
    curve_id
    total_shares
    total_assets
    current_share_price
    market_cap
    position_count
    positions_aggregate {
      aggregate {
        count
        sum { shares }
        avg { shares }
      }
    }
  }
}

Variables

Click "Run Query" to execute the GraphQL query and see results

Best Practices​

  1. Use composite key (term_id, curve_id) for lookup
  2. Include aggregates for statistics
  3. Cache market data as it updates frequently