Hello, is there a query to get all the pools with related data existing on Ethereum?
This one is to get top Uniswap pools, you can do it for other exchanges using this as reference.
query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $exchange: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
ethereum(network: $network) {
dexTrades(
options: {desc: "tradeAmount", limit: $limit, offset: $offset, limitBy: {each: "smartContract.address.address", limit: 1}}
date: {since: $from, till: $till}
exchangeName: {is: $exchange}
) {
smartContract {
address {
address
}
}
sellCurrency {
symbol
address
}
sellAmount
buyCurrency {
symbol
address
}
buyAmount
count
median_price: price(calculate: median)
last_price: maximum(of: block, get: price)
dates: count(uniq: dates)
started: minimum(of: date)
tradeAmount(calculate: sum, in: USD)
}
}
}
Parameters
{
"limit": 10,
"offset": 0,
"network": "ethereum",
"exchange": "Uniswap",
"from": "2022-11-30",
"till": "2022-12-30",
"dateFormat": "%Y-%m-%d"
}