Subscribing to Self-Funded dAPIs
With Self-Funded dAPIs, you can fund the dAPI with your own funds. The amount of gas you supply will determine how long your dAPI will be available for use. If you run out of gas, you can fund the dAPI again to keep it available for use. This is a good option if you are not planning to use the dAPI for a long period of time or if you are not planning to use the dAPI in a production environment.
Managed dAPIs
If you are planning to use your dAPI for a long period of time or if you are planning to use your dAPI in a production environment, we recommend that you use Managed dAPIs provided by the API3 DAO. This way, you can be sure that your dAPI will be available to your users at all times.
API3 Market
The API3 Market provides all the tooling to seamlessly access dAPI services. For self-funded data feeds this end-to-end process consists of:
- Exploring and selecting your data feed
- Funding a sponsor wallet
- Deploying a proxy contract to access the data feed
1. Exploring and selecting your data feed
The API3 Market provides a list of all the dAPIs available across multiple chains including testnets. You can filter the list by chains and data providers. You can also search for a specific dAPI by name. Once selected you will land on the details page where you can find more information about the dAPI.
Request a feed
In case you cannot find the desired dAPI on the API3 Market, you can request a new feed using this form which is also available on the API3 Market website.
2. Funding a sponsor wallet
Once you have selected your dAPI, you can fund the dAPI by using the market UI to send funds to the sponsorWallet, make sure your:
- Wallet is connected to the market and is the same network as the dAPI you are funding
- Balance of the wallet should be greater than the amount you are sending to the sponsorWallet
To fund the dAPI, you need to click on the "Fund Gas" button.
This will bring up the API3 gas estimator UI that allows users to understand how much gas is needed for the dAPI to provide on-chain values for the selected time.
Estimation is not 100% accurate
The estimation is calculated assuming there are 10 oracle updates per day on the current gas costs of the respective chain. Users need to be aware that any spikes in gas prices will impact the estimation.
Clicking ''Send'' will initiate a transaction sending the amount entered into the gas estimator from a users wallet to the sponsor wallet of the respective data feed. 15 minutes later the feed will activate.
Always verify that you are signing a transaction with the expected amount, networks, and destination address. Each dAPI has a unique funding address.
Note
Funds sent to the wallet address will not be returned.
Once the transaction is broadcasted & confirmed on the blockchain a transaction confirmation screen will appear.
15 mins to start the feed
If the previous balance of the dAPI was 0, it might take up to 15 minutes for the dAPI to start operating
3. Deploying a proxy contract to access the data feed
Smart contracts can interact and read values from contracts that are already deployed on the blockchain. By deploying a proxy contract via the API3 market, a dAPP can interact and read values from a dAPI like ETH/USD.
Once the dAPI is funded, you can deploy a proxy contract to access the data feed. Proxy contracts can be deployed in two ways:
- During the funding process
- Deploying from the API3 Market details page of the dAPI
Self-funded Proxies
If a proxy is already deployed for a self-funded dAPI, the dAPP can read the dAPI without having to deploy a proxy contract by using the address of the already deployed proxy contract which will be visible on the API3 market.
3a. Deploying a proxy contract during funding
If you are deploying a proxy contract during the funding process, you will see the following UI.
Clicking on the "Get proxy" button will initiate a transaction to your metamask that will deploy a proxy contract.
Once the transaction is broadcasted & confirmed on the blockchain, the proxy contract address will be shown on the UI.
3b. Deploying a proxy contract from the API3 Market details page
If you are deploying a proxy contract from the API3 Market details page, you will see the following UI.
Clicking on the "Get Proxy" button will initiate a transaction to your metamask that will deploy a proxy contract. Once the transaction is broadcasted & confirmed on the blockchain, the proxy contract address will be shown on the UI.
To get started with using the dAPI, you can follow the Reading a dAPI Proxy guide.
FLEX_END_TAG