JSON for MIRC

By SReject on Apr 21, 2014

ATTENTION:

I've moved this project to github. Hopefully this move will allow for better project development, and management while improving community support.

This page will no longer be updated and may be removed eventually.

Comments

Sign in to comment.
SReject   -  Jun 12, 2016

Update - June 12th, 2016

I have moved the codebase to github.
This page might not be updated moving forward

 Respond  
kimiko   -  Jun 06, 2016

Thanks your code! It's important for me to get lots of informations in mIrc
I use it to get Twitch channel state.
I check channels about 10 sec a time.
Now my check channel come about 50. But i found it's start lag for me
Did this code suitable for this situation?
How to improve my code?

 Respond  
redline187   -  May 27, 2016

how to get json results from HMAC-SHA512 url?

SReject  -  May 27, 2016

I don't understand the question

Sign in to comment

SReject   -  Mar 12, 2016

Update as of March 12, 2016 v0.2.4

Fixed excessive commas not raising correct error.

 Respond  
SReject   -  Feb 28, 2016

Update as of Feb 28, 2016

Fixed typo that broke script for all clients except adiirc 64bit

 Respond  
SReject   -  Feb 25, 2016

Updates as of Feb 25, 2016

Changes: AdiIRC 32bit support
Changes: AdiIRC 64bit support (requires 3rd party dll to work)

 Respond  
Blasman   -  Nov 21, 2015

I really like this script and it has been very useful for my bot that I use on Twitch. However, I seem to be having an issue. The problem is that about 1% of the time, the name returned will either be blank or it will be the name of someone who previously had their name retrieved from the JSON. I use this code for getting the proper display name from Twitch, as IRC has everybody's name in lower case and this script is the only way that I know of of how to get the proper case sensitive display name. Is there something that I could change to get it to work 100% of the time, or is this just a Twitch issue, or something else? I use $twitch_name(name_to_retrieve) to get the proper name. Thanks.

alias twitch_name {
JSONOpen -ud twitch_name https://api.twitch.tv/kraken/channels/ $+ $1
return $json(twitch_name, display_name)
}

SReject  -  Nov 21, 2015

this is, most likely, a twitch issue. Though you could most likely try to manually close the json handler at the end of your twitch_name alias.

Though you can get a user's display name, if you receive message tags, (CAP REQ :twitch.tv/tags) via $msgtags(display-name).key at the time of them sending a message

Blasman  -  Nov 21, 2015

Thank you for the quick reply! I did not know about the $msgtags thing, and that seems to be working at the moment. I'll try getting the names that way for now. :)

Blasman  -  Nov 29, 2015

Well, almost immediately after posting my last message, I learned fast the limitations of trying to use the $msgtags. It's a bad idea and only works in specific situations. I did however figure out a basic "workaround" for getting my twitch_name alias to work. I tested this by using "$twitch_name(name1) $twitch_name(name2) $twitch_name(name3) " on the same line with and without the workaround. Without the workaround, it would always display the name for "name1" for each name. With the workaround, it displays everybody's name.
alias twitch_name {
if %tn = 1000 { %tn = 0 }
inc %tn
JSONOpen -ud twitch_name $+ %tn https://api.twitch.tv/kraken/channels/ $+ $1
return $json(twitch_name $+ %tn $+ , display_name)
JSONClose twitch_name $+ %tn
}

ProIcons  -  Dec 01, 2015

if (%tn == 1000) %tn = 0

Sign in to comment

Cartina   -  Sep 21, 2015

So I'm really confused here and I can't get it to work. I got a API that returns

