跳转至

到价 / 事件提醒

MCP 工具总览

futu_set_price_reminder

  • Scope: qot:write
  • Python SDK 等价: OpenQuoteContext.set_price_reminder
  • 路由: MCP JSON-RPC tools/call name = "futu_set_price_reminder"

说明:

Set price reminder. op accepts integer code 1-6 (1=Add, 2=Del, 3=Enable, 4=Disable, 5=Modify, 6=DeleteAll); MCP also accepts string aliases Add/Del/Enable/Disable/Modify/DeleteAll (and legacy SetAdd/SetDel/SetEnable/SetDisable/DelAll). Add (op=1) requires reminder_type + freq + value. Modify (op=5) requires key (other fields preserved when omitted). Python SDK: OpenQuoteContext.set_price_reminder.

请求参数:

字段 类型 必填 Alias 说明
symbol string ✅ code, stock Security symbol (e.g. "HK.00700"). Field aliases: code / stock (deprecated — prefer canonical symbol).
op i32 ✅ op_type, operation Op: 1=Add / SetAdd, 2=Del / SetDel, 3=Enable / SetEnable, 4=Disable / SetDisable, 5=Modify, 6=DeleteAll / DelAll. Accepts integer code OR string form (e.g. 1 or "Add"). Aliases for the field name: op_type / operation (deprecated — prefer canonical op).
Enum double-accept: Accepts integer op code (1-6) or string (Add / Del / Enable / Disable / Modify / DeleteAll and SetAdd aliases)
key i64? — — Reminder key (from get_price_reminder; required for modify/del/enable/disable)
reminder_type i32? — — Qot_Common::PriceReminderType: 1=PriceUp, 2=PriceDown, 3=ChangeRateUp, 4=ChangeRateDown, 5=5MinChangeRateUp, 6=5MinChangeRateDown, 7=VolumeUp, 8=TurnoverUp, 9=TurnoverRateUp, 10=BidPriceUp, 11=AskPriceDown, 12=BidVolUp, 13=AskVolUp, 14=3MinChangeRateUp, 15=3MinChangeRateDown.
freq i32? — — Qot_Common::PriceReminderFreq: 1=Always, 2=OncePerDay, 3=Once. Required for op=1 (Add) — the gateway rejects Add without freq. Optional for op=5 (Modify) / ⅔/4 (Del/Enable/Disable) where the backend preserves the existing value when omitted.
value float? — — Threshold value (required for Add/Modify)
note string? — — User note (optional). Maximum length: 40 half-width bytes (~20 CN characters or 40 ASCII characters) using UTF-16 half-/full-width counting (each ASCII code unit = 1 byte, each non-ASCII code unit = 2 bytes).
reminder_session_list array of i32 ✓ 默认 default — Reminder session list (PriceReminderMarketStatus: 1=Open, 2=USPre, 3=USAfter, 4=USOverNight). For US stocks, an empty list defaults to [Open, USPre, USAfter]; for non-US securities the list is cleared.

⚠️ 未知字段: 启用 deny_unknown_fields — 任何未在表里的字段会返 unknown field error(之前静默 drop)。

运行时校验: 此 request 结构带 validate() 方法 — 在 schema 之外加额外的必填字段 / 枚举取值校验。

Runtime validation for op-conditional required fields. Required fields by op: - op=1 (Add): reminder_type + freq + value - op=5 (Modify): key (other fields are optional and the backend preserves the existing value when omitted) - op=⅔/4 (Del / Enable / Disable): key - op=6 (DeleteAll): no extra required fields Returns Err(String) with a human-readable hint for the agent / SDK user when validation fails.

JSON-RPC 调用示例:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "futu_set_price_reminder",
    "arguments": {
      "symbol": "HK.00700",
      "op": 1,
      "reminder_session_list": []
    }
  }
}

返回结构: 与对应 REST endpoint / Python SDK 返回结构一致的 JSON 文本。失败时 MCP CallToolResult.is_error=true + 内容带 {"error": "...", "status": "error"}。

