Price per block
See the price per block, before, during and after the block
Returns one DEX trade on Ethereum and BNB Chain, where buy currency is 0x603c…9a95, sell currency is 0xbb4c…095c and base currency is 0xbb4c…095c, sorted by block height: price, block height, timestamp time and quote price.
What it returns
- price
- block height
- timestamp time
- quote price
Filters
- buy currency is 0x603c…9a95
- sell currency is 0xbb4c…095c
- base currency is 0xbb4c…095c
- quote currency is 0xe9e7…7d56
The query
query prices($lower: Int!, $upper: Int!) {
ethereum(network: bsc) {
during: dexTrades(
options: {asc: "block.height"}
buyCurrency: {is: "0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95"}
sellCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
price
block(height: {between: [$lower, $upper]}) {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
}
before: dexTrades(
options: {limit: 1, desc: "block.height"}
buyCurrency: {is: "0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95"}
sellCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
price
block(height: {lt: $lower}) {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
}
after: dexTrades(
options: {limit: 1, asc: "block.height"}
buyCurrency: {is: "0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95"}
sellCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
price
block(height: {gt: $upper}) {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
}
bnb_price: dexTrades(
options: {limit: 1, asc: "block.height"}
baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
) {
block(height: {between: [$lower, $upper]}) {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
quotePrice
}
}
}
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