orionx-dev / orionx-sdk-js

The official Orionx SDK for JavaScript
https://orionx.com
MIT License
8 stars 4 forks source link

Uncaught (in promise) Error: Unexpected token T in JSON at position 0 #38

Open shortthefomo opened 2 years ago

shortthefomo commented 2 years ago
Screen Shot 2022-04-28 at 21 24 53

SDK bug, when parsing json

shortthefomo commented 2 years ago

this is from the call of

const wallets = await Orionx.wallets({})

joadr commented 2 years ago

I suspect you are being rate limited and sdk is unable to read the response

shortthefomo commented 2 years ago

Dunno moved off to another more stable api.

My code was 1 call to wallet balance, order book and open orders. (Reinitialize data, every 10 min)

The updates were done all via the channels binded.

Then every 5/10/15 min would cancel and recreate orders x2 buy x2 sell.

Rather minimal calls.

joadr commented 2 years ago

Oh no, that's so bad. I'm so sorry for your experience. I really apologize!! We are currently moving our infrastructure from amazon lambda for the api, to Mercurius (graphql on fastify) on our kubernetes cluster, and these issues are part of the adaptation, we have been working on this project since 2017 and we have had close to 99% uptime since. We have raised a funding round and we are making lots of changes to gain agility and be able to deploy and mutate our code base faster. I hope you could reconsider moving out, we are 100% willing to answer your questions and help you in any way, also feedback is very much appreciated.

shortthefomo commented 2 years ago

Hey Joadr, not going to leave the exchange. I know first hand the pains of software and building good API's.

I do need to get moving with some deliverables my side. So have opted to push forward else where.

Once your move is done and I've got what I need up. I will return to try reintegration again.

So you will still find me popping up here in this issue queue from time to time.

Came across krakens crc32 check sum for the dynamic books that get rebuilt like you implement here. A good one to add to you back log do check it out! docs.kraken.com/websockets/#book-checksum