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.

By Sayon · saved 20 August 2021 · run 7 times · Bitquery API v1

What it returns

Filters

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