# 4.5 Supply info api for Cosmos chain

&#x20;

## Supply info api

[https://api-supply.memenetwork.io](https://api-supply.memenetwork.io/)

This is an advanced supply information API for Cosmos Chain. I simplified the logic structure to improve efficiency and enable automatic switching in case of API\_ENDPOINT failure.

This improves the reliability and stability of the supply information API by quickly switching to the next API\_ENDPOINT when the first one fails.

```
{
  "apr": 68.31957987369881,
  "totalSupply": 11997255843.06718,
  "circulatingSupply": 11296519548.811697,
  "communityPool": 700723521.8232318,
  "totalStaked": "6146166417.423682",
  "bondedRatio": 0.5122982322886627,
  "denom": "MEME"
}
```

### Other routes

－ `/v1/total-supply`: returns total supply in plain text

－ `/v1/circulating-supply`: returns circulating supply in plain text

－ `/v1/total-staked`: returns total staked in plain text

－ `/v1/bonded-ratio`: returns bonded ratio in plain text

－ `/v1/community-pool`: returns community pool size in plain text

－ `/v1/apr`: returns APR in plain text

－ `/v1/denom`: returns denom in plain text

－ `/v1`: JSON

#### How circulating supply is calculated

1. Get total supply.
2. Get community pool.
3. Subtract community pool from total supply.

This yields the circulating supply.

### environment variable

See `.env.example` for an example.

eg:

```
INTERVAL=120000 # if INTERVAL = 60000 = 60s cache, 
PORT=3010
API_ENDPOINT1=https://meme-api.polkachu.com
API_ENDPOINT2=https://api-meme-1.meme.sx
API_ENDPOINT3=https://meme.api.m.anode.team
COIN_DENOM=umeme
COIN_DECIMALS=6
DENOM=MEME
```

### Source code

{% embed url="<https://github.com/memecosmos/meme-supply-api>" %}

<br>


---

# 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.memenetwork.io/meme-network-whitepaper-v1.0/4.-economy/4.5-supply-info-api-for-cosmos-chain.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.
