Quote Subscriptions¶
futu_subscribe¶
- Scope:
qot:read - Python SDK equivalent:
OpenQuoteContext.subscribe - Route: MCP JSON-RPC
tools/callwith name ="futu_subscribe"
Description:
Subscribe market data for given symbols + sub_types. Push data arrives via SSE notifications (HTTP mode). Python SDK: OpenQuoteContext.subscribe.
Request arguments:
| Field | Type | Required | Alias | Description |
|---|---|---|---|---|
symbols |
array of string | ✅ | stocks, code_list, symbol_list, security_list |
Security symbols to subscribe, e.g. ["HK.00700", "US.AAPL"]. Alias: stocks / code_list / symbol_list / security_list |
sub_types |
array of i32 | ✅ | sub_type_list |
Sub-type ids to subscribe. Accept int (1=Basic, 2=OrderBook, 4=Ticker, 5=RT, 6=KL_Day, 7=KL_5Min, 8=KL_15Min, 9=KL_30Min, 10=KL_60Min, 11=KL_1Min, 12=KL_Week, 13=KL_Month, 14=Broker, 15=KL_Quarter, 16=KL_Year, 17=KL_3Min, 18=KL_10Min, 19=KL_120Min, 20=KL_180Min, 21=KL_240Min, 22=OrderBook_Odd) OR string ("Basic" / "OrderBook" / "KL_Day" / "day" / ...). Alias: sub_type_list. Uses the daemon proto mapping: 3 is reserved/None, 4=Ticker, 10=KL_60Min, 13=KL_Month, 18=KL_10Min. Enum double-accept: Array of SubType enum values; each item accepts integer or string (Basic / OrderBook / KL_Day / KL_1Min / KL_5Min / ...) |
is_first_push |
boolean | ✓ default default_is_first_push |
— | If true, backend pushes current snapshot immediately after subscribe (useful for agents needing warm state). Default true. |
is_reg_push |
boolean | ✓ default default_is_reg_push |
— | If true, register push on this connection (agent will receive push via SSE notification in HTTP mode). Default true. |
extended_time |
boolean? | — | extendedTime |
Qot_Sub.extendedTime: include US pre/post-market data for supported real-time K/RT/Ticker subscriptions. Default false. |
session |
i32? | — | — | Session: 0=NONE, 1=RTH, 2=ETH, 3=ALL. OVERNIGHT is not supported for subscriptions. |
is_sub_order_book_detail |
boolean? | — | is_sub_order_book_detail, orderbook_detail |
Qot_Sub.isSubOrderBookDetail: subscribe order-book detail when available. Default false. |
⚠️ Unknown fields:
deny_unknown_fieldsis enabled — any field not listed above returns anunknown fielderror (previously silently dropped).Runtime validation: this request type has a
validate()method that adds runtime required-field / enum-value validation on top of the JSON schema.
JSON-RPC call example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "futu_subscribe",
"arguments": {
"symbols": [
"HK.00700"
],
"sub_types": [
"Basic",
"OrderBook"
],
"is_first_push": true,
"is_reg_push": true
}
}
}
Response: JSON text matching the corresponding REST endpoint / Python SDK. On failure MCP CallToolResult.is_error=true + content carries {"error": "...", "status": "error"}.
futu_query_subscription¶
- Scope:
qot:read - Python SDK equivalent:
OpenQuoteContext.query_subscription - Route: MCP JSON-RPC
tools/callwith name ="futu_query_subscription"
Description:
Query current subscription state (subscribed types, quota used/remaining). Python SDK: OpenQuoteContext.query_subscription.
Request arguments:
| Field | Type | Required | Alias | Description |
|---|---|---|---|---|
is_req_all_conn |
boolean | ✓ default default |
— | true=query all connections; false=only this connection (default) |
⚠️ Unknown fields:
deny_unknown_fieldsis enabled — any field not listed above returns anunknown fielderror (previously silently dropped).
JSON-RPC call example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "futu_query_subscription",
"arguments": {
"is_req_all_conn": false
}
}
}
Response: JSON text matching the corresponding REST endpoint / Python SDK. On failure MCP CallToolResult.is_error=true + content carries {"error": "...", "status": "error"}.
futu_unsubscribe¶
- Scope:
qot:read - Python SDK equivalent:
OpenQuoteContext.unsubscribe - Route: MCP JSON-RPC
tools/callwith name ="futu_unsubscribe"
Description:
Unsubscribe market data (by symbol+type, or unsub_all to clear this connection). Python SDK: OpenQuoteContext.unsubscribe / unsubscribe_all.
Request arguments:
| Field | Type | Required | Alias | Description |
|---|---|---|---|---|
symbols |
array of string | ✓ default default |
stocks, code_list, symbol_list, security_list |
Security symbols to unsubscribe (ignored if unsub_all=true); alias: stocks / code_list / symbol_list / security_list |
sub_types |
array of i32 | ✓ default default |
sub_type_list |
Sub-type ids to unsubscribe. Accept int (1=Basic, 2=OrderBook, 4=Ticker, 5=RT, 6=KL_Day, 7=KL_5Min, 8=KL_15Min, 9=KL_30Min, 10=KL_60Min, 11=KL_1Min, 12=KL_Week, 13=KL_Month, 14=Broker, 15=KL_Quarter, 16=KL_Year, 17=KL_3Min, 18=KL_10Min, 19=KL_120Min, 20=KL_180Min, 21=KL_240Min, 22=OrderBook_Odd) OR string ("Basic" / "OrderBook" / "KL_Day" / "day" / ...). Alias: sub_type_list. Uses the daemon proto mapping: 3 is reserved/None, 4=Ticker, 10=KL_60Min, 13=KL_Month, 18=KL_10Min. Enum double-accept: Array of SubType enum values; each item accepts integer or string (Basic / OrderBook / KL_Day / KL_1Min / KL_5Min / ...) |
unsub_all |
boolean | ✓ default default |
unsubscribe_all |
true=clear all subscriptions on this connection (ignores symbols/sub_types); alias: unsubscribe_all |
⚠️ Unknown fields:
deny_unknown_fieldsis enabled — any field not listed above returns anunknown fielderror (previously silently dropped).
JSON-RPC call example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "futu_unsubscribe",
"arguments": {
"symbols": [
"HK.00700"
],
"sub_types": [
"Basic",
"OrderBook"
],
"unsub_all": false
}
}
}
Response: JSON text matching the corresponding REST endpoint / Python SDK. On failure MCP CallToolResult.is_error=true + content carries {"error": "...", "status": "error"}.