NightDev Community Forums

javascript command not working

here is the command I am trying:
$(eval var api = $(urlfetch json; var obj = JSON.parse(api); obj.bid_price; )

It is supposed to return the price of ETH, and it does get data from the API call but it doesnt parse it, it just returns “unknown identifier”…this code works elsewhere just not in Nightbot, what am I doing wrong?

Hiya, you sure the url is correct, would expect something after /v1/?
Can’t really test it out without an API key, but dont see this endpoint in their docs.