{"Mega Man":{"any% (All Stages)":{"video":"http:\/\/www.twitch.tv\/dabigbooi\/v\/3834763","date":"1424862000","id":"pzg7o9ez", snip

Now I want to return the 'any % (All Stages)' data, but I can't find a way to do $json() for it.
$json(game, 0) returns ["Mega Man"] and I can't seem to find how to return the any% (All Stages) part of it.
I'm feeling real dumb. It really bugs me it has no ID to use such as "video" "date" "id" ...

Hope I'm making sense here.

 Respond  
acpixel   -  Aug 25, 2015

yo so i need a bit of help. so i need to get the value of time and player under each category.

the command would be !wr sm64 120_star. then the script would go to http://www.speedrun.com/api_records.php?game=sm64
then it would parse and find the values for player and time under the category 120 star. but because the game constantly changes i need to be able to read the first value and basely skip over it. but i want the end response to be "the world record for Super Mario 64 is (time) by (player)" but speedrun.com allows for abbreviations such as sm64, but i want the response to have the whole name. and the json does contain the whole name. so in the end i need to get the first value then parse to the time and player and output all 3.

here is my code so far.

on *:TEXT:!wr *:#: { 
  if (!%comwr) {
    set -u1 %comwr 1
    JSONOpen -u wr http://www.speedrun.com/api_records.php?game= $+ $replace($2 , _, $chr(32))
    msg $chan http://www.speedrun.com/api_records.php?game= $+ $replace($2 , _, $chr(32))
    msg $chan test $json(wr, (help needed), $replace($3 , _, $chr(32)))
    JSONClose wr
    else {
      msg $chan Sorry $nick $+ , no one is playing $2-
      JSONClose stream
    }
  }
  else {
    msg $chan Sorry $nick this command is on cooldown.
  }
}
SReject  -  Aug 25, 2015

Mkay, that API is not following generally accepted 'best' JSON practices: its using non-static data for item keys; due to this, my JSON parser may not correctly be able to handle this data.

With that said, you may be able to use $JSON().fuzzy to access the child members assuming that the child members to be accessed have non totally numeric keys:

JSONOpen -u wr http://www.speedrun.com/api_records.php?game= $+ $replace($2 , _, $chr(32))

;; get the first item* in the wr json's root object then get the user specifiec catagory
;; *: In json indexes start at 0 not 1
var %ref = $JSON(wr, 0, $replace($3 , _, $chr(32))).fuzzy

if ($JSONError) {
  ;; handle error
}
elseif (!%ref) {
  ;; catagory doesn't exist
}
else {
  ;; get player and time values
  var %player = $JSON(%ref, player)
  var %time = $json(%ref, time)

  ;; DO STUFF HERE WITH %player AND %time
}
acpixel  -  Aug 26, 2015

edit: i got it working <3 <3 <3 thank you so freaking much. i cant stress how helpful you are <3

acpixel  -  Aug 26, 2015

wait. i got it working!!!! much <3 <3 <3

SReject  -  Aug 26, 2015

No problem. :)

Sign in to comment

SReject   -  Aug 11, 2015

I will be moving the code base to github with the next release; This is to hopefully help make maintaining the code and getting bugs fixed far easier in the future.

This page will continue to be updated as needed and I will continue to post here when major updates are created

 Respond  
Screaming Fist   -  Jul 31, 2015

I've trying to use the Google URL shortener API: https://developers.google.com/url-shortener/v1/getting_started to shorten URL's before posting them but I cant seem to get a response back. Any and all help would be appreciated.

jsonopen -uw surl https://www.googleapis.com/urlshortener/v1/url?key=[API KEY]
jsonurlmethod surl POST
jsonurlget surl "longUrl": "http://www.google.com"
echo -a $json(surl).UrlResponse
jsonurlclose

SReject  -  Aug 01, 2015
var %data = {"longUrl":"http://www.google.com"}
JSONOpen -duw surl https://www.googleapis.com/urlshortener/v1/url?key=[API KEY]
JSONUrlMethod surl POST
JSONUrlHeader surl Content-Type: application/json
JSONUrlHeader surl Content-Length: $len(%data)
JSONUrlGet surl %data
echo -a $JSON(surl).UrlResponse
Screaming Fist  -  Aug 01, 2015

Hey thanks! That worked with one tweak:

var %data = {"longUrl":"http://www.google.com"}
JSONOpen -duw surl https://www.googleapis.com/urlshortener/v1/url?key=[API KEY]
JSONUrlMethod surl POST
JSONUrlHeader surl Content-Type: application/json
JSONUrlHeader surl Content-Length: $len(%data)
JSONUrlGet surl %data
echo -a $JSON(surl, id)

Sign in to comment

Rand   -  Jul 05, 2015

Any word on that update? :D

SReject  -  Jul 06, 2015

I'm slowly getting there. Redoing how fuzzy works is requiring alot more effort than I thought at first. Along with that I've been distracted from it, as mSL is a hobby. If you are on IRC quite a bit, I'm generally on swiftIRC(irc.swift.net:6667)'s #msl

Sign in to comment

Denny966   -  Jun 28, 2015

It does not work when you use jsonopen -ud with a name starting with number. Example:
alias jsontest {
jsonopen -ud 3test http://api.urbandictionary.com/v0/define?term=runescape
echo -ag Json name: $json(3test)
echo -ag Result: $json(3test,list,6,definition)
}

SReject  -  Jun 29, 2015

This is by design. Names must start with a letter, and contain only letters, numbers, _ and -

Sign in to comment

Rand   -  Jun 25, 2015

I'm having a bit of a problem. Lets say you have a JSON string like such:
{ "200":[["one","two","three"],[1,2,3]]}

Say "200" is an ID. To get the value "one" you'd need to do this: $json(test, 200,0,1)

But what if you don't KNOW that the ID "200" is going to be there? Is there a way to iterate through the objects without knowing the object name with this script? I'm able to do this in C#, but I can't for the life of me figure out how to do this through this script. (Also, do you intend on adding a ".count" suffix, like Timi's?)

SReject  -  Jun 25, 2015

You can use $json().fuzzy and $JSON().fuzzyPath to access data as though its indexed. Using your example, you would do $JSON(test, 0, 0, 1).fuzzy to get the value.

As far as .count, there's already a property for it: $JSON().length

Rand  -  Jun 25, 2015

Okay, that sort of works, but I've run into a little bit of a problem, rather than giving a winded explanation, I'll give you a small bit of sample code:

alias fuztest {
jsonopen -d test {"1":["one"],"3":["three"],"2":["two"]}
echo -a > $json(test).error
echo -a Result: $json(test, 0, 0).fuzzypath
echo -a Result: $json(test, 1, 0).fuzzypath
echo -a Result: $json(test, 2, 0).fuzzypath
}
The result is this:

Result: ["1"]["0"]
Result: ["1"]["0"]
Result: ["2"]["0"]

Now, as you can see it skips over "3" entirely. It'd be index'ed in the second spot, but .fuzzy lives up to the name fuzzy and checks to see if there's a key named that first?

Is there any way we can get it to only check for it by index? and is there anyway to see the count of the base? like {id:[],id:[]} would be 2. I know .length works as a .count, but just doing a $json(test).length doesn't work. :x

SReject  -  Jun 25, 2015

Mkay, i understand the issue as far as fuzzy 'sort of' working, and will see what I can do to fix it. Currently the script checks to see if the specified entry is a key and if it exists, returns it as such. If the key doesn't exist it loops over the object looking for the nTH item. So objects with numerical keys interfere when trying to access the object by indexes. For this I will most likely have to add another suffix that assumes all keys not wrapped in ""s are to be index. ETA: within a week

As far as .count vs .length, currently my .length works for arrays and strings. Are you suggesting it also work for objects? Or am I wrong, in what you are suggesting. If so, what would be the expected behavior of $json(test).length assuming the input data is from your example above.

Rand  -  Jun 26, 2015

In my example, i would expect It to return 3. It would count the keys. so in {"test":["abc",123]} would return 1 and {"test":["abc",123], "yeah":"exactly"} would return 2. so i guess Yeah, for objects if possible.

looking forward to the update. good work.

Sign in to comment

^WeSt   -  Jun 13, 2015

There is a issue into 0.2.2 when the %JSONError filled it also fill the: $crlf $chr(9) characters and having problems, so you must $remove them everytime the %JSONError set.

SReject  -  Jun 14, 2015

This is intended behavior. I store error messages thrown by the JScript engine, as is, in $JSONError. It is on the user of this script to handle and sanitize those error messages for users of your script

Sign in to comment

SReject   -  May 23, 2015

New Beta

Added Link to the current beta(v0.2.x) and its documentation. The link will not change but as bugs are fixed, the content it points to will. Check the version listed with the link against what you have for newer versions.

Please do NOT use the beta release for public works. It is instead, meant for users to test and report back. If you notice a bug with the beta, please specify the version along with what is wrong as a reply to this thread

SReject  -  May 26, 2015

Beta updated to v0.2.1i

SReject  -  May 26, 2015

Beta updated to v0.2.1j

^WeSt  -  Jun 09, 2015

There is an error into the line 490, it missing one ) at the end of the IF statement .

