https://community.bitquery.io/t/get-token-quote-without-using-dextrades-query/427
Returns the latest 10 DEX trades and smart contract events on Ethereum and BNB Chain, where base currency is 0x2eba…a943, quote currency is 0xbb4c…095c and smart contract address is 0x6e55…0078: transaction hash, trade index, address address, contract type, currency name, timestamp time, unixtime and 10 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
- arguments value
- argument
- currency symbol
- protocol type
Filters
- base currency is 0x2eba…a943
- quote currency is 0xbb4c…095c
- smart contract address is 0x6e55…0078
- exchange name is Pancake v2
- smart contract event is Mint
- date since 2021-08-11
The query
{
price_of_a_token: ethereum(network: bsc) {
dexTrades(
options: {desc: ["block.height", "tradeIndex"], limit: 1}
exchangeName: {in: ["Pancake v2"]}
baseCurrency: {is: "0x2eba09fb8063aedba27424de9bf0dcb41567a943"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
height: {lteq: 9939882}
) {
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
}
}
addLiquidity: ethereum(network: bsc){
smartContractEvents(
options: {limit: 10}
date: {since: "2021-08-11"}
smartContractEvent: {is: "Mint"}
smartContractAddress: {is: "0x6e559a800e1c098029b0d7fccef14845f18b0078"}
){
arguments{
value
argument
}
smartContract{
address{
address
}
currency{
symbol
}
protocolType
}
}
}
}
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