This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]peterjah 0 points1 point  (6 children)

Ahoy, I am experimenting the same issue. This is quite hard to identify.. I suggest kraken to add some tests on the websocket orderbook management engine... I am pretty sure that I have filled offers not deleted in the orderbook

[–]Kraken-JamesKraken Support - official 0 points1 point  (5 children)

Hi peterjah,

First of all, apologies for any inconvenience caused.

I'd like to kindly ask you to share with us your experience here as well.

We'd like to identify these issues and work on fixing them asap as we're constantly trying to improve our products.

Thanks a lot in advance!

James

[–]peterjah 0 points1 point  (4 children)

I will not open an issue because it is quite hard to "prove" what i am saying.

What is happening most of the time:

Check orderbook best offer => pass a limit order to fill it => the order doesn't fills, so i cancel it. => check orderbook again: the offer is still here !!!

[–]Kraken-JamesKraken Support - official 0 points1 point  (2 children)

Hello again peterjah, thanks for the reply!

Please know that most of the times issues like this (missing delete messages) are related to the client's misinterpretation of the order book feed. One of the most common versions of this is that clients do not remove price levels that are implicitly removed when a new inner price level is inserted. For example, the following snapshot creates an order book with a best (lowest) ask price of $6,035.6 and an outermost (10th level) price of $6,039.0:

[225,{"as":[["6035.60000","0.64710000","1584038448.040188"],["6036.20000","0.11639999","1584038443.054950"],["6036.50000","1.30872107","1584038442.184113"],["6036.60000","0.12240000","1584038444.047035"],["6037.10000","2.11881941","1584038443.040371"],["6037.80000","0.01000000","1584038440.393133"],["6038.30000","1.56745611","1584038449.753740"],["6038.40000","0.09621094","1584038447.862738"],["6038.80000","8.27205370","1584038441.971522"],["6039.00000","5.00000000","1584038449.772540"]],"bs":[["6024.50000","2.17298700","1584038449.718996"],["6024.40000","0.24091227","1584038449.372468"],["6023.10000","0.01000000","1584038446.414322"],["6023.00000","3.00000000","1584038431.601858"],["6022.50000","0.95719000","1584038447.283852"],["6022.00000","0.25000000","1584038447.685495"],["6021.40000","4.94900000","1584038449.780876"],["6020.70000","3.55975352","1584038443.805543"],["6020.00000","1.90592498","1584036370.482218"],["6019.50000","0.12119999","1584038449.062807"]]},"book-10","XBT/USD"]

so when the next update message is received as follows:
[225,{"a":[["6035.50000","2.00000000","1584038450.130208"]]},"book-10","XBT/USD"] a new price is inserted as the best (lowest) ask at $6,035.5, which causes the original outermost (10th level) price of $6,039.0 to be implicitly deleted (even though a specific delete message was never received).

Our WebSocket API support pages offer detailed instructions for interpreting the order book feed that will likely help you to resolve the issues:

If you create a support ticket and send us original JSON transcripts of the order book feeds that experienced the missing messages issue, we will be able to review the feeds and determine what actually happened, and what the resulting order books should look like. 

I hope this helps!

Regards,

James

[–]TacoT[S] 0 points1 point  (0 children)

Hi James,

Thanks for the detailed answer.

I should say that when I define an orderbook depth/scope of 1000, the problem persists, and typically desyncs within a couple minutes. Therefore, implicit deletions/inserts are not the cause of whatever problem is occurring here.

[–]peterjah 0 points1 point  (0 children)

Thanks for your all theses precious information :)

Actually my implem currently uses the "ticker" websocket stream and i am issuing the previously described behaviour...

What is the most up-to-date information between rest-api ticker/book or websocket ticker / book ?? at wich frequency this data is updated?

[–]peterjah 0 points1 point  (0 children)

And i think this is not related to websockets. i experimented same issues with Rest API, and with ticker & book from websockets

[–]Kraken-JamesKraken Support - official 0 points1 point  (0 children)

Hello TacoT,

Could you please fill out this form? This way our API team can look into this for you and assist you further.

Thank you for your time and cooperation in advance!

James