https://github.com/rssnyder/coingecko-cache
process to cache data from coingecko api
https://github.com/rssnyder/coingecko-cache
Last synced: about 1 year ago
JSON representation
process to cache data from coingecko api
- Host: GitHub
- URL: https://github.com/rssnyder/coingecko-cache
- Owner: rssnyder
- Created: 2021-04-25T14:56:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T20:17:35.000Z (over 3 years ago)
- Last Synced: 2025-03-30T22:11:07.347Z (about 1 year ago)
- Language: Go
- Size: 26.4 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coingecko-cache
```text
+--------------------+
|discord-stock-ticker|-----\
| |--\ ---------\
+--------------------+ -----\ ---------\
--> +-----+ ----> +---------+
|redis| |coingecko|
--> +-----+ ----> +---------+
+----------------+ -----/ ---------/
|coingecko-cache |--/ ---------/
| |-----/
+----------------+
```
a cache system for avoiding coingecko rate limits for crypto prices. uses the `coins/markets` endpoint documented [here](https://www.coingecko.com/en/api).
items are stored in redis under the keys `#`. requires you have a redis server running locally on port `6379`.
stores info on the top 100 coins by market cap.
## build
```shell
make build-
```
## run
```text
-db int
redis db to use
-expiry int
number of seconds to keep entries in the cache (default 60)
-frequency int
seconds between updates (default 1)
-hostname string
connection address for redis (default "localhost:6379")
-pages int
number of pages (100 coin each) to pull from (default 1)
-password string
redis password
+ any additional args for coins to fetch individually
```
```shell
make run
```
## install
```shell
make install
```
## references
### Powered by CoinGecko
