Latest trades of a token

Returns the latest 50 DEX trades by token on Solana, where side currency mint address is So1111…1112, currency mint address is CBdCxK…pump and side amount is above 0: block time, program address, protocol family, protocol name, account owner, side type, side account address and 8 more fields.

By tsenre ng · saved 30 October 2024 · run 12 times · Bitquery API v2

What it returns

Filters

The query

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

Variables

{
  "token": "CBdCxKo9QavR9hfShgpEBG3zekorAeD7W1jfq2o3pump",
  "base": "So11111111111111111111111111111111111111112"
}

Similar queries