SyntaxError: Unexpected token u like #262 for cryptsy
2015-03-16 04:29:30 (DEBUG): Requested LTC/BTC trade data from Cryptsy ... 2015-03-16 04:29:35 (DEBUG): Fetched 1000 new trades, from 2015-03-15 11:37:3 7 UTC to 2015-03-15 22:28:58 UTC 2015-03-16 04:29:35 (DEBUG): minimum trade treshold: 2015-03-15 22:28:16 UTC 2015-03-16 04:29:35 (DEBUG): processing 1 trade(s) 2015-03-16 04:29:35 (DEBUG): from 2015-03-15T22:28:58+00:00 to 2015-03-15T22: 28:58+00:00 2015-03-16 04:29:35 (DEBUG): Processed trades, sleeping for a minute... 2015-03-16 04:30:23 (DEBUG): Requested LTC/BTC trade data from Cryptsy ... undefined:1 undefined ^ SyntaxError: Unexpected token u at Object.parse (native) at Request._callback (C:\Users\Pascal\Desktop\gekko-github\node_modules\cryp tsy-api\cryptsy.js:53:27) at self.callback (C:\Users\Pascal\Desktop\gekko-github\node_modules\cryptsy- api\node_modules\request\request.js:344:22) at Request.emit (events.js:107:17) at Request.onRequestError (C:\Users\Pascal\Desktop\gekko-github\node_modules \cryptsy-api\node_modules\request\request.js:961:8) at ClientRequest.emit (events.js:107:17) at TLSSocket.socketErrorListener (_http_client.js:272:9) at TLSSocket.emit (events.js:129:20) at net.js:451:14 at process._tickCallback (node.js:355:11)
up
Having the same issue. Please advice.
That's a problem on the API side. You are trying to parse a proper things. Well here you talk about Object.parse. But this error is triggered with JSON.parse on that case per exemple :
Simple exemple :
bitcoin_tick = {last:200};
JSON.parse(bitcoin_tick);
Triggers : Uncaught SyntaxError: Unexpected token o
Please verify your object. I'm sure that if you do JSON.parse(JSON.stringify(yourobject)), it will work.
See that exemple :
bitcoin_tick = {last:200};
bitcoin_tick = JSON.stringify(bitcoin_tick);
JSON.parse(bitcoin_tick);
cryptsy is kaput!