top pairs
Returns 100 pairs, where since relative round is hours and time duration is 3600, sorted by USD, highest first: token address, token name, network, network bid, token ID, token symbol, quote token address and 16 more fields.
What it returns
- token address
- token name
- network
- network bid
- token ID
- token symbol
- quote token address
- quote token name
- quote token ID
- quote token symbol
- market ID
- market name
- market address
- protocol family
- protocol
- program
- close
- high
- low
- mean
- sum of volume USD
- calculate
- unique of interval time start
Filters
- since relative round is hours
- time duration is 3600
The query
query topPairs {
Trading {
Pairs(
orderBy: {descendingByField: "usd"}
limit: {count: 100}
where: {
Block: {
Time: {
after_relative: {
hours_ago: 24
}
}
}
Interval: {Time: {Duration: {eq: 3600}, Start: {since_relative: {hours_ago: 24, round: {in: hours}}}}}}
) {
Token {
Address
Name
Network
NetworkBid
Id
Symbol
}
QuoteToken {
Address
Name
Network
NetworkBid
Id
Symbol
}
Market {
Id
Name
Address
ProtocolFamily
Protocol
Network
NetworkBid
Program
}
Price {
Ohlc {
current_price: Close(
if: {Interval: {Time: {Start: {is_relative: {round: {in: hours}}}}}}
)
prev_price: Close(
if: {Interval: {Time: {Start: {is_relative: {hours_ago: 1, round: {in: hours}}}}}}
)
high_24h: High(
if: {Interval: {Time: {Duration: {eq: 3600}, Start: {since_relative: {hours_ago: 24, round: {in: hours}}}}}}
)
low_24h: Low(
if: {Interval: {Time: {Duration: {eq: 3600}, Start: {since_relative: {hours_ago: 24, round: {in: hours}}}}}}
)
}
Average {
current_mean: Mean(
if: {Interval: {Time: {Start: {is_relative: {round: {in: hours}}}}}}
)
hour_ago_mean: Mean(
if: {Interval: {Time: {Start: {is_relative: {hours_ago: 1, round: {in: hours}}}}}}
)
hour_24_ago_mean: Mean(
if: {Interval: {Time: {Start: {is_relative: {hours_ago: 24, round: {in: hours}}}}}}
)
}
}
usd: sum(of: Volume_Usd)
current_price: calculate(
expression: "if($Price_Ohlc_current_price=0, $Price_Ohlc_prev_price, $Price_Ohlc_current_price)"
)
diff_1h: calculate(
expression: "round(10000 * ($current_price - $Price_Average_hour_ago_mean) / $Price_Average_hour_ago_mean) / 100"
)
diff_24h: calculate(
expression: "round(10000 * ($current_price - $Price_Average_hour_24_ago_mean) / $Price_Average_hour_24_ago_mean) / 100"
)
volatility_24h: calculate(
expression: "round((abs($diff_24h) + (100 * ($Price_Ohlc_high_24h - $Price_Ohlc_low_24h) / $Price_Average_hour_24_ago_mean)) / 2, 2)"
)
intervals_with_volume: uniq(
of: Interval_Time_Start
if: {Volume: {Usd: {gt: 100000}}}
selectWhere: {ge: "22"}
)
}
}
}
Similar queries
- Elysium pair OHLC candles (WHYPE/USDC, 5 min) · Trading (all chains) · Pairs
- Elysium top trading pairs by USD volume, 24h · Trading (all chains) · Pairs
- arc mainnet minara pool price · Trading (all chains) · Pairs
- Arc Mainnet Trading: Latest price of a token (v2) · Trading (all chains) · Pairs
- save with commit · Trading (all chains) · Tokens