coinmon
coinmon copied to clipboard
Auto refresh
Hi, thanks for this great little tool!
It would be really great if it would automatically refresh, with a configurable interval. This way, it would act a bit like web-based chart aggregators like cryptowat.ch, and be even more useful!
last I looked this api had some strict rate limits. That might not be feasible.
@asymmetric Thanks for the suggestion. I am doing research how to turn this to the live update mode. :)
I m not sure, but if you'd like to use the same API, it doesn't seem to exist a streaming API.
However the limitations are saying :
Limits
Please limit requests to no more than 10 per minute.
Endpoints update every 5 minutes.
I've two ideas in mind from there :
Short time solution : using this project as a client side tool only
And maybe trigger http call with intervals ? :D
Long time solution : using this project as a client side AND service side tool
Only the server would have made the call to the API with a store system (reducing drastically the call number) and maybe using something like sockets or http intervals to provide the information to clients
A workaround for those using Linux, OSX, or Cygwin on Windows would be to use watch
from the procps package to re-run the command. I use a 5 minute interval so as not to query the API too frequently:
watch --color -n 300 'coinmon -f btc,ltc,eth'
Though it looks like there might be a issue with ANSI escapes that causes color not to terminate correctly when using watch
- I intend to look into this further.
Another workaround is a simple bash while loop:
while true; do /usr/bin/coinmon -f btc,ltc,eth -c gbp sleep 300 done
It will be nice to have the reload happen in the background, so you don't get that blank screen while the refresh is happening.
Hi guys, I just ported this handy tool using Go, with support for the auto refresh
feature, and extended data source to many other exchanges, I hope you find it helpful: https://github.com/polyrabbit/token-ticker
I'm still improving it - your feedback is always welcome!