Skip to content

Conversation

@AlstonLi007
Copy link
Owner

Summary

  • add shared broker contracts to normalize order and position structures
  • register IBKR and Tradovate gateways behind a broker routing facade and implement IBKR cancel
  • extend the CLI with cancel, modify, and websocket listen commands for both brokers

Testing

  • python -m openbb_lab.cli ibkr_ws_listen
  • python -m openbb_lab.cli tradovate_ws_listen

https://chatgpt.com/codex/tasks/task_e_68e7c7d8aa948321a86f599f5fcb2c7e

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +78 to +80
def _handle_ibkr_ws_listen(_: argparse.Namespace) -> Any:
events = list(broker_gateway.websocket_listen("ibkr"))
return events

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stream websocket events instead of materializing the iterator

The websocket listener handler converts broker_gateway.websocket_listen("ibkr") into a list and returns it. Broker websocket streams typically never terminate, so this call will block until the stream closes and will retain every event in memory before anything is printed. Iterating over the iterator and emitting each event as it arrives would allow the CLI command to display live updates and avoid unbounded memory growth. (The Tradovate handler mirrors the same pattern.)

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants