OHLC Version Query

Open High Low Close prices by different Intervals

Returns DEX trades on Ethereum, where base currency is 0x1f98…f984 and date since 2024-04-02, sorted by time interval day, highest first: day, quote currency address, quote currency symbol, trade amount, count, expression, maximum of block and 3 more fields.

By developerjory · saved 4 April 2024 · run 24 times · Bitquery API v1

What it returns

Filters

The query

{
                    ethereum(network: ethereum) {
                        dexTrades(
                            options: {desc: "timeInterval.day"}
                            baseCurrency: {is:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}
                            date: {since: "2024-04-02"}
                        ) 
                        {
                           	timeInterval {
                                day(count: 1)
                            }
                            quoteCurrency {
                                address
                                symbol
                            }
                            tradeAmount(in: USD)
                            ethAmount: tradeAmount(in: ETH)
                            trades: count
                            eth_price: expression(get: "tradeAmount / ethAmount")
                            close_date_n_time: maximum(of:block , get: time)
                            close_quote_price: maximum(of:block , get: quote_price)
                            open_date_n_time: minimum(of:block , get: time)
                            open_quote_price: minimum(of: block, get: quote_price)
                            high_quote_price: maximum(of:quote_price , get: quote_price)
                            low_quote_price: minimum(of:quote_price , get: quote_price)
                            open_price: expression(get: "eth_price*open_quote_price")
                            close_price: expression(get: "eth_price*close_quote_price")
                            high_price: expression(get: "eth_price*high_quote_price")
                            low_price: expression(get: "eth_price*low_quote_price")
                        }
                    }
                }

Similar queries