No description
  • Go 98.3%
  • Makefile 1.7%
Find a file
Riley Snyder 797cb5183b
chore: add order flag (#9)
add currency flag
change marketcap to flat64 to support pages beyond 35
2022-12-04 14:17:08 -06:00
.github/workflows Create build.yml 2021-12-07 14:03:40 -06:00
.gitignore add readme 2021-04-25 13:03:47 -05:00
coingecko-cache.service inital work 2021-04-25 13:03:04 -05:00
data.go chore: add order flag (#9) 2022-12-04 14:17:08 -06:00
go.mod chore: add metrics 2022-01-06 17:48:55 -06:00
go.sum chore: add metrics 2022-01-06 17:48:55 -06:00
main.go chore: add order flag (#9) 2022-12-04 14:17:08 -06:00
Makefile inital work 2021-04-25 13:03:04 -05:00
README.md chore: add metrics 2022-01-06 17:48:55 -06:00

coingecko-cache

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

items are stored in redis under the keys <coin id>#<attribute>. requires you have a redis server running locally on port 6379.

stores info on the top 100 coins by market cap.

build

make build-<linux/osx>

run

  -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
make run

install

make install

references

Powered by CoinGecko

image