Skip to content

Conversation

@AlstonLi007
Copy link
Owner

Summary

  • add a lightweight IBKR client abstraction that supports time-in-force and client order identifiers
  • validate time-in-force combinations when building orders and surface the values in the response payload
  • cover the new behaviour with unit tests that exercise order construction and gateway submission

Testing

  • pytest

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

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 +167 to +170
order.tif = tif
if client_order_id is not None:
order.orderId = str(client_order_id)
order.transmit = True

Choose a reason for hiding this comment

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

P1 Badge Avoid overwriting IBKR orderId with client order id

When client_order_id is passed, the wrapper stores it in order.orderId. In the real IBKR API orderId must remain a monotonically increasing integer obtained from nextValidId; replacing it with an arbitrary string breaks order submission. IBKR exposes a separate clientOrderId field for caller-supplied identifiers that should be used instead, leaving orderId untouched. As implemented, any order using client_order_id will be rejected by the gateway.

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