Add warning msg for `openOrders.userref` always being 0
parent
d43ba47ebe
commit
e6a3e8b65a
|
@ -188,6 +188,9 @@ async def handle_order_requests(
|
||||||
'event': ep,
|
'event': ep,
|
||||||
'token': token,
|
'token': token,
|
||||||
|
|
||||||
|
# XXX: this seems to always get an error response?
|
||||||
|
# 'userref': f"'{reqid}'",
|
||||||
|
|
||||||
'reqid': reqid, # remapped-to-int uid from ems
|
'reqid': reqid, # remapped-to-int uid from ems
|
||||||
'pair': pair,
|
'pair': pair,
|
||||||
'price': str(order.price),
|
'price': str(order.price),
|
||||||
|
@ -711,8 +714,7 @@ async def handle_order_updates(
|
||||||
continue
|
continue
|
||||||
|
|
||||||
case {
|
case {
|
||||||
# XXX: lol, ws bug, this is always 0!
|
'userref': reqid,
|
||||||
'userref': _,
|
|
||||||
|
|
||||||
# during a fill this field is **not**
|
# during a fill this field is **not**
|
||||||
# provided! but, it is always avail on
|
# provided! but, it is always avail on
|
||||||
|
@ -764,7 +766,15 @@ async def handle_order_updates(
|
||||||
else:
|
else:
|
||||||
vlm = rest.get('vol_exec', 0)
|
vlm = rest.get('vol_exec', 0)
|
||||||
|
|
||||||
reqid = reqids2txids.inverse.get(txid)
|
ourreqid = reqids2txids.inverse.get(txid)
|
||||||
|
|
||||||
|
if ourreqid != reqid:
|
||||||
|
log.warning(
|
||||||
|
'REQID MISMATCH due to kraken api bugs..\n'
|
||||||
|
f'msg:{reqid}, ours:{ourreqid}'
|
||||||
|
)
|
||||||
|
reqid = ourreqid
|
||||||
|
|
||||||
oid = ids.inverse.get(reqid)
|
oid = ids.inverse.get(reqid)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue