Skip to main content

Triple Terms

Query the triple_term view to get aggregate statistics for triple-term pairs. Each record links a triple's term to its counter-term with position and market cap data.

Query Structure​

query GetTripleTerms($termId: String!, $limit: Int!) {
triple_terms(
where: { term_id: { _eq: $termId } }
order_by: { total_market_cap: desc }
limit: $limit
) {
term_id
counter_term_id
total_assets
total_market_cap
total_position_count
updated_at
term {
type
}
counter_term {
type
}
}
}

Response Fields​

FieldTypeNullableDescription
term_idStringNoTerm ID
counter_term_idStringNoCounter-term ID
total_assetsnumericNoTotal assets across vaults
total_market_capnumericNoCombined market cap
total_position_countbigintNoTotal number of positions
updated_attimestamptzNoLast update timestamp

Relationships​

FieldTypeDescription
termtermsTerm entity
counter_termtermsCounter-term entity

Single Lookup​

query GetTripleTerm($termId: String!) {
triple_term(term_id: $termId) {
term_id
counter_term_id
total_assets
total_market_cap
total_position_count
}
}

Interactive Example​

Query

query GetTripleTerms($limit: Int!) {
  triple_terms(
    order_by: { total_market_cap: desc }
    limit: $limit
  ) {
    term_id
    counter_term_id
    total_market_cap
    total_position_count
    updated_at
  }
}

Variables

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