query with index
Returns DEX trades on Ethereum and BNB Chain, sorted by block height transaction index, highest first: block height, timestamp time, trade index, transaction index, transaction hash, buy currency symbol, buy currency address and 5 more fields.
What it returns
- block height
- timestamp time
- trade index
- transaction index
- transaction hash
- buy currency symbol
- buy currency address
- sell currency symbol
- sell currency address
- buy amount
- sell amount
- price
The query
query ($fromBlock: Int, $toBlock: Int) {
ethereum(network: bsc) {
dexTrades(
height: {gteq: $fromBlock, lteq: $toBlock}
options: {desc: ["block.height", "transaction.index"]}
) {
block {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
tradeIndex
transaction {
index
hash
}
buyCurrency {
symbol
address
}
sellCurrency {
symbol
address
}
buyAmount
sellAmount
price
}
}
}
Variables
{
"fromBlock": 720000,
"toBlock": 725000
}
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