tmiklas / WWW-CexIo-API

Trading API helper module for Cex.io
0 stars 1 forks source link

unexpected end of string while parsing JSON string #2

Closed crazygeekone closed 9 years ago

crazygeekone commented 9 years ago

Hi,

First thank to you for this great module, great job !

I have do one script with this module and after some days running i have the following error : unexpected end of string while parsing JSON string, at character offset 35472 (before "(end of string)") at WWW_CexIo_API.pm line 427.

I dont know if it me i m not very good in perl or if it s a module bug.

Can you have a look ?

Thanks.

tmiklas commented 9 years ago

Hi

I'm glad you like it. The error you get suggests the JSON data returned by CEX is somehow invalid and fails to decode.

Line 427 is _get() function that's called only for public, unauthenticated API functions. What was the last API call you executed before you get this error?

I just tried all anonymous calls using and they worked fine. I've also pushed the latest version - no changes in the logic, just small cleanup. Let me know how it goes.

crazygeekone commented 9 years ago

My script is in a while(1) so it make a lot of call and i wasn t in front of computer. But i think last api call that i have executed must be order_book. Note that my script was run 2 or 3 days with no problem.

tmiklas commented 9 years ago

I kept testing on my machine and didn't get any errors yet. Maybe some transient issue that resolved itself? Hard to say really at this stage. Please keep me informed if you see it again.

crazygeekone commented 9 years ago

Hi, Just to say that i have restart my script yesterday and today when i look my shell output i see this : , or ] expected while parsing array, at character offset 256635 (before "(end of string)") at WWW_CexIo_API.pm line 436. The error arrive long time after starting my script it s not direct. If you can have a look and correct it it will be great.

tmiklas commented 9 years ago

Fixed - see https://github.com/tmiklas/WWW-CexIo-API/issues/3