liquidity-change-in-recent-month

Historical data This query already reads history - it uses the combined dataset, which needs the historical data add-on for this chain. Without the add-on it fails with 'access restricted: your plan only allows realtime'. Drop the dataset argument to fall back to the recent window. Datasets: https:

By Kshitij Mahajan · saved 5 November 2024 · run 55 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query already reads history - it uses the combined dataset, which
#   needs the historical data add-on for this chain.
#
#   Without the add-on it fails with 'access restricted: your plan only allows
#   realtime'. Drop the dataset argument to fall back to the recent window.
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query MyQuery {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {
            MintAddress: {
              is: "6D7NaB2xsLd7cauWu1wKk6KBsJohJmP2qZH9GEfVi5Ui"
            }
          },
          Side: {
            Currency: {
              MintAddress: {
                is: "So11111111111111111111111111111111111111112"
              }
            }
          },
          Market: {
            MarketAddress: {
              is: "BSzedbEvWRqVksaF558epPWCM16avEpyhm2HgSq9WZyy"
            }
          }
        }
      }
      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: months, count: 1})
      }
      Trade {
        Market {
          MarketAddress
        }
      }
    }
  }
}

Similar queries