liquidity-change-in-recent-month

Returns the latest DEX trades by token on Solana, where currency mint address is eL5fUx…pump, side currency mint address is So1111…1112 and market market address is 78sBWy…xx4z: sum of trade amount, sum of trade amount in USD, sum of trade side amount in USD, sum of trade side amount, block time and market address.

By Eduard · saved 2 January 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token_address: String, $pool_address: String) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {MintAddress: {is: $token_address}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}, Market: {MarketAddress: {is: $pool_address}}}}
      orderBy: {descendingByField: "Block_Timefield"}
    ) {
      negativeChangeTokenLiquidity: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      negativeChangeTokenLiquidityInUSD: sum(of: Trade_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
      positiveChangeTokenLiquidity: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      positiveChangeTokenLiquidityInUSD: sum(of: Trade_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
      
      positiveChangeWSolLiquidityInUSD: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      positiveChangeWSolLiquidity: sum(
        of: Trade_Side_Amount
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      negativeChangeWSolLiquidityInUSD: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      negativeChangeWSolLiquidity: sum(
        of: Trade_Side_Amount
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      Block {
        Timefield: Time
      }
      Trade {
        Market {
          MarketAddress
        }
      }
    }
  }
}

Variables

{
  "token_address": "eL5fUxj2J4CiQsmW85k5FG9DvuQjjUoBHoQBi2Kpump",
  "pool_address": "78sBWyimVhLumzZg1bdMD6ogGig8QpmgYZqCXNyMxx4z"
}

Similar queries