joins eg working 2

Returns the latest 100 DEX trades by token on Solana, where currency mint address is not 111111…1111 and DEX protocol name is pump: currency name, currency symbol, currency mint address, trade price, price in USD, block time and slot.

By Divyasshree · saved 5 May 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    DEXTradeByTokens(
      where: {
        Trade: {
          Dex: { ProtocolName: { is: "pump" } }
          Currency: { MintAddress: { not: "11111111111111111111111111111111" } }
        }
        Transaction: { Result: { Success: true } }
      }
      limitBy: { by: Trade_Currency_MintAddress, count: 1 }
      limit: { count: 100 }
      orderBy: { descending: Block_Time }
    ) {
      Trade {
        Currency {
          Name
          Symbol
          MintAddress
        }
        Price
        PriceInUSD
      }
      Block {
        Time
        Slot
      }
      join1: joinDEXTradeByTokens(
        join: inner
        Trade_Currency_MintAddress: Trade_Currency_MintAddress
        where: {
          Block: { Time: { before: "2025-05-05T09:08:11Z" } }
        }
      ) {
        Trade {
          Currency {
            Name
            MintAddress
          }
        }
      }
      join2: joinDEXTradeByTokens(
        join: inner
        Trade_Currency_MintAddress: Trade_Currency_MintAddress
        where: {
          Trade: {
            PriceInUSD: { ge: 0.000012, le: 0.0003 }
          }
        }
      ) {
        Trade {
          Currency {
            Name
            MintAddress
          }
        }
      }
    }
  }
}

Similar queries