# Earn API

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 ...

{% embed url="<https://api.alkemi.network/?url=/>" %}

The Earn Open pool's data can be seen here ...

{% embed url="<https://mainnet.open.api.alkemi.network/?url=/>" %}

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&#x20;

1. Markets
2. History
3. Accounts
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. My Rewards
2. Interest
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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alkemi.network/user-guide/earn-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
