Skip to content

Fix multiple bugs in market maker bot#1

Open
jme21 wants to merge 1 commit intolorine93s:mainfrom
jme21:claude/project-review-refactor-7eFt4
Open

Fix multiple bugs in market maker bot#1
jme21 wants to merge 1 commit intolorine93s:mainfrom
jme21:claude/project-review-refactor-7eFt4

Conversation

@jme21
Copy link

@jme21 jme21 commented Dec 23, 2025

  • Fix async/sync mismatch: _handle_orderbook_update is now async to match the await call in websocket_client.py:70
  • Fix orderbook validation: change best_ask <= 1 to best_ask <= 0 to avoid false warnings on valid ask prices like 0.5
  • Fix WebSocket type annotation: use WebSocketClientProtocol instead of WebSocketServerProtocol
  • Fix pending_cancellations leak: discard order_id after successful cancel
  • Fix load_dotenv order: call before Settings() instantiation so env vars are loaded before pydantic reads them

- Fix async/sync mismatch: _handle_orderbook_update is now async to match
  the await call in websocket_client.py:70
- Fix orderbook validation: change `best_ask <= 1` to `best_ask <= 0` to
  avoid false warnings on valid ask prices like 0.5
- Fix WebSocket type annotation: use WebSocketClientProtocol instead of
  WebSocketServerProtocol
- Fix pending_cancellations leak: discard order_id after successful cancel
- Fix load_dotenv order: call before Settings() instantiation so env vars
  are loaded before pydantic reads them
@jme21 jme21 closed this Dec 23, 2025
@jme21 jme21 reopened this Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants