Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **All languages:** `Execution` gains a `side` field (`OrderSide`) — the buy/sell direction of the fill, now returned by the `today_executions`, `history_executions`, and `all_executions` responses
- **All languages:** attached order (take-profit / stop-loss) support for `submit_order` and `replace_order`
- New types: `AttachedOrderType` (`ProfitTaker` / `StopLoss` / `Bracket`), `AttachedOrderDetail`, `SubmitAttachedParams`, `ReplaceAttachedParams`
- `SubmitOrderOptions` / `ReplaceOrderOptions`: new `attached_params` field
- `GetTodayOrdersOptions`: new `is_attached` flag — when combined with `order_id`, treats `order_id` as an attached sub-order ID for lookup (has no effect without `order_id`)
- `Order` / `OrderDetail`: new `attached_orders: Vec<AttachedOrderDetail>` field
- New method `order_detail_attached(order_id)` — queries detail for an attached order by its own ID
- `order_detail` now accepts `GetOrderDetailOptions` (with optional `is_attached` flag) in addition to a plain order ID string
- `cancel_order` gains an `is_attached` flag to cancel an attached sub-order by its own order ID (Rust: `CancelOrderOptions`; Python: `is_attached` keyword arg; Node.js: optional `isAttached` param; C++/Java: `is_attached` overload/default parameter; C: new `lb_trade_context_cancel_order_attached`)

### Breaking changes

- **All languages:** `OrderDetail.charge_detail` is now `Option<OrderChargeDetail>` (previously non-optional). Attached orders return `null` for this field; callers must handle the absent case.
- **C SDK:** `lb_order_detail_t` gains a new `has_charge_detail: bool` field before `charge_detail`. Existing binaries must be recompiled; code that reads `charge_detail` directly should check `has_charge_detail` first.

## [4.4.1] - 2026-07-22

### Changed
Expand Down
10 changes: 10 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ When you add, remove, or change any `#[pyclass]`/`#[pymethods]` definitions in
signatures, type annotations, and docstrings in sync with the Rust
implementation.

To build and install the Python SDK locally (from the `python/` directory):

```bash
maturin develop
```

`python/pyproject.toml` uses `dynamic = ["version"]` — maturin reads the
version from `python/Cargo.toml` automatically. Do **not** add a hardcoded
`version` field to `pyproject.toml`.

## After modifying the C SDK (`c/`)

`c/csrc/include/longbridge.h` is **auto-generated** by `cbindgen` during the
Expand Down
Loading
Loading