Fix it as:

if (0 ?* iswm $jsTry(%com, $JScript($prop))) {
Sign in to comment

SReject   -  May 19, 2015

Updates as of May 19, 2015

Change: Added $JSONVersion to return the current JSON for mIRC script version
Change: Set JSON for mIRC script version to 0.1.0
Docs: Updated documentation

Update as of May 17, 2025

Fixed typo that may have lead to specified files being deleted when using /JSONGet to send a file
Increased timeout to 60seconds in hopes to avoid popup asking to 'end' or 'continue'

 Respond  
Denny966   -  Apr 29, 2015

Seems like $json({NAME}) doesn't work. Here's an example:
alias jsontest {
jsonopen -ud test http://api.urbandictionary.com/v0/define?term=runescape
echo -ag Json name: $json(test)
echo -ag Result: $json(test,list,6,definition)
}

Result:
Json name:
Result: An [MMORPG](Massively Multipplayer Online Role Playing Game) with about 75,000 people playing at it's peak times. Reached 200,000 subscribers in '05. It has 2 versions. They are called F2P (Free 2 play) and P2P (Pay to play). F2P is fun and free, but with P2P you get tons more map space. RuneScape is commonly abbreviated as RS.

SReject  -  Apr 29, 2015

Thank you. Its fixed now :)

