solana trades

Returns the latest 50 DEX trades by token on Solana, where side currency mint address is So1111…1112, currency mint address is 5z3iCe…pump and block time after 2024-11-14: block time, transaction signature, market address, protocol name, protocol family, side type, price in USD and 6 more fields.

By gaurav · saved 14 November 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($token: String, $base: String, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Currency: {MintAddress: {is: $base}}}, Block: {Time: {after: $time_ago}}}
    ) {
      Block {
        allTime: Time
      }
      Transaction {
        Signature
      }
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Side {
          Type
        }
        PriceInUSD
        Amount
        Side {
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "base": "5z3iCe53hUANTiG8Js8RjHNE2Arjik7L2CXLyr2rpump",
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2024-11-14T03:53:17Z"
}

Similar queries