futu_get_price_reminder

  • Scope: qot:read
  • Python SDK 等价: OpenQuoteContext.get_price_reminder
  • 路由: MCP JSON-RPC tools/call name = "futu_get_price_reminder"

说明:

Query price reminders (by symbol or market). Python SDK: OpenQuoteContext.get_price_reminder.

请求参数:

字段 类型 必填 Alias 说明
symbol string? — code, stock Security symbol (MARKET.CODE, e.g. HK.00700). Exactly one of symbol or market must be set. Passing both: symbol wins. Passing neither returns an error. The exactly-one rule is enforced at runtime. Alias: code / stock
market i32? — — Market code — price-reminder QotMarket subset. Accept int 1=HK, 2=HK_FUTURE, 11=US, 21=SH/CN, 22=SZ, 31=SG, 41=JP, 61=MY, 91=CC OR string ("HK" / "HK_FUTURE" / "US" / "SH" / "SZ" / "CN" / "SG" / "JP" / "MY" / "CC"). Exactly one of symbol or market required (see symbol field doc).

⚠️ 未知字段: 启用 deny_unknown_fields — 任何未在表里的字段会返 unknown field error(之前静默 drop)。

运行时校验: 此 request 结构带 validate() 方法 — 在 schema 之外加额外的必填字段 / 枚举取值校验。

Runtime validation: symbol XOR market is required. Schema-level oneOf is not enforceable through this serde shape, so the handler returns a clear runtime validation error.

JSON-RPC 调用示例:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "futu_get_price_reminder",
    "arguments": {
      "symbol": "HK.00700",
      "market": "HK"
    }
  }
}

返回结构: 与对应 REST endpoint / Python SDK 返回结构一致的 JSON 文本。失败时 MCP CallToolResult.is_error=true + 内容带 {"error": "...", "status": "error"}。

futu_get_option_event_alert

  • Scope: qot:read
  • Python SDK 等价: —
  • 路由: MCP JSON-RPC tools/call name = "futu_get_option_event_alert"

说明:

Get option-event alert settings. Public QOT 3308.

请求参数:

字段 类型 必填 Alias 说明
c2s_json string ✅ — Official generated C2S JSON. Field names use generated proto serde snake_case, e.g. multi_legs / combo_legs / order_type.
api_key string? — — Optional per-call API key plaintext. HTTP scope mode still requires a valid Bearer on every /mcp request; this field overrides that identity for the tool handler. In stdio mode: tool argument > startup key.

⚠️ 未知字段: 启用 deny_unknown_fields — 任何未在表里的字段会返 unknown field error(之前静默 drop)。

JSON-RPC 调用示例:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "futu_get_option_event_alert",
    "arguments": {
      "c2s_json": "…",
      "api_key": "optional-per-call-api-key"
    }
  }
}

返回结构: 与对应 REST endpoint / Python SDK 返回结构一致的 JSON 文本。失败时 MCP CallToolResult.is_error=true + 内容带 {"error": "...", "status": "error"}。

futu_set_option_event_alert

  • Scope: qot:write
  • Python SDK 等价: —
  • 路由: MCP JSON-RPC tools/call name = "futu_set_option_event_alert"

说明:

Mutate option-event alert settings. Public QOT 3309.

请求参数:

字段 类型 必填 Alias 说明
c2s_json string ✅ — Official generated C2S JSON. Field names use generated proto serde snake_case, e.g. multi_legs / combo_legs / order_type.
api_key string? — — Optional per-call API key plaintext. HTTP scope mode still requires a valid Bearer on every /mcp request; this field overrides that identity for the tool handler. In stdio mode: tool argument > startup key.

⚠️ 未知字段: 启用 deny_unknown_fields — 任何未在表里的字段会返 unknown field error(之前静默 drop)。

JSON-RPC 调用示例:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "futu_set_option_event_alert",
    "arguments": {
      "c2s_json": "…",
      "api_key": "optional-per-call-api-key"
    }
  }
}

返回结构: 与对应 REST endpoint / Python SDK 返回结构一致的 JSON 文本。失败时 MCP CallToolResult.is_error=true + 内容带 {"error": "...", "status": "error"}。