fetchtokensWithMarketCapRange

Returns 10 DEX trades on Solana, where buy currency update authority is TSLvdd…eokM, DEX protocol name is pump_amm and block time since 2025-05-01, sorted by trade buy price, highest first: buy currency name, buy currency symbol, buy currency mint address, block time, signer and transaction signature.

By Murtaza Ali · saved 2 May 2025 · Bitquery API v2

What it returns

Filters

The query

query fetchtokensWithMarketCapRange($protocolName: String, $lower: Float, $higher: Float, 
  $sellAmountUSD: String, $since: DateTime, $updateAuthority: String, $programAddress: String) {
  Solana {
    DEXTrades(
      limitBy: {by: Trade_Buy_Currency_MintAddress, count: 1}
      limit: {count: 10}
      orderBy: {descending: Trade_Buy_Price}
      where: {
        Trade: {
          Dex: {
            ProtocolName: {
              is: $protocolName
            }
          }, 
          Buy: {
            Currency: {
              UpdateAuthority: {
                is: $updateAuthority
              }
            }, 
            PriceInUSD: {
              gt: $lower, 
              le: $higher
            }
          }, 
          Sell: {
            AmountInUSD: {
              gt: $sellAmountUSD
            }
          }
        }, 
        Transaction: {
          Result: {
            Success: true
          }
        }, 
        Block: {
          Time: {
            since: $since
          }
        }
      }				
    ) {
      Trade {
        Buy {
          Currency {
            Name
            Symbol
            MintAddress
          }
        }
      }
      joinTokenSupplyUpdates(
        TokenSupplyUpdate_Currency_MintAddress: Trade_Buy_Currency_MintAddress
        join: inner
        where: {
          Instruction: {
            Program: {
              Address: {
                is: $programAddress 
              }, 
              Method: {
                is: "create"
              }
            }
          }
        }
      ) {
        Block {
          Time
        }
        Transaction{
          Dev: Signer
          Signature
        }
      }
    }
  }
}

Variables

{
  "protocolName": "pump_amm",
  "lower": 0.000003,
  "higher": 0.000008,
  "since": "2025-05-01T08:20:00Z",
  "updateAuthority": "TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM",
  "programAddress": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P",
  "sellAmountUSD": "10"
}

Similar queries