This repo contains a couple of scripts that cache the metadata of coins from coingecko.
Why do we need this? Because of rate limits and because we don't want people to have to setup their own Coingecko API key.
This API lets you find the coingecko id of:
- a coin id by its symbol (ticker).
- a coin id by its asset platform id and contract address.
GET /public/coin-id/s/:symbolGET /public/coin-id/a/:asset-platform-id/:contract-address
This API lets you find the coingecko id of:
- a coin metadata (logo, symbol, name) by its coingecko id.
GET /public/coin-data/:coin-id
We use these APIs to get asset metadata such as logo image, website url, asset description, etc. Because of the stinginess of the free tier, this app makes use of a local cache.
| Provider | Rate limit (free tier) | Normalized value | Minimum call interval | Docs |
|---|---|---|---|---|
| Coingecko | 30 calls per minute | 30 calls per minute | 2000ms | link |
To install dependencies:
bun installTo run:
bun run cache:coin-ids
bun run cache:coin-data
bun run cache:asset-platforms
bun run cache:exchanges