LatestTrades

Streams the latest 50 DEX trades by token on Solana as they happen, where block time after 2024-12-11 and side amount is above 0: block time, transaction signature, market address, protocol name, protocol family, side type, price in USD and 6 more fields.

By breezeysunset · saved 11 December 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription LatestTrades($time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {}}}, Currency: {}}, 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": "MEFNBXixkEbait3xn9bkm8WsJzXtVsaJEn4c8Sam21u",
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2024-12-11T04:26:25Z"
}

Similar queries