coinmon icon indicating copy to clipboard operation
coinmon copied to clipboard

Auto refresh

Open asymmetric opened this issue 7 years ago • 7 comments

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!

asymmetric avatar Nov 21 '17 11:11 asymmetric

last I looked this api had some strict rate limits. That might not be feasible.

curioussavage avatar Nov 21 '17 17:11 curioussavage

@asymmetric Thanks for the suggestion. I am doing research how to turn this to the live update mode. :)

bichenkk avatar Nov 21 '17 18:11 bichenkk

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

mfrachet avatar Nov 22 '17 07:11 mfrachet

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.

signus avatar Dec 13 '17 23:12 signus

Another workaround is a simple bash while loop:

while true; do /usr/bin/coinmon -f btc,ltc,eth -c gbp sleep 300 done

luca0x333 avatar Dec 24 '17 19:12 luca0x333

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.

ccolorado avatar Jan 15 '18 18:01 ccolorado

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!

polyrabbit avatar May 23 '18 06:05 polyrabbit