From 03006313b51aeb30035438b2646e6d69246bbfa7 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/piker/brokers/binance/api.py b/piker/brokers/binance/api.py index ae6573049..fc34ba29f 100644 --- a/piker/brokers/binance/api.py +++ b/piker/brokers/binance/api.py @@ -661,10 +661,12 @@ async def submit_limit( signed=True, action='post' ) - reqid: str = resp['orderId'] + + # ensure our id is tracked by them if oid: - assert oid == reqid + assert oid == resp['clientOrderId'] + reqid: str = resp['orderId'] return reqid async def submit_cancel(