Skip to content

feat(trade): add attached order (take-profit/stop-loss) support#85

Open
sunli829 wants to merge 6 commits into
mainfrom
feat/attached-orders
Open

feat(trade): add attached order (take-profit/stop-loss) support#85
sunli829 wants to merge 6 commits into
mainfrom
feat/attached-orders

Conversation

@sunli829

Copy link
Copy Markdown
Contributor

Summary

  • Switch openapi-sdk dependency to feat/attached-orders branch (PR feat(trade): add attached order (take-profit/stop-loss) support openapi#549); revert to main once that PR merges
  • Add attached_order_type, profit_taker_price, stop_loss_price and related params to submit_order and replace_order tools
  • Add is_attached filter to today_orders (list only attached legs) and order_detail (query an attached order by its own ID)
  • Add AttachedOrderDetailResponse output schema type; OrderDetailResponse now includes attached_orders[]

Test plan

  • cargo build — clean
  • cargo clippy --all-features --all-targets — no warnings
  • cargo test — all pre-existing tests pass
  • Manual: submit a Bracket order with profit_taker_price + stop_loss_price, verify order_detail returns attached_orders with two legs
  • Manual: today_orders with is_attached=true returns only attached legs
  • Manual: order_detail with is_attached=true returns the attached order detail

🤖 Generated with Claude Code

sunli829 added 6 commits June 18, 2026 08:38
- Switch openapi-sdk dependency to feat/attached-orders branch (PR #549)
- Add attached order params to submit_order and replace_order tools
- Add is_attached filter to today_orders and order_detail tools
- Add AttachedOrderDetailResponse to output schema
- ReplaceOrderParam: add attached_main_id, attached_quantity, attached_market_price
- AttachedOrderDetailResponse: add counter_id, executed_amount, tag, force_only_rth
is_attached only applies when order_id is also set; it tells the server
the given order_id belongs to an attached order. It does not filter
results to show only attached orders. Also expose order_id param.
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.

1 participant