I’m just trying to get the price of the last transaction so I’m using trying to essentially get the latest prices, starting from the current time, and limiting it to one result. Without the date this query works just fine for getting the latest info. I want the same result but for whatever time I specify (so the price of whatever was the last transaction before the given date).
The problem I’m having is that this date (“2021-10-14T23:50:01”) returns nothing, but if I add one hour to the date (“2021-10-15T00:50:01”) I get the information. This is just a test token I’m using but it was launched by that time so where is the info?
I’ve asked this before but how do learn all of this? I haven’t found much documentation beyond a few blogs and the schema documentation, which I find confusing to use. This GraphQL is only a small part of a larger thing but it seems to be the most precarious. I feel like my queries are just houses of cards made up of every type of bracket. One slight change and suddenly nothing works.
Is there any kind of ebook I can read to help me with this?
tl;dr: It seems the value of a transaction changes over time. I want to get the price it would have had at the given time.
Okay, so this still isn’t working as I expected it to but I’m somewhat onto the problem. This is a different problem so I’m half expecting to told it should be a new thread.
My code is working now but the prices coming back are much lower than they should be. This is using test data so I know what the prices should look like and I couldn’t figure out why they weren’t as expected. My code uses that pricing method of just pulling up the value of the latest transaction. That works fine for me normally but I have a few gaps in my data that I’m trying to fill. My code finds a gap in the data and I want it to pull the price as if it was pulling at that time.
I didn’t realise but it appears the value of a transaction can change over time, by looking at my original test data I can see there were no new transactions over a few hours but the value being returned from that transaction kept going down. How can I get this value as if I’d climbed into a time machine and run the transaction back then?