Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion coin-prices-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We can see that \[index.ts] exports a function with the same name as the protoco
getTokenPrices() uses a variety of functions and libraries to find token prices:

1. Axios is used in fetchFromIpfs(), to fetch market information from IPFS by a REST get call. API calls don't necessarily have to be to IPFS, however we do prefer on-chain data to protocol APIs. Especially for numerical data used to calculate price.
2. The getBlock() utility is used to find the block height of the given chain at the the given timestamp. It is worth checking the utils folder for any functions you need that may have already been written.
2. The getBlock() utility is used to find the block height of the given chain at the given timestamp. It is worth checking the utils folder for any functions you need that may have already been written.
3. getTokenAndRedirectData() fetches information from the DefiLlama coins database, about coins deposited to the Euler markets.
4. multiCall()is a function from the DefiLlama SDK which allows us to fetch on-chain data from many functions at once. There are lots of examples on how to use the DefiLlama SDK in the DefiLlama/DefiLlama-Adapters repo.

Expand Down