Sign in to comment

Blood_Wolf89   -  Mar 31, 2015

I was wondering if this needs an update... I was trying to get the account ID from world of tanks API but I get a blank return.. Here is the API link for it... https://api.worldoftanks.eu/wot/account/list/?application_id=demo&search=blood_wolf89

 Respond  
Blood_Wolf89   -  Mar 31, 2015

I was wondering if this needs an update... I was trying to get the account ID from world of tanks API but I get a blank return.. Here is the API link for it... https://api.worldoftanks.eu/wot/account/list/?application_id=demo&search=blood_wolf89

Blood_Wolf89  -  Mar 31, 2015

How would I access account_id on here..

{
"status": "ok",
"count": 1,
"meta": {
"count": 1
},
"data": [
{
"nickname": "Blood_Wolf89",
"id": null,
"account_id": 517073967
}
]
}

Blood_Wolf89  -  Mar 31, 2015

SOLVED!! I figured it out.. var %id = $JSON(wotstatid, data, 0, account_id)

Sign in to comment

hawkman   -  Mar 30, 2015

Nice work! Thank you, your code help me so much.

SReject  -  Apr 07, 2015

No problem. :)

Sign in to comment

SReject   -  Mar 09, 2015

Updated - Bug Fixes:
Added check if Internal JSON object exists before attempting polyfill
Removed unneeded code from internal json parser
Fixed Failed Web-Request errors being hidden by later errors that result from the failed web-request
Fixed Request Method being case sensitive
Fixed Temp file cleanup not happening
Fixed typo with %LTLError
Fixed JSON handler not closing when error occurs with /JSONOpen even if the -d switch was specified

 Respond  
Sjoepele   -  Feb 22, 2015

Im trying to parse JSON returned from the Steam API but its spaced really weirdly and doesnt do the thing. Anyone happen to know a workaround? On the picture you'll see the difference between normal JSON and Steam's JSON. Ive uploaded the full json here: http://pastebin.com/raw.php?i=eSx1acN3

Sjoepele  -  Feb 22, 2015

neeeeevermind it wasnt the spacing that was the problem. I didnt realize i had to specify the array when there was only one. instead of $json(steam, response, players, personastate) i had to specify the 0th array like $json(steam, response, players, 0, personastate). Left the post for future peeps who might run into the same troubles.

SReject  -  Apr 07, 2015

Yea. The json arrays like many programming languages, use 0th indexed arrays. Where as mIRC usually starts at 1. In one of the examples I demostrate it. May add a note to the description about it.

