Query missing data

Returns DEX trades and instructions on Solana, where program method is buy or sell, program name is pump and block height is at least 293862535: method, program name, buy amount, buy account address, buy currency name, buy currency symbol, buy currency mint address and 36 more fields.

By Tomas Krason · saved 22 January 2025 · run 29 times · Bitquery API v2

What it returns

Filters

The query

query SolanaStreamQuery($blockHeightMin: String!, $blockHeightMax: String!) {
  Solana {
    DEXTrades(
      where: {Instruction: {Program: {Method: {in: ["buy", "sell"]}, Name: {is: "pump"}}}, Transaction: {Result: {Success: true}}, Block: {Height: {ge: $blockHeightMin, le: $blockHeightMax}}}
    ) {
      Instruction {
        Program {
          Method
          Name
        }
      }
      Trade {
        Buy {
          Amount
          Account {
            Address
          }
          Currency {
            Name
            Symbol
            MintAddress
            Decimals
            Fungible
            Uri
          }
          PriceInUSD
        }
        Sell {
          Amount
          Account {
            Address
          }
          Currency {
            Name
            Symbol
            MintAddress
            Decimals
            Fungible
            Uri
          }
          PriceInUSD
        }
      }
      Transaction {
        Signature
        Result {
          Success
        }
        Index
      }
      Block {
        Height
        Time
      }
    }
    Instructions(
      where: {Block: {Height: {ge: $blockHeightMin, le: $blockHeightMax}}, any: [{Instruction: {Program: {Method: {is: "create"}, Name: {is: "pump"}}}, Transaction: {Result: {Success: true}}}, {Instruction: {Program: {Method: {is: "initialize2"}, Name: {is: "raydium_amm"}, Address: {is: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"}}}, Transaction: {Result: {Success: true}}}]}
    ) {
      Block {
        Height
        Time
      }
      Instruction {
        Index
        Accounts {
          Address
          IsWritable
          Token {
            Mint
            Owner
            ProgramId
          }
        }
        Program {
          Arguments {
            Name
            Type
            Value {
              ... on Solana_ABI_Json_Value_Arg {
                json
              }
              ... on Solana_ABI_Float_Value_Arg {
                float
              }
              ... on Solana_ABI_Boolean_Value_Arg {
                bool
              }
              ... on Solana_ABI_Bytes_Value_Arg {
                hex
              }
              ... on Solana_ABI_BigInt_Value_Arg {
                bigInteger
              }
              ... on Solana_ABI_Address_Value_Arg {
                address
              }
              ... on Solana_ABI_String_Value_Arg {
                string
              }
              ... on Solana_ABI_Integer_Value_Arg {
                integer
              }
            }
          }
          Method
          Name
          Address
        }
      }
      Transaction {
        Signature
        Result {
          Success
          ErrorMessage
        }
        Index
      }
    }
  }
}

Variables

{
  "blockHeightMin": "293862535",
  "blockHeightMax": "293862635"
}

Similar queries