Is it possible to fetch the USD rate of ETH at a specific time in the past to a smart contract from an external API using an oracle? i.e. I have a function which tracks whether now > start + 10 days
. Now, if this statement is true, then it should fetch the ETH USD value at the exact time of start + 10 days.
-
1You can always create a custom oracle which preprocesses data any way you wish.– Mikko OhtamaaSep 18, 2019 at 15:33
-
How would I go about fetching eth value at a specific time from an api?– NowsyMeSep 18, 2019 at 16:32
-
Two ways 1) You create an Oracle API that takes parameter "when" 2) Oracle regularly feeds the exchange rate to the blockchain smart contract which has getAt(now - 10 days) function that can look to the history. What is better approach is hard to tell without understanding the big picture.– Mikko OhtamaaSep 19, 2019 at 12:39
Add a comment
|