Skip to content

v0.3.10

Choose a tag to compare

@Quantweb3-Scott Quantweb3-Scott released this 20 Mar 04:37
· 61 commits to main since this release

Performance: WebSocket startup ~4-5s (was ~12s)

Private-connector startup was dominated by fixed asyncio.sleep(5) calls used as a safety margin after sending WebSocket auth payloads. Each exchange had at least two sequential sleeps (WS API client + private WS client), totalling ~10-12 seconds of idle waiting before the engine was ready.

Two complementary optimisations eliminate almost all of that overhead:

1. Event-driven auth completion

asyncio.sleep(5) is replaced by an asyncio.Event that fires as soon as the exchange acknowledges the auth request. A 5-second timeout is kept as a safety fallback. Each exchange OMS now detects the auth/login response and calls notify_auth_success() on the corresponding WS client.

2. Parallel WS connection startup

  • Bybit, OKX, Bitget: Private connectors now connect and authenticate both the WS API client and the private WS client concurrently via asyncio.gather() instead of sequentially.
  • Binance (non-spot): WS API connection and REST listen-key request are now parallelised via asyncio.gather().

Affected exchanges

Binance, Bybit, OKX, Bitget

Full Changelog

https://github.com/Quantweb3-com/NexusTrader/blob/main/CHANGELOG.md#0310---2026-03-20