2

How does it work, exactly? We just call this on-chain to get the latest price... but would our contract have to transfer some LINK to it, or what?

https://docs.chain.link/docs/get-the-latest-price

Which oracles are available, and what are their prices to call on-chain? All I am trying to do is find out onchain the "current" ETH-USD exchange rate, like a median across many exchanges or whatever. It doesn't have to be super exact, just not way off. What should I use for this?

2

No, they are not free. Each oracle service comes with a price. You can learn more about the services they offer and their prices from the following link.

For your specific search, you can go to this link.

If you like to learn more and prefer video, I suggest the following video.

2
  • But in this case how come I can visit etherscan.io/address/… and see the latest price there for free in the Read Contract tab, under latestAnswer and latestRoundData etc? Jan 3 at 6:17
  • What price? Once you send the smart contract to the Ethereum network, you will be able to see it. I think you are confusing the oracle service with the Ethereum network. Jan 3 at 15:49
1

Use of Chainlink oracles can be separated into 2 categories:

1. Chainlink Price Feeds

The answer to where or not they are free can be found in this stack exchange ETH question and answer.

TL;DR, at the moment they are free because the project is still starting, but it isn't economical for this to stay as-is forever.

2. Request and Recieve

This includes Chainlink VRF and Chainlink API calls. In order to use these, you need to send the specific oracle the LINK price of fetching the data.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.