modulepackage
0.5.3
Repository: https://github.com/rssnyder/coingecko-cache.git
Documentation: pkg.go.dev
# README
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
# Functions
GetCoinData retrive data on a single id.
GetMarketData retrieves the array of current prices from coingecko.
Store puts the coins values into redis.
# Constants
No description provided by the author
No description provided by the author
# Structs
CoinData is a stripped down representation of cg data.
MarketInfo is the data cg returns when listing all coins.