Skip to main content

Data Feed Reader Example

Intro

data-feed-reader-example aims to guide users on how to read data from data feeds or dAPIs (decentralized APIs). Data feeds are sourced by a single beacon and dAPIs can be sourced by either one beacon or aggregation of more beacons. Since dAPIs can be sourced by aggregation of beacons, it is more reliable to use dAPIs. You can see full list of Nodary data feeds here and dAPIs in API3 Market. Follow through data-feed-reader-example's README.md and see the example contract.

Proxies

Data feeds and dAPIs are read via proxies. Each data feed or dAPI ideally should have one proxy. One can use data-feed-reader-example's Advanced section for deploying proxy. It is ideal to use API3 Market for dAPIs, it is just a few clicks. See DataFeedProxy.sol and DapiProxy.sol contracts.

Getting proxy contract address from API3 Market

Go to the API3 Market, connect your wallet from the top right.

Find the dAPI you want to use and select the chain you want to use and click on Get Proxy.

Approve the transaction and once it is completed you should see the proxy contract address.