bounded price changes
Returns one DEX trade on Ethereum, where buy currency is 0xc02a…6cc2, sell currency is 0xa0b8…eb48 and exchange name is Uniswap, sorted by block height: price and block height.
What it returns
- price
- block height
Filters
- buy currency is 0xc02a…6cc2
- sell currency is 0xa0b8…eb48
- exchange name is Uniswap
- height is below 12833155
- height is above 12833254
The query
query BoundedPriceChanges($network: EthereumNetwork!, $exchangeName: String!, $buyCurrency: String!, $sellCurrency: String!, $lower: Int!, $upper: Int!) {
ethereum(network: $network) {
during: dexTrades(
exchangeName: {is: $exchangeName}
options: {asc: "block.height"}
buyCurrency: {is: $buyCurrency}
sellCurrency: {is: $sellCurrency}
height: {between: [$lower, $upper]}
) {
price
block {
height
}
}
before: dexTrades(
exchangeName: {is: $exchangeName}
options: {limit: 1, desc: "block.height"}
buyCurrency: {is: $buyCurrency}
sellCurrency: {is: $sellCurrency}
height: {lt: $lower}
) {
price
block {
height
}
}
after: dexTrades(
exchangeName: {is: $exchangeName}
options: {limit: 1, asc: "block.height"}
buyCurrency: {is: $buyCurrency}
sellCurrency: {is: $sellCurrency}
height: {gt: $upper}
) {
price
block {
height
}
}
}
}
Variables
{
"network": "ethereum",
"exchangeName": "Uniswap",
"buyCurrency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"sellCurrency": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"lower": 12833155,
"upper": 12833254
}
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