Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Latest trades of a specific currency pair on a DEX protocol
{
ethereum(network: ethereum) {
dexTrades(options: {limit: 10, desc: ["block.height", "tradeIndex"]},
protocol: {is: "Uniswap v2"},
buyCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"},
sellCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}) {
block {
height
timestamp {
iso8601
}
}
transaction {
hash
}
tradeIndex
buyCurrency {
symbol
address
}
buyAmount
sellCurrency {
symbol
address
}
sellAmount
maker {
address
annotation
}
taker {
address
annotation
}
protocol
smartContract {
address {
address
annotation
}
contractType
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.