Skip to content

feat(trade): re-enable all_executions across all SDKs#559

Draft
sunli829 wants to merge 10 commits into
mainfrom
feat/enable-all-executions
Draft

feat(trade): re-enable all_executions across all SDKs#559
sunli829 wants to merge 10 commits into
mainfrom
feat/enable-all-executions

Conversation

@sunli829

Copy link
Copy Markdown
Collaborator

Summary

Re-enable the previously disabled all_executions API across all language SDKs now that the API is available.

Changes

  • Uncomment all_executions implementations in Rust, blocking Rust, Python (sync & async), Java, Node.js, C, and C++ SDKs
  • Restore Python type stub (openapi.pyi) for both TradeContext and AsyncTradeContext
  • Fix unused imports surfaced by clippy

Test plan

  • Verify all_executions returns data against live API

🤖 Generated with Claude Code

sunli829 added 10 commits July 22, 2026 17:11
Add attached order API support across all language SDKs based on
developers PR #1092.

New types:
- AttachedOrderType enum (ProfitTaker / StopLoss / Bracket)
- AttachedOrderDetail response struct
- SubmitAttachedParams / ReplaceAttachedParams request builders
- GetOrderDetailOptions (with is_attached flag)

API changes (non-breaking):
- Order / OrderDetail: new attached_orders field
- SubmitOrderOptions: new attached_params builder
- ReplaceOrderOptions: new attached_params builder
- GetTodayOrdersOptions: new is_attached() flag
- order_detail: accepts impl Into<GetOrderDetailOptions>
- New order_detail_attached method (Rust/Python/Node.js/Java/C/C++)
Bugs fixed:
- AttachedOrderType serialized as "Bracket" instead of "BRACKET" — switched
  from #[derive(Serialize)] to impl_serde_for_enum_string! to use strum Display
- SubmitOrderOptions.expire_date serialized as null when absent — added
  skip_serializing_if = "Option::is_none"
- AttachedOrderDetail.attached_type_display was i32, now AttachedOrderType
- AttachedOrderDetail.trigger_status was i32, now Option<TriggerStatus>
- AttachedOrderDetail.tag was i32, now OrderTag
- AttachedOrderDetail.executed_price was Decimal, now Option<Decimal>
- OrderDetail.charge_detail was non-optional, now Option<OrderChargeDetail>
  (C SDK: added has_charge_detail bool flag)
- Java SdkNative.tradeContextOrderDetailAttached missing public modifier

Add AttachedOrderType::Unknown variant across all language bindings.
Add submit_order_with_attached examples for all languages.
Update CLAUDE.md: python/pyproject.toml uses dynamic = ["version"].
…nd GetOrderDetailOptions

is_attached=true indicates that the provided order_id is an attached
sub-order ID, not a regular order ID. It does not filter results to
show only attached orders.
is_attached=true only takes effect when combined with order_id.
It tells the server to treat order_id as an attached sub-order ID
for lookup. Without order_id it has no effect and does NOT filter
results to show only attached orders.
…rent

Based on actual API testing: today_orders(order_id=attached_id, is_attached=True)
returns the attached sub-order as an Order entry with its own order_id,
side, order_type etc — not the parent order.
Rebasing feat/attached-orders onto main required merging attached-order
changes with the US market APIs / client_request_id features; the naive
git merge left nodejs/index.d.ts with duplicate US-market method
declarations (no conflict markers, just misaligned content). Rebuilding
with napi and rustfmt brings the generated files back in sync with the
Rust source.
The withdraw endpoint gained an optional is_attached flag (per
developers PR #1092) so a take-profit/stop-loss sub-order can be
cancelled by its own order ID. Wired non-breakingly per language:
Rust CancelOrderOptions (impl Into<T>, backward-compatible via
From<&str>/From<String>), Python is_attached kwarg, Node.js optional
isAttached param, C++ defaulted parameter, Java cancelOrder overload,
and a new C lb_trade_context_cancel_order_attached symbol.
The API is now available. Uncomment the previously disabled
all_executions implementations in Rust, blocking, Python (sync/async),
Java, Node.js, C, and C++ SDKs, and restore the Python type stub.
@sunli829
sunli829 marked this pull request as draft July 22, 2026 09:34
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