BNTswap

Returns DEX trades and transactions on Ethereum, where base currency is 0x1f57…ff1c, quote currency is 0x1f57…ff1c and exchange name is Bancor Network, sorted by date date: minute, base currency symbol, quote currency symbol, count, quote price, gas value, trade amount and 2 more fields.

By gaurav · saved 20 September 2021 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $since: ISO8601DateTime, $till: ISO8601DateTime, $baseCurrency: String!) {
  ethereum(network: $network) {
    BNTswap: dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: $since, till: $till}
      exchangeName: {is: "Bancor Network"}
      baseCurrency: {is: $baseCurrency}
    ) {
      timeInterval {
        minute(count: 1)
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      trades: count
      quotePrice
      gasValue
      tradeAmount(in: USD, calculate: sum)
    }
    ETHswap: dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: $since, till: $till}
      exchangeName: {is: "Bancor 1"}
      quoteCurrency: {is: $baseCurrency}
    ) {
      timeInterval {
        minute(count: 1)
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
    }
    AvgGas: transactions(
      options: {asc: "date.date"}
      date: {since: $since, till: $till}
    ) {
      date {
        date: startOfInterval(unit: day)
      }
      avgGasPrice: gasPrice(calculate: average)
      gasValueAvg: gasValue(calculate: average)
    }
  }
}

Variables

{
  "network": "ethereum",
  "since": "2021-07-01",
  "till": "2021-07-02",
  "baseCurrency": "0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c"
}

Similar queries