Triple Vaults
Query the triple_vault view to get vault-level data for triples, including market cap, position counts, shares, and asset totals per curve.
Query Structureβ
query GetTripleVaults($termId: String!, $limit: Int!) {
triple_vaults(
where: { term_id: { _eq: $termId } }
order_by: { market_cap: desc }
limit: $limit
) {
term_id
counter_term_id
curve_id
total_assets
total_shares
market_cap
position_count
block_number
log_index
updated_at
}
}
Response Fieldsβ
| Field | Type | Nullable | Description |
|---|---|---|---|
term_id | String | No | Term ID |
counter_term_id | String | No | Counter-term ID |
curve_id | numeric | No | Bonding curve ID |
total_assets | numeric | No | Total assets in the vault |
total_shares | numeric | No | Total shares issued |
market_cap | numeric | No | Vault market capitalization |
position_count | bigint | No | Number of positions in this vault |
block_number | numeric | No | Block number of last update |
log_index | bigint | No | Log index |
updated_at | timestamptz | No | Last update timestamp |
Relationshipsβ
| Field | Type | Description |
|---|---|---|
term | terms | Term entity |
counter_term | terms | Counter-term entity |
Single Lookupβ
query GetTripleVault($termId: String!, $curveId: numeric!) {
triple_vault(term_id: $termId, curve_id: $curveId) {
total_assets
total_shares
market_cap
position_count
}
}
Interactive Exampleβ
Query
query GetTopTripleVaults($limit: Int!) {
triple_vaults(
order_by: { market_cap: desc }
limit: $limit
) {
term_id
counter_term_id
curve_id
market_cap
position_count
total_assets
total_shares
}
}Variables
Click "Run Query" to execute the GraphQL query and see results
Use Casesβ
Compare For/Against Vaultsβ
async function getTripleVaultPair(termId: string) {
const query = `
query GetVaultPair($termId: String!) {
for: triple_vault(term_id: $termId, curve_id: 1) {
total_assets
total_shares
market_cap
position_count
}
against: triple_vault(term_id: $termId, curve_id: 2) {
total_assets
total_shares
market_cap
position_count
}
}
`
return client.request(query, { termId })
}
Relatedβ
- Triple Terms - Aggregate stats across curves
- Counter Triples - Counter-triple relationships
- Vault Details - General vault queries