Specific trade query

Returns DEX trades on Solana, where program method is buy or sell and program name is pump, sorted by block height: method, program name, buy amount, buy account address, buy currency name, buy currency symbol, buy currency mint address and 20 more fields.

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

What it returns

Filters

The query

query SolanaStreamQuery($token: String!) {
    Solana {
        DEXTrades(
            where: {
                any: [
                    {
                        Trade: {Buy: { Currency: {MintAddress: {is: $token}}}}
                    },
                    {
                        Trade: {Sell: { Currency: {MintAddress: {is: $token}}}}
                    }
                ]
                Instruction: {Program: {Method: {in: ["buy", "sell"]}, Name: {is: "pump"}}}, Transaction: {Result: {Success: true}}
            }
            orderBy: {ascending: Block_Height}
        ) {
            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 {
                Signer
                Signature
                Result {
                    Success
                }
                Index
            }
            Block {
                Slot
                Height
                Time
            }
        }
    }
}

Variables

{
    "token": "HoJ15ykTrDBoVWXbgqBCkBfNgJFLkjtwsCb3cJnwpump"
}

Similar queries