https://community.bitquery.io/t/ethereum-token-quotes-using-dextrades-query-how-acccurate/422
Returns the latest DEX trade on Ethereum and BNB Chain, where base currency is 0x2eba…a943, quote currency is 0xbb4c…095c and tx hash is 0x6c26…f3ab: transaction hash, trade index, address address, contract type, currency name, timestamp time, unixtime and 7 more fields.
What it returns
- transaction hash
- trade index
- address address
- contract type
- currency name
- timestamp time
- unixtime
- block height
- base currency symbol
- base currency address
- quote currency symbol
- quote currency address
- quote price
- trade amount
Filters
- base currency is 0x2eba…a943
- quote currency is 0xbb4c…095c
- tx hash is 0x6c26…f3ab
- exchange name is Pancake v2
The query
{
ethereum(network: bsc) {
dexTrades(
options: {desc: ["block.height", "tradeIndex"], limit: 1}
exchangeName: {in: ["Pancake v2"]}
baseCurrency: {is: "0x2eba09fb8063aedba27424de9bf0dcb41567a943"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
txHash: {is: "0x6c26d2e320739be9022d8454fbdc68346e3a86c82224d0bd5c8b4ccb1ac2f3ab"}
) {
transaction {
hash
}
tradeIndex
smartContract {
address {
address
}
contractType
currency {
name
}
}
tradeIndex
block {
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
unixtime
}
height
}
baseCurrency {
symbol
address
}
quoteCurrency {
symbol
address
}
quotePrice
tradeAmount(in: USD)
}
}
}
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