Last active
April 3, 2022 10:40
-
-
Save buddies2705/0cfed972b7317f73e3ac58ac35a87801 to your computer and use it in GitHub Desktop.
OHLC data for currency pair on DEX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum(network: ethereum) { | |
dexTrades(options: {limit: 10, asc: "timeInterval.minute"}, | |
protocol: {is: "Uniswap v2"}, | |
date: {is: "2020-10-10"} | |
buyCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}, | |
sellCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}) { | |
timeInterval { | |
minute(count: 5) | |
} | |
buyCurrency { | |
symbol | |
address | |
} | |
buyAmount | |
sellCurrency { | |
symbol | |
address | |
} | |
sellAmount | |
trades: count | |
maximum_price: price(calculate: maximum) | |
minimum_price: price(calculate: minimum) | |
open_price: minimum(of: block, get: price) | |
close_price: maximum(of: block, get: price) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment