place_fund_order
Record an off-exchange fund subscription you already placed: deduct ledger cash, track it in transit, and confirm shares when NAV publishes.
Instructions
Record the first leg of an off-exchange fund purchase the user already
placed with the fund platform: cash - amount, and the order is tracked as
in transit (status.pending_fund_orders). Total assets do not change
(the in-transit amount counts at face value), so there is no fake dip
between order day and confirmation. Shares arrive when the pricing-day NAV
is published: the fund_confirm job confirms automatically, or call
confirm_fund_order. Bookkeeping only — openInvest never places orders.
The expected confirm date uses a Monday-Friday calendar (no China holiday
table) and a lag by fund type (QDII / FOF are slower, read from the fund's
profile); the result says so (calendar, lag_source).
Confirm fund, amount, and order time with the user before calling; this moves ledger cash.
Args: symbol: FUND:<6 digits>. amount: Subscription amount in CNY; must be > 0. currency: Currency of the amount (CNY). order_ts: Order time, ISO 8601 Beijing time (default now). note: Free-text note. idempotency_key: Reuse the same key when retrying this exact call; recorded once.
Returns:
order_id, pricing day (nav_date), expected confirm date, and new cash
balance, or {"status": "error", "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Free-text note stored with the order and ledger row. | |
| amount | Yes | Subscription amount in CNY (cash deducted now); must be > 0. | |
| symbol | Yes | Off-exchange China mutual fund: 'FUND:<6-digit code>' (a bare 6-digit code is also accepted). | |
| currency | No | Currency of the amount; off-exchange funds are CNY. | CNY |
| order_ts | No | When the order was placed, ISO 8601 in Beijing time (e.g. '2026-10-19T14:30:00'); default now. Before 15:00 on a trading day the order is priced at that day's NAV, otherwise at the next trading day's. Pass the real time when back-filling an order placed earlier. | |
| idempotency_key | No | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "duplicate"} without touching cash or holdings. Only the key is compared, not the arguments — a different order (other symbol/units/price/amount) needs a new key, or it is silently treated as the retry. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |