Codica commented on a Page, JSON for MIRC  -  Sep 07, 2014

For some reason it never updates and keeps the same information... why?

So I have it go to this: http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=132
Then i use

 jsonopen -ud dogetosatcryptsy http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=132
 set %dogetosat $json(dogetosatcryptsy,return,markets,DOGE,lasttradeprice)
 msg #dogeinfo 1 DOGECOIN = %dogetosat BTC

However, it keeps saying it's at 0.00000040, which it was ages ago. How do I fix this to make it show real-time info?

SReject  -  Sep 07, 2014

append something like &nocache= $+ $ticks to the url. windows XMLHTTPRequest caches results so to get around that alter the url :)

jsonopen -ud dogetosatcryptsy http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=132&nocache= $+ $ticks
set %dogetosat $json(dogetosatcryptsy,return,markets,DOGE,lasttradeprice)
msg #dogeinfo 1 DOGECOIN = %dogetosat BTC
Codica  -  Sep 08, 2014

That works, thank you :>

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.