Sign in to comment

mishappp   -  Jan 16, 2015

How would I access an array formatted like this? http://pastebin.com/8tSnU5WV

When I try to use

echo -a $json(gameinfo,game,teamTwo,array,2)

I get a random string of numbers. I'm sure I'm just doing it wrong but I don't quite know how to do it. I saw the examples, but I'm not sure how to apply it to URL get. I'm a newbie be gentle. I'm posting this again, because I accidentally posted it as a reply.

SReject  -  Jan 16, 2015

There is no "teamTwo" in the pastebin you posted. Instead of showing just a snippet of the problematic code, could you pastebin the whole code?

mishappp  -  Jan 16, 2015

Yeah, sorry about that, as for the code this is pretty much it all I have is a jsonopen -ud to the API, I can get some information but none of the nested information hence why I'm sure I'm probably doing this wrong.

http://pastebin.com/9H43Gbav

SReject  -  Jan 16, 2015

When accessing the json, if you are trying to access a 'node' that has child members, a reference to those child members is returned, instead of a value. To get values from the json as you listed, you'd have to specify each member you want to grab.

This returns a reference to game.teamTwo.array[0]:

alias test_json {
    jsonopen -ud test http://pastebin.com/raw.php?i=9H43Gbav
    echo -s Rating: $json(test, game, teamTwo, array, 0)
}

This gets teamRating and pickMode from game.teamTwo.array[0]:

alias test_json {
    jsonopen -ud test http://pastebin.com/raw.php?i=9H43Gbav
    echo -s Rating: $json(test, game, teamTwo, array, 0, teamRating)
    echo -s pickMode: $json(test, game, teamTwo, array, 1, pickMode)
}
mishappp  -  Jan 16, 2015

Works great. Thank you.

Sign in to comment

SReject   -  Jan 16, 2015

What other things would people like to see me add to this.

At the moment, I can only think of an identifer to search for a specific object 'key': $JSONFind({name}, {query}, {item|index,...})

 Respond  
SReject   -  Jan 07, 2015

Updated to fix a few bugs. listed above.... (geez, markdown screwed my description formatting BADLY)

 Respond  
^WeSt   -  Nov 24, 2014

There is an bug on line 270 when the $com has too big data results return an /set line too long error, so i suggest to change it to:

%res = $left($com(%com).result,4098)

ProIcons  -  Nov 24, 2014

Whatsoever this is not a bug. It's just Limitation of mIRC getting strings up to 4098 Characters. by doing that you may destroy the json array, and make it impossible for the parser to read. Furthermore you won't have the desired results in any case.

^WeSt  -  Nov 24, 2014

i know that the mirc has an limitation but some $json data results have more than 4098 characters so the JSON return an error on because is trying to set the %res with more than 4098 so the only way is to read only 4098 characters instead to return an error, and of course the desired results will not be the correct but its not an code fault but mirc's one.

ProIcons  -  Nov 24, 2014

He can handle errors with :error tag and $error Identifier.

Denny966  -  Nov 27, 2014

