Average quote price for a given date and range
Provides the average quote price given a base token (e.g. TOSA), connector token (e.g. WETH) and the quote token (e.g. USD) between a range of datetimes.
What it returns
- minute
- base currency symbol
- base currency address
- base amount
- quote currency symbol
- quote currency address
- quote amount
- trade amount
- count
- quote price
- minimum of block
- maximum of block
Filters
- trade amount USD is above 0
The query
query ($startTime: ISO8601DateTime!, $endTime: ISO8601DateTime!, $baseAddress: String!,
$quoteAddress: String!, $connector1: String!,$interval: Int,$minAmount: Float){
ethereum(network: ethereum){
dexTrades(
any: [
{
baseCurrency: {is: $baseAddress}
quoteCurrency: {is: $quoteAddress}
},
{
baseCurrency: {is: $baseAddress}
quoteCurrency: {is: $connector1}
},
{
baseCurrency: {is: $connector1}
quoteCurrency: {is: $quoteAddress}
}
]
time: {between: [$startTime, $endTime]}
tradeAmountUsd: {gt: $minAmount}
){
timeInterval {
minute(format: "%FT%TZ", count: $interval)
}
buyCurrency: baseCurrency {
symbol
address
}
buyAmount: baseAmount
buyAmountInUsd: baseAmount
sellCurrency: quoteCurrency {
symbol
address
}
sellAmountInUsd: quoteAmount
tradeAmount(in: USD)
volume: quoteAmount
trades: count
high: quotePrice(calculate: maximum)
low: quotePrice(calculate: minimum)
open: minimum(of: block, get: quote_price)
close: maximum(of: block, get: quote_price)
}}
}
Variables
{"startTime":"2023-02-18T00:00:00", "endTime":"2023-02-19T00:00:00","interval": 5,"baseAddress":"0x59cEA536575D0A2688a81f95D9B89C738A177D06","quoteAddress":"0xdac17f958d2ee523a2206206994597c13d831ec7","connector1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","minAmount": 0}
Similar queries
- Latest Curve DEX swaps on Ethereum · Ethereum · DEXTrades
- Top Curve liquidity pools by 24h volume on Ethereum · Ethereum · DEXTrades
- STRN_TOKEN_MULTIPLE_DECIMALS_DEX_TRADES · Ethereum · DEXTrades
- USDT DECIMAL SHOWING 0 · Ethereum · DEXTrades
- Trades - 0xEE61159E8A72A08371c52D62c19Efd0C7914f917 · Ethereum · DEXTrades