15

I was looking at feeds.chain.link and it's not immediately obvious if anyone can tap into all these price feeds without incurring a cost:

Chainlink Feeds

For instance, I did find the ETH/USD aggregator contract, which has a "latestAnswer" property that anyone can access for free. At the time of posting this question, its value is 37867000000 (1 ETH = $378.67).

Is there an aggregator for all pairs listed on feeds.chain.link?

Paul Razvan Berg
  • 17,902
  • 6
  • 73
  • 143

2 Answers2

19

On mainnet, sponsors are paying the LINK associated to keep those feeds live, decentralized, and secure, so they are not free. This allows the network to be a shared resource where everyone chips in a tiny bit and makes them even cheaper than running even your own centralized feed.

That being said, the price feeds are currently a simple view function, and anyone can technically use them as access controls are potentially on the roadmap. It’s not really economical or fair for those backers who are paying to support them for everyone else. Until access controls are built, please reach out if you are using them on mainnet and learn how you can contribute to keep them reliable honest, and secure.

Patrick Collins
  • 11,186
  • 5
  • 44
  • 97
-2

Each request has a cost in LINK tokens. Usually it is 0.1 Link which includes the 18 decimals. So be sure to send some tokens to your contract before executing the oracle functions

  • 2
    There is a "latestAnswer" property that can be read for free, by anyone. I found it on Etherscan: https://etherscan.io/address/0xf79d6afbb6da890132f9d7c355e3015f15f3406f#readContract – Paul Razvan Berg Sep 15 '20 at 12:48
  • 1
    That is only the case for custom external adapters. An oracle can set up all sorts of jobs, requesting data from any API. Read: https://docs.chain.link/docs/request-and-receive-data/

    That's a whole different concept compared to price feeds.

    – Markus Kottländer May 22 '21 at 18:52