Earn API
The Earn Application Programmatic Interface is an industry standards compliant service that provides easy access to our main data for use by 'bots, partners, systems and sophisticated users who code.
The API can be found in different locations depending on the Earn Liquidity Pool for which you want data.
The Earn Verified pool's data can be seen here ...
https://api.alkemi.network/?url=/
api.alkemi.network
The Earn Open pool's data can be seen here ...
https://mainnet.open.api.alkemi.network/?url=/
mainnet.open.api.alkemi.network
Both APIs use the "Restful paradigm", as well as Swagger to document the end points and explain how to call them. There is also a convenient interface to make HTTP calls to the API directly in the page.
The data the API uses consist of 4 collections in a DB. These are
  1. 1.
    Markets
  2. 2.
    History
  3. 3.
    Accounts
  4. 4.
    Liquidation
For each there are POST, GET, PUT and PATCH behaviors. Only GET behaviors are available to the public. In addition to the 16 "CRUD" methods that you would expect in a restful API with 4 entities, there is also support for 3 special end points. These are
  1. 1.
    My Rewards
  2. 2.
    Interest
  3. 3.
    Average APY
These can be used to learn the amount of ALK rewards or how much interest an account earned over a period of time, or what the prevailing APYs were for a market over that period.
Last modified 1mo ago
Copy link