Longbridge Developers
Get Started

longbridge fund (orders & trading)

Manage mutual-fund orders from the terminal — list your orders and transactions, inspect one order, validate an order before sending it, and submit or cancel an order.

Funds are identified by their counter_id (e.g. UT/FD/HK0000384492). These commands act on your account, so they require login; submit-order and cancel-order move real money and prompt for confirmation unless you pass --yes.

Basic Usage

# Your fund orders (also the trade / execution record)
longbridge fund orders
| Order ID           | Counter ID          | Action | Amount | Units   | Status    | Currency | Created At           |
|--------------------|---------------------|--------|--------|---------|-----------|----------|----------------------|
| 776181234567890123 | UT/FD/HK0000384492  | Buy    | 100.00 | —       | Filled    | USD      | 2026-09-20 10:03:11  |

Examples

Inspect orders & transactions

# All fund orders, or filtered
longbridge fund orders
longbridge fund orders --counter-id UT/FD/HK0000384492 --action buy --state filled \
  --currency USD --start 2026-01-01 --end 2026-09-30 --page 1 --size 20
# One order's detail
longbridge fund order 776181234567890123
# Cash-flow transaction records
longbridge fund transactions --currencies USD,HKD --start 2026-01-01 --end 2026-09-30

Validate before you buy

# Dry-run validation — places NO order, returns fees / estimated units / limits
longbridge fund validate-order UT/FD/KYG3861F1019 --action buy --currency USD --amount 100

Submit an order

# Buy by cash amount (prompts for confirmation)
longbridge fund submit-order UT/FD/KYG3861F1019 --action buy --currency USD --amount 100
# Sell by units, skipping the prompt
longbridge fund submit-order UT/FD/KYG3861F1019 --action sell --currency USD --units 50 --yes
# Sell the entire holding
longbridge fund submit-order UT/FD/KYG3861F1019 --action sell --currency USD --sell-all --yes

Cancel an order

# Withdraw an unfilled order (prompts for confirmation)
longbridge fund cancel-order 776181234567890123
longbridge fund cancel-order 776181234567890123 --yes

Add --format json to any command for machine-readable output.

Options

OptionCommandsDescriptionDefault
--counter-idordersFilter by fund counter id (repeatable)—
--actionorders, validate-order, submit-orderorders: filter (buy,sell); order commands: buy | sell—
--stateordersFilter by state(s), comma-separated—
--currencyorders, validate-order, submit-orderCurrency (e.g. USD, HKD)—
--business-type / --category / --currenciestransactionsTransaction filters—
--start / --endorders, transactionsDate range (YYYY-MM-DD or RFC 3339)—
--page / --sizeorders, transactionsPage number and page size—
--amountvalidate-order, submit-orderCash amount (amount-based order)—
--unitsvalidate-order, submit-orderUnit count (unit-based order)—
--dividend-optionvalidate-order, submit-orderDividend option—
--fund-sourcevalidate-orderFund source—
--feesubmit-orderFee—
--sell-allsubmit-orderSell the entire holdingfalse
--remarksubmit-orderOrder remark / note—
--yessubmit-order, cancel-orderSkip the interactive confirmationfalse
--formatallOutput format: table | jsontable

Requirements

OAuth trade permission is required — run longbridge auth login first. Always validate-order (or run submit-order without --yes to see the confirmation) before committing real capital. Funds are addressed by counter_id (from fund hot / fund list).

Notes

submit-order and cancel-order affect live capital and prompt for confirmation before running; pass --yes only in trusted, non-interactive contexts.