Added filters OHLC
Returns DEX trades by token on Polygon, where currency smart contract is 0x7ceb…f619, trade amount in USD is above 0 and side amount in USD is above 0, sorted by block time: block time, quantile of trade price in USD, average of trade price in USD, sum of trade side amount and count.
What it returns
- block time
- quantile of trade price in USD
- average of trade price in USD
- sum of trade side amount
- count
Filters
- currency smart contract is 0x7ceb…f619
- trade amount in USD is above 0
- side amount in USD is above 0
The query
query tradingView($network: evm_network, $token: String) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {ascendingByField: "Block_Time"}
where: {Trade: {
AmountInUSD: {gt: "0"}
Side: {
AmountInUSD: {gt: "0"}
}
Currency: {SmartContract: {is: $token}}}}
) {
Block {
Time(interval: {count: 5, in: minutes})
}
min: quantile(of: Trade_PriceInUSD, level: 0.1)
max: quantile(of: Trade_PriceInUSD, level: 0.9)
close: average(of: Trade_PriceInUSD)
open: average(of: Trade_PriceInUSD)
volume: sum(of: Trade_Side_Amount)
count
}
}
}
Variables
{
"network": "matic",
"token": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"
}
Similar queries
- polymarket trades api for specific asset id · Polygon · DEXTradeByTokens
- polymarket trades · Polygon · DEXTradeByTokens
- AfricaCryptoChainx · Ethereum · DEXTradeByTokens
- UniversalSearch EVM · Ethereum · DEXTradeByTokens
- top assets on polymarket · Polygon · DEXTradeByTokens