File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ async def handle_order_requests(
188188 'event' : ep ,
189189 'token' : token ,
190190
191+ # XXX: this seems to always get an error response?
192+ # 'userref': f"'{reqid}'",
193+
191194 'reqid' : reqid , # remapped-to-int uid from ems
192195 'pair' : pair ,
193196 'price' : str (order .price ),
@@ -711,8 +714,7 @@ async def handle_order_updates(
711714 continue
712715
713716 case {
714- # XXX: lol, ws bug, this is always 0!
715- 'userref' : _,
717+ 'userref' : reqid ,
716718
717719 # during a fill this field is **not**
718720 # provided! but, it is always avail on
@@ -764,7 +766,15 @@ async def handle_order_updates(
764766 else :
765767 vlm = rest .get ('vol_exec' , 0 )
766768
767- reqid = reqids2txids .inverse .get (txid )
769+ ourreqid = reqids2txids .inverse .get (txid )
770+
771+ if ourreqid != reqid :
772+ log .warning (
773+ 'REQID MISMATCH due to kraken api bugs..\n '
774+ f'msg:{ reqid } , ours:{ ourreqid } '
775+ )
776+ reqid = ourreqid
777+
768778 oid = ids .inverse .get (reqid )
769779
770780 if (
You can’t perform that action at this time.
0 commit comments