From 45ded4f2d155e946c39bf6eef384162023b6876d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 17 Jun 2023 14:43:54 -0400 Subject: [PATCH] binance: order submission "user id" is not the same as their internal `int` one.. --- piker/brokers/binance/api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/piker/brokers/binance/api.py b/piker/brokers/binance/api.py index ae657304..fc34ba29 100644 --- a/piker/brokers/binance/api.py +++ b/piker/brokers/binance/api.py @@ -661,10 +661,12 @@ class Client: signed=True, action='post' ) - reqid: str = resp['orderId'] - if oid: - assert oid == reqid + # ensure our id is tracked by them + if oid: + assert oid == resp['clientOrderId'] + + reqid: str = resp['orderId'] return reqid async def submit_cancel(