trades

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 account owner is GgdGnx…m32r: block time, transaction signature, market address, protocol name, protocol family, side type, price in USD and 6 more fields.

By Arthur · saved 28 October 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}}, Account: {Owner: {is: "GgdGnxFWdmspMyBTnv6baz5ppabA4LraU2hP1MBzm32r"}}}, 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": "CBdCxKo9QavR9hfShgpEBG3zekorAeD7W1jfq2o3pump",
  "token": "So11111111111111111111111111111111111111112",
  "time_ago": "2024-10-28T13:47:45Z"
}

Similar queries