Hi, I’m new to the api still trying to understand it. How can I get the transactions that an address did so I can calculate the average of the price for a token?
For example I bought ETH 2 times at different prices using the currency USD. So I want the query to return the hash, day/time, price bought and quantity. Can someone help me to do the query for 1 network (example matic) and I’ll modify it for the rest, at least have an idea how it works. This is what I’ve been trying but it’s returning 0 results:
query MyQuery {
ethereum(network: matic) {
address(address: {is: "0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5"}) {
address
}
transfers {
amount
}
}
}
It just returns this:
{
"ethereum.address[0]": {
"address": "0x59820c7a02ba744140c325c94d0ab0d2449ea6b5"
}
}
How can I do it?