liquidity-in-recent week

Returns the latest DEX trade by token on Solana, where currency mint address is 6D7NaB…i5Ui and side currency mint address is So1111…1112: sum of trade amount, sum of trade side amount and block time.

By Kshitij Mahajan · saved 5 November 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {MintAddress: {is: "6D7NaB2xsLd7cauWu1wKk6KBsJohJmP2qZH9GEfVi5Ui"}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}}
      orderBy: {descendingByField: "Block_Timefield"}
      limit: {count: 1}
    ) {
      tokenLiquidity: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      wsolLiquidity: sum(
        of: Trade_Side_Amount
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      Block {
        Timefield: Time(interval: {in: weeks, count: 1})
      }
    }
  }
}

Similar queries