Closed VitalyVaryvdin closed 3 years ago
Found the issue.
Use of curl writefunction callback is incorrect.
nmemb
aborts the request.
callback should return the number of bytes actually taken care of. If that amount differs from the amount passed to your callback function, it'll signal an error condition to the library.
Changed callback to only append response data to RequestHandler and removed everything else.
Also, json parsing should happen right after curl_easy_perform
, or at any point below that.
Hey @VitalyVaryvdin Can you please share the code snippet that solved this issue here?
thanks for bringing this up, fixed and tested in https://github.com/adanikel/BinanceExtensionCPP/pull/60 I will apply a few more minor changes and release a new version, let me know if this can be closed
Sorry for late reply Glad to be helpful :) Yeah, im closing this now, just wanted to make sure you see it before closing
Getting klines I'm randomly receiving malformed kline object which is always last in response
You can see it here between two good klines. Didn't happen with python-binance so i thought that might be library issue. Json above is formed by doing multiple requests so in this case it's not last in the list.