Skip to main content

Top Vaults

Query top vaults ranked by market cap, position count, or other metrics.

Query Structure​

query GetTopVaults($curveId: numeric!, $limit: Int!) {
vaults(
where: { curve_id: { _eq: $curveId } }
order_by: { market_cap: desc }
limit: $limit
) {
term_id
market_cap
total_shares
current_share_price
position_count
term {
atom { label image }
triple {
subject { label }
predicate { label }
object { label }
}
}
}
}

Interactive Example​

Query

query GetTopVaults($curveId: numeric!, $limit: Int!) {
  vaults(
    where: { curve_id: { _eq: $curveId } }
    order_by: { market_cap: desc }
    limit: $limit
  ) {
    term_id
    market_cap
    position_count
    term {
      atom { label image }
    }
  }
}

Variables

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

Best Practices​

  1. Order by market_cap for TVL ranking
  2. Filter by curve_id for specific bonding curve
  3. Include term data for display
  4. Use limit to show top N vaults