pairs-change

Returns 50 DEX trades on Ethereum, where quote currency is 0xC02a…6Cc2, time since 2025-01-05 and time till 2025-01-06, sorted by final, highest first: base currency symbol, base currency name, decimals, base currency address, quote currency name, quote currency address, minimum of block and 6 more fields.

By prisma · saved 7 January 2025 · run 1 time · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int, $from: ISO8601DateTime, $till: ISO8601DateTime, $quoteCurrencies: [String!], $exchangeAddresses: [String!]) {
        ethereum(network: $network) {
          dexTrades(
           quoteCurrency: {in: $quoteCurrencies}
            time: {since: $from, till: $till}
            options: {limit: $limit, desc: "final", limitBy: {each: "baseCurrency.address, quoteCurrency.address", limit: 1}}
            exchangeAddress: {in: $exchangeAddresses}
          ) {
            baseCurrency {
              symbol
              name
              decimals
              address
            }
            quoteCurrency {
              name
              address
            }
            open_price: minimum(of: block, get: quote_price)
            close_price: maximum(of: block, get: quote_price)
            open_price_time: minimum(of: block, get: time)
            close_price_time: maximum(of: block, get: time)
            diff: expression(get: "close_price - open_price")
            div: expression(get: "diff / open_price")
            final: expression(get: "div * 100")
            count
            tradeAmount(in: USD)
            quotePrice
            quoteAmount
            volume: quoteAmount(in: USD)
          }
        }
      }

Variables

{
  "network": "ethereum",
  "limit": 50,
  "from": "2025-01-05T19:23:51Z",
  "till": "2025-01-06T19:23:51Z",
  "quoteCurrencies": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"],
  "exchangeAddress":["0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"]
}

Similar queries