Price and indicator reminder settings¶
Start the gateway with --enable-desktop-phase2-reads to enable reads; mutations also require --enable-desktop-phase2-writes. Both default to off and grant no additional API-key permissions. Live backend behavior remains unverified.
| Operation | REST POST | MCP | CLI | Scope |
|---|---|---|---|---|
| Read | /api/reminder-settings |
futu_get_reminder_settings |
reminder-settings |
qot:read |
| Mutate | /api/mutate-reminder-settings |
futu_mutate_reminder_settings |
mutate-reminder-settings |
qot:write |
Both accept c2s_json / --c2s-json with extension_version: 1. CLI and MCP mutations forward the actual caller's API key through the configured REST URL. Gateway and generic gRPC use the corresponding public protocol messages.
Read¶
Omit stock_id to read all current-user reminders. An explicit ID must be nonzero. Responses preserve raw price, indicator and any received common/portfolio fields, including presence, unknown enums, signed precision and 64-bit keys. Price and indicator keys occupy different namespaces. Use JSON tooling that preserves 64-bit integers.
Mutate¶
{"extension_version":1,"intent_key":"disable-reminder-example","quote_broker_id":0,"operations":[{"operation":5,"stock_id":0,"kind":2,"key":0}]}
⚠️ Stock/key 0 values are deliberately invalid placeholders. Read the current user's reminders and substitute their actual identities before submitting. Explicit quote_broker_id must be 0, 1001, 1007 or 1008. The ordered operations array must be nonempty. Each operation requires operation, stock_id and source kind (1 price, 2 indicator).
| Operation | Meaning | Additional fields |
|---|---|---|
| 1 | Add indicator | kind 2, indicator definition; no key or price |
| 2 | Edit same indicator category | kind 2, key and indicator definition |
| 3 | Replace category | original kind/key, exactly one indicator or price destination definition |
| 4 / 5 / 6 | Enable / disable / delete | key, no destination definition |
Content edits and category replacements re-enable the reminder. New ordinary price reminders use the existing API. A batch may mix stocks and reminder kinds. Replacement deletes and adds in one batch; the backend does not promise atomic rollback.
Indicator definitions require indicator_type, freq_type, note, and a supported form or comparison. Writes support daily candles and frequencies 1/2/4. MA/EMA periods are 5/10/20/30/60/120/250; RSI 6/12/24; KDJ [9,3,3]; MACD [12,26,9]; BOLL [20,2]. Custom comparisons preserve signed integers. Unsupported combinations are rejected; an unknown type in a read does not authorize creating it.
| indicator_type | Indicator |
|---|---|
| 1 / 2 | MA / EMA |
| 3 / 4 | KDJ / RSI |
| 5 / 6 | MACD / BOLL |
Raw numeric units¶
The API accepts integers already converted to the units below. It does not automatically convert percentages, K/ten-thousands, price precision or decimal rounding. Use decimal fixed-point arithmetic.
| warn_type | Meaning | fine_warn_param |
|---|---|---|
| 4, 8, 14, 15 | Price above/below, best bid/ask price | Quoted price × 10^9 |
| 1, 2, 9, 10, 19, 20 | Daily / 5-minute / 3-minute percentage changes | Percentage points × 1000; 5% is 5000 |
| 13 | Turnover rate | Percentage points × 1000 |
| 11 | Volume | Non-derivatives: quantity in ten-thousands × 1000; options/futures: contracts × 1000 |
| 12 | Turnover amount | Amount in ten-thousands × 1000 |
| 16, 17 | Best bid/ask quantity | Non-derivatives: quantity in thousands × 1000; options/futures: contracts × 1000 |
| 18 | Announcement | 0 |
Quantity units are contracts for options/futures, hands for other CN instruments, and shares for other non-derivatives. No additional lot-size conversion is performed. For volume, 25K and 2.5 ten-thousands both produce raw 2500. Instrument price precision changes the original client's input decimal limit, not the fixed 10^9 price multiplier.
A custom fixed indicator right-hand value uses value × 1000. The original client permits ±99,999,999.999 and truncates excess decimals toward zero: -12.3456 becomes -12345. This API requires the raw integer; it does not perform UI string conversion or rounding.
Receipts and retries¶
HTTP success or ret_type=0 means a receipt is available. Inspect s2c.receipt.ack_state:
ack_success: acknowledged success.ack_rejected: acknowledged failure; no claim of complete rollback.ack_partial: partial failure; no invented per-item result.submitted_unknown: outcome unknown; no automatic resend.
The receipt also contains receipt_id, replayed, raw result codes and observation_state (not_observed, observed, unavailable). Readback is separate from acknowledgement. Matching state cannot resolve unknown or identify the key created by an uncertain request.
Reusing an intent key returns its original receipt; changing the request under that key conflicts. Started sends are never replayed after restart. Unknown holds only overlapping target stocks. After a definite outcome, a new user decision requires a new intent key.