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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.