Trading query
Returns 500 DEX trades on Ethereum and BNB Chain, where base currency is 0x2170…33f8, quote currency is 0xbb4c…095c and time before 2023-01-21, sorted by time interval minute, highest first: minute, base currency symbol, base currency address, base amount, trade amount, quote currency symbol, quote currency address and 5 more fields.
What it returns
- minute
- base currency symbol
- base currency address
- base amount
- trade amount
- quote currency symbol
- quote currency address
- quote amount
- count
- quote price
- minimum of block
- maximum of block
Filters
- base currency is 0x2170…33f8
- quote currency is 0xbb4c…095c
- time before 2023-01-21
- price asymmetry is below 0.7
The query
query getTradingData($baseAddress: String, $quoteAddress: String, $from: ISO8601DateTime!, $interval: Int, $limit: Int, $offset: Int, $network: EthereumNetwork!) {
ethereum(network: $network) {
dexTrades(
baseCurrency: {is: $baseAddress}
quoteCurrency: {is: $quoteAddress}
time: {before: $from}
options: {limit: $limit, offset: $offset, desc: "timeInterval.minute"}
priceAsymmetry: {lt: 0.7}
any: [{tradeAmountUsd: {gt: 0.00001}}, {tradeAmountUsd: {is: 0}}]
) {
timeInterval {
minute(format: "%FT%TZ", count: $interval)
}
buyCurrency: baseCurrency {
symbol
address
}
buyAmount: baseAmount
buyAmountUSD: baseAmount(in: USDT)
tradeAmount(in: USD)
sellCurrency: quoteCurrency {
symbol
address
}
volume: quoteAmount(in: USDT)
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
{
"from": "2023-01-21T06:40:06.956Z",
"interval": 30,
"baseAddress": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
"quoteAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"limit": 500,
"offset": 0,
"network": "bsc"
}
Similar queries
- Latest DODO DEX swaps on BSC · BNB Chain · DEXTrades
- Top DODO liquidity pools by 24h volume on BSC · BNB Chain · DEXTrades
- trades · Ethereum · DEXTrades
- metric_v1_bsc · BNB Chain · DEXTrades
- bsc_tessera · BNB Chain · DEXTrades