subscribe-matic-example
Returns 10 DEX trades on Ethereum and Polygon, where trade amount USD is above 10, sorted by time interval minute, highest first: second, base currency symbol, base currency address, quote currency symbol, quote currency address, quote amount, quote price and 2 more fields.
What it returns
- second
- base currency symbol
- base currency address
- quote currency symbol
- quote currency address
- quote amount
- quote price
- minimum of block
- maximum of block
Filters
- trade amount USD is above 10
The query
query (
# $from: ISO8601DateTime!,
# $to: ISO8601DateTime!,
$baseAddress: String
) {
ethereum(network: matic) {
dexTrades(
options: {limit: 10, desc: "timeInterval.minute"}
# date: {between: [$from, $to]}
# time: {between: [$from, $to]}
any: [{baseCurrency: {is: $baseAddress}, quoteCurrency: {is: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}}, {baseCurrency: {is: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}, quoteCurrency: {is: "0x2b21ca040e745704a2b5eca8aada6b603d8a46fd"}}]
tradeAmountUsd: {gt: 10}
) {
timeInterval {
minute: second(count: 10)
}
baseCurrency {
symbol
address
}
quoteCurrency {
symbol
address
}
volume: quoteAmount
low: quotePrice(calculate: minimum)
high: quotePrice(calculate: maximum)
open: minimum(of: block, get: quote_price)
close: maximum(of: block, get: quote_price)
}
}
}
Variables
{
"baseAddress": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"
}
Similar queries
- trades · Ethereum · DEXTrades
- matic_DEXTrades · Polygon · DEXTrades
- prediction_dextrades · Polygon · DEXTrades
- matic MAPU trades · Polygon · DEXTrades
- List of DEX supported · Polygon · DEXTrades