confirm_fund_order
Confirm a fund order to turn an in-transit order into shares at the pricing day's NAV, updating average cost and leaving cash unchanged.
Instructions
Second leg of an off-exchange fund purchase: turn an in-transit order
into shares at the pricing day's NAV (units = (amount - fee) / nav; average
cost updates, cash unchanged). The fund_confirm job does this
automatically every weekday evening, so call it manually only to supply a
NAV / fee yourself or to confirm early.
Safe to call twice: an order that is already confirmed returns {"status": "already_confirmed"} (a cancelled one {"status": "cancelled"}) and nothing changes. If the pricing-day NAV is not published yet the result is {"status": "pending_nav"} and the order stays in transit.
Args: order_id: The order to confirm. nav: Unit NAV; omit to use the published NAV of the pricing day. fee: Subscription fee in CNY (default 0).
Returns: Units added, NAV used and new average cost, or {"status": "error", "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Subscription fee in CNY, taken out of the order amount (units = (amount - fee) / nav). Default 0. | |
| nav | No | Unit NAV to confirm at. Omit to fetch the pricing day's published NAV (if it isn't published yet the call returns status 'pending_nav' and changes nothing). | |
| order_id | Yes | order_id from place_fund_order / status.pending_fund_orders. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |