v2-subgraph icon indicating copy to clipboard operation
v2-subgraph copied to clipboard

How to fetch PairHourData?

Open shaynos opened this issue 4 years ago • 1 comments

Hey there,

I've been trying to fetch PairHourData using the graph explorer - https://thegraph.com/explorer/subgraph/uniswap/uniswap-v2

My understanding is that I should be able to pass a pair id and receive information about that pair. For example -

{
  pairHourData(id:"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852") {
    hourStartUnix
  }
}

Am I missing something here?

What would be the best way to fetch pairHourData each hour for the last 12 hours?

shaynos avatar Dec 13 '20 00:12 shaynos

I haven’t tested yet personally but I think you need the token / pair ID not the contract address. I could be wrong.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Shayne Brady [email protected] Sent: Saturday, December 12, 2020 7:47:00 PM To: Uniswap/uniswap-v2-subgraph [email protected] Cc: Subscribed [email protected] Subject: [Uniswap/uniswap-v2-subgraph] How to fetch PairHourData? (#68)

Hey there,

I've been trying to fetch PairHourData using the graph explorer - https://thegraph.com/explorer/subgraph/uniswap/uniswap-v2

My understanding is that I should be able to pass a pair id and receive information about that pair. For example -

{ pairHourData(id:"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852") { hourStartUnix } }

Am I missing something here?

What would be the best way to fetch pairHourData each hour for the last 12 hours?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Uniswap/uniswap-v2-subgraph/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN5MCSQZIXO5KGZF4VA6E3TSUQFIJANCNFSM4UY3W7TA.

fourswordsio avatar Dec 14 '20 01:12 fourswordsio