Skip to content

Instantly share code, notes, and snippets.

@buddies2705
Created October 16, 2020 16:01
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 buddies2705/9c8cf66f6863b3d72f1ead0d70a75cd9 to your computer and use it in GitHub Desktop.
Save buddies2705/9c8cf66f6863b3d72f1ead0d70a75cd9 to your computer and use it in GitHub Desktop.
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