Price of a token

Returns the latest 10 DEX trades on Polygon, where sell currency smart contract is 0x2C89…286b and buy currency smart contract is 0x0d50…1270: block time, buy amount, buy price, buy currency name, buy currency symbol, buy smart contract, sell amount and 4 more fields.

By Akshat · saved 11 April 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: matic) {
    DEXTrades(
      where: {Trade: {Sell: {Currency: {SmartContract: {is: "0x2C89bbc92BD86F8075d1DEcc58C7F4E0107f286b"}}}, Buy: {Currency: {SmartContract: {is: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"}}}}}
      limit: {count: 10}
      orderBy: {descending: Block_Time}
    ) {
      Block {
        Time
      }
      Trade {
        Buy {
          Amount
          Price_in_terms_of_buy_currency: Price
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
        Sell {
          Amount
          Price_in_terms_of_buy_currency: Price
          Currency {
            Symbol
            SmartContract
            Name
          }
        }
      }
    }
  }
}

Similar queries