which dex token belongs too

Returns one DEX trade by token on Solana, where currency mint address is 3hFjKf…moon, block time since 2023-12-27 and block time till 2024-12-31, sorted by block time: program address, protocol family, protocol name and block time.

By gaurav · saved 31 December 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String, $time_ago: DateTime, $time_before: DateTime, $resolution: OLAP_DateTimeIntervalUnits, $space: Int) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      limit: {count: 1}
      orderBy: {ascendingByField: "Block_Time"}
      where: {Block: {Time: {since: $time_ago, till: $time_before}, Date: {}}, Trade: {Side: {Amount: {gt: "0"}}, Currency: {MintAddress: {is: $token}}}}
    ) {
      Trade {
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
      }
      Block {
        Time(interval: {count: $space, in: $resolution})
      }
    }
  }
}

Variables

{
  "token": "3hFjKff7if3BkK4fdmGf13KFM7twPCTh92fG8LRkmoon",
  "time_ago": "2023-12-27T00:00:00.000Z",
  "time_before": "2024-12-31T00:23:00.000Z",
  "space": 5,
  "resolution": "years"
}

Similar queries