0

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.

3
  • 1
    You can always create a custom oracle which preprocesses data any way you wish. Sep 18, 2019 at 15:33
  • How would I go about fetching eth value at a specific time from an api?
    – NowsyMe
    Sep 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. Sep 19, 2019 at 12:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.