Skip to content

Instantly share code, notes, and snippets.

@sayon-bitquery
Created June 21, 2021 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sayon-bitquery/15aa2ae27f46ca1344c365c527a7c271 to your computer and use it in GitHub Desktop.
Save sayon-bitquery/15aa2ae27f46ca1344c365c527a7c271 to your computer and use it in GitHub Desktop.
TradingView#1 -- The GraphQL query
const QUERY = `
{
ethereum(network: ethereum) {
dexTrades(
options: {limit: 100, asc: "timeInterval.minute"}
date: {since: "2021-05-23"}
exchangeName: {is: "Uniswap"}
baseCurrency: {is: "0x910985ffa7101bf5801dd2e91555c465efd9aab3"}
quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
) {
timeInterval {
minute(count: 5)
}
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)
}
}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment