Example query

Returns 100 DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4c…095c, quote currency is 0x5779…c8e5 and exchange name is Pancake or Pancake v2, sorted by time interval minute: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount and 4 more fields.

By Aleksey · saved 16 June 2021 · Bitquery API v1

What it returns

Filters

The query

query (
        $network: EthereumNetwork!,
  			$limit: Int!,
  			$contract: String!,
  			$dateFrom: ISO8601DateTime,
  			$timeFrame: Int!
    ) {
        ethereum(network: $network) {
            dexTrades(
                options: {limit: $limit, asc: "timeInterval.minute"}
                date:{since: $dateFrom}
                exchangeName: {in: ["Pancake", "Pancake v2"]}
                baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
                quoteCurrency: {is: $contract}

            ){
                timeInterval{
                    minute(count:$timeFrame)
                }
                baseCurrency {
                    symbol
                    address
                }
                baseAmount
                quoteCurrency{
                    symbol
                    address
                }
                quoteAmount
                trades:count
                quotePrice
                maximum_price: quotePrice(calculate: maximum)
                minimum_price: quotePrice(calculate: minimum)
                open_price: minimum(of: block, get: quote_price)
                close_price: maximum(of: block, get:quote_price)
            }
        }
    }


Variables

{
    
    "network":"bsc",
    "limit": 100,
    "contract":"0x5779a0879ab8d2298a3fc07e37664bf3cbb5c8e5",
    "dateFrom":"2021-06-15",
    "timeFrame": 60
    }

Similar queries