From 2ade2bba7ba42628330c8633719bf4a11f99a753 Mon Sep 17 00:00:00 2001 From: Chris Sellers Date: Tue, 2 Jan 2024 19:20:32 +1100 Subject: [PATCH] Add BinanceErrorCode.SERVER_BUSY --- RELEASES.md | 1 + nautilus_trader/adapters/binance/common/enums.py | 1 + nautilus_trader/adapters/binance/common/execution.py | 1 + 3 files changed, 3 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index c6f614891952..51f3101e8781 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -26,6 +26,7 @@ Released on TBD (UTC). ### Fixes - Fixed handling of configuration objects to work with `StreamingFeatherWriter` - Fixed `BinanceSpotInstrumentProvider` fee loading key error for partial instruments load, thanks for reporting @doublier1 +- Added `BinanceErrorCode.SERVER_BUSY` (-1008). Also added to the retry error codes. --- diff --git a/nautilus_trader/adapters/binance/common/enums.py b/nautilus_trader/adapters/binance/common/enums.py index 44478e9db734..a708ef480b2f 100644 --- a/nautilus_trader/adapters/binance/common/enums.py +++ b/nautilus_trader/adapters/binance/common/enums.py @@ -270,6 +270,7 @@ class BinanceErrorCode(Enum): NO_SUCH_IP = -1005 UNEXPECTED_RESP = -1006 TIMEOUT = -1007 + SERVER_BUSY = -1008 ERROR_MSG_RECEIVED = -1010 NON_WHITE_LIST = -1011 INVALID_MESSAGE = -1013 diff --git a/nautilus_trader/adapters/binance/common/execution.py b/nautilus_trader/adapters/binance/common/execution.py index a948a44207d1..79e28bf035f1 100644 --- a/nautilus_trader/adapters/binance/common/execution.py +++ b/nautilus_trader/adapters/binance/common/execution.py @@ -214,6 +214,7 @@ def __init__( BinanceErrorCode.DISCONNECTED, BinanceErrorCode.TOO_MANY_REQUESTS, # Short retry delays may result in bans BinanceErrorCode.TIMEOUT, + BinanceErrorCode.SERVER_BUSY, BinanceErrorCode.INVALID_TIMESTAMP, BinanceErrorCode.CANCEL_REJECTED, BinanceErrorCode.ME_RECVWINDOW_REJECT,