Applying condition on results of another - update

Returns the latest 100 DEX trades by token on Solana, where currency mint address is not 111111…1111, DEX protocol name is pump and block time before 2025-05-05: currency name, currency symbol, currency mint address, market address, side currency mint address, side currency name, side currency symbol and 2 more fields.

By gaurav · saved 5 May 2025 · run 7 times · Bitquery API v2

What it returns

Filters

The query

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

Similar queries