token price for solana

Returns the latest DEX trades on Solana, where buy currency mint address is HRw8mq…NuEP or Hk82ay…mKuL and sell currency mint address is So1111…1112: buy currency mint address, buy price, buy price in USD and sell currency mint address.

By gaurav · saved 12 August 2024 · run 20 times · Bitquery API v2

What it returns

Filters

The query

query CurrentPrices {
  token0: Solana {
    DEXTrades(
      limitBy: {count: 1, by: Trade_Buy_Currency_MintAddress}
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {MintAddress: {in: ["HRw8mqK8N3ASKFKJGMJpy4FodwR3GKvCFKPDQNqUNuEP", "Hk82ay38uGpYgqjdXXCiATavVQwAMaBNyxsUWbapmKuL"]}}}, Sell: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, Transaction: {Result: {Success: true}}}
    ) {
      Trade {
        Buy {
          Currency {
            MintAddress
          }
          Price
          PriceInUSD
        }
        Sell {
          Currency {
            MintAddress
          }
        }
      }
    }
  }
}

Similar queries