As ^WeSt mentioned, it's not the fault of the code, but mIRC itself gives an error when the data is longer than 4098 characters. I don't think this will destroy the json array, this will only limit the returning string to 4098 characters (correct me if I'm wrong)

The $left may be a temptorary fix until the dev fixes it. I have posted this problem before http://hawkee.com/thread/118182

SReject  -  Jan 07, 2015

This is now fixed. For results longer than mIRC's text-length limit, the result is trimmed to 4000 bytes and $json().error is filled

Sign in to comment

ProIcons   -  Sep 15, 2014

Well After Watching Farcrada's Issues, i tried to test this code my self. It failed to even return data. So i decided to make a Small Snippet in order to test your JSON Lib on both Secure and Non Secure sites.
I'm Running on Windows 7 Ultimate 64 Bit with OpenSSL Installed. The Code and Results are the following:
Image

alias Start_Json {
  set %szGlob 0
  echo -a Running JSON Lib. $time(HH:nn:ss mm/dd/yyyy)
  echo -a mIRC Version: $version
  echo -a OS Version: $os
  if ($sslready) {
    echo -a SSLReady:3 $sslready
  }
  else {
    echo -a SSLReady:4 Failed
  }
  set %szUs https://api.twitch.tv/kraken/streams/lcs_pros_in_koreansoloq
  set %szUn http://ipinfo.io/8.8.8.8/json
  echo -a Test Sites:
  echo -a - Secure Site: %szUs
  echo -a - Insecure Site: %szUn

  sockopen -e szCTestUS $gettok(%szUs,2,47) 443
  sockopen szCTestUN $gettok(%szUn,2,47) 80
}

on *:sockopen:szCTest*:{
  if (!$sockerr) {
    signal szCTest $true $sock($sockname).addr
  }
  else { signal szCTest $false $sock($sockname).addr }
  sockclose $sockname
}

on *:signal:szCTest:{ 
  if ($1 == $true) { inc %szGlob }
  else { unset %szGlob | echo -a Test Failed: | echo -a - Error: while connecting to $2 }
  if (%szGlob == 2) { echo -a Sites Online Procceeding | unset %szGlob | Run_Json }
}

alias Run_Json {
  var %jHandlerUs jH1
  var %jHandlerUn jH2
  var %szFail
  echo -a Opening Connectiong to %szUs with JSONOpen 
  JSONOpen -u %jHandlerUs %szUs

  if (!%JSONError && $json(%jHandlerUs, stream, game)) {
    echo -a Success: $v1
  }
  else {
    echo -a Failed: %JSONError
    inc %szFail
  }
  echo -a Closing JSONHandler: %jHandlerUs
  JSONClose %jHandlerUs

  echo -a Opening Connectiong to %szUn with JSONOpen 
  JSONOpen -u %jHandlerUn %szUn

  if (!%JSONError && $json(%jHandlerUn, ip)) {
    echo -a Success: $v1
  }
  else {
    echo -a Failed: %JSONError
    inc %szFail
  }
  echo -a Closing JSONHandler: %jHandlerUn
  JSONClose %jHandlerUn

  echo -a Test Complete
  echo -a Errors Occured: $iif(%szFail,$v1,None)

}
Farcrada  -  Sep 15, 2014

I do need to add to this that there's a consistant problem with Twitch's API. And that is that it can sometimes bug itself to giving nothing in return. But... Then it should fill-in $json().error(text)... Which is clearly not happening. xD

Sign in to comment

Farcrada   -  Sep 12, 2014

So, uhm... I've been trying this and tried connecting to somewhere, but it seems that it fails on a SSL call...

I can't seem to get anything to return and there's no errors. The code is, well, good... But it's not returning anything.

Any chance Https/SSL requests are not working?

SReject  -  Sep 13, 2014

A few questions:
Are you using an OS other than windows? If not then this won't work as it uses native libraries to windows.
Could you produce an example that illustrates the failure?

For the record, it does work with SSL, as I just helped @^WeSt use it for twitter searching

ProIcons  -  Sep 13, 2014

Does it work on a Non Secure Site?

Farcrada  -  Sep 14, 2014
SReject  -  Sep 14, 2014

What exactly are you trying to do. No offense but your code is a bit all over the place.

; //echo -a $Twitch_Streaming_Game( <twitch_user> )
; Returns the game the specified user is streaming or $false

alias Twitch_Streaming_Game {

  ; Create some local variables
  var %r, %j = Twitch_Streaming_Game

  ; Retrieve JSON from twitch  
  JSONOpen -u %j https://api.twitch.tv/kraken/streams/ $+ $1

  ; Check that there's no errors, and that data.stream.channel.game has a value
  if (!%JSONError && $json(%j, stream, channel, game)) {

    ; save the data in a return variable
    %r = $v1
  }

  ; immediately close the JSON handler
  JSONClose %j

  ; return the result, if there isn't one, return $false
  return $iif(%r, $v1, $false)
}
Farcrada  -  Sep 14, 2014

Nvm.

bib_lecry  -  Feb 27, 2015

Thank you for this post it has helped a lot. I just have a quick question. I would like to have an output from this ONLY if the result comes back $false. I'm guess its as simple as an "if" statement but Im new to coding, and am not sure what the parameters would be. (if you would even use an if statement) Thank you for your time!

Sign in to comment

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