An open API service indexing awesome lists of open source software.

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

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

![image](https://user-images.githubusercontent.com/7338312/147584095-e88e718b-9349-4e95-adae-02514e3d3a9e.png)