All trades for token

Returns the latest 50 DEX trades by token on Solana, where currency mint address is EKpQGS…zcjm and trade price is above 0: block time, program address, protocol family, protocol name, amount in USD, account owner, side type and 9 more fields.

By Nadia · saved 21 August 2024 · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($token: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Price: {gt: 0}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        allTime: Time
      }
      Trade {
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
        AmountInUSD
        Account {
          Owner
        }
        Side {
          Type
          Account {
            Address
            Owner
          }
        }
        Price
        Amount
        Side {
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "token": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm"
}

Similar queries