Ethereum — Token price from top market (rank 1)
Prices WETH from its single top market rather than blending every pool — the recommended way to price one specific token. Replace `token` in the Variables pane, lowercase.
What it returns
- token symbol
- token name
- token address
- network
- quote token symbol
- quote token address
- market name
- market address
- open
- high
- low
- close
- mean
- is quoted in USD
- USD
- base
- quote
- block time
Filters
- token address is 0xc02a…6cc2
- token network is Ethereum
- ranking position is 1
- time duration is 60
The query
# Ethereum - Price & OHLC - Token price from top market (rank 1)
#
# Ranking: {Position: {eq: 1}} prices the token from its single top market
# instead of blending every pool, which is what you want when you care about
# one specific token.
#
# Keep Price: {IsQuotedInUsd: true} - the rank filter selects the market, not
# the denomination.
#
# GOTCHA: Token.Address is stored lowercase and the filter is case-sensitive.
# A checksummed address returns zero rows and no error.
#
# Bitquery V2 query - send it to https://streaming.bitquery.io/graphql
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
query ($token: String!, $network: String!) {
Trading {
Pairs(
where: {
Token: { Address: { is: $token }, Network: { is: $network } }
Ranking: { Position: { eq: 1 } }
Interval: { Time: { Duration: { eq: 60 } } }
Price: { IsQuotedInUsd: true }
}
orderBy: { descending: Block_Time }
limit: { count: 1 }
) {
Token { Symbol Name Address Network }
QuoteToken { Symbol Address }
Market { Name Address }
Price { Ohlc { Open High Low Close } Average { Mean } IsQuotedInUsd }
Volume { Usd Base Quote }
Block { Time }
}
}
}
Variables
{"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "network": "Ethereum"}
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