@oomol-lab/open-connector 1.6.5 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/assets/open-connector/catalog/apps/aisa.json +6138 -312
  2. package/assets/open-connector/catalog/apps/baizhi_mcp.json +135 -0
  3. package/assets/open-connector/catalog/apps/discordbot.json +2888 -248
  4. package/assets/open-connector/catalog/apps/drawio_mcp.json +192 -0
  5. package/assets/open-connector/catalog/apps/firecrawl.json +176 -32
  6. package/assets/open-connector/catalog/apps/framejet.json +273 -0
  7. package/assets/open-connector/catalog/apps/futunn.json +2967 -0
  8. package/assets/open-connector/catalog/apps/gmail.json +225 -0
  9. package/assets/open-connector/catalog/apps/google_analytics.json +4 -1
  10. package/assets/open-connector/catalog/apps/google_bigquery.json +4 -1
  11. package/assets/open-connector/catalog/apps/google_search_console.json +4 -1
  12. package/assets/open-connector/catalog/apps/googlecalendar.json +4 -1
  13. package/assets/open-connector/catalog/apps/googlechat.json +694 -7
  14. package/assets/open-connector/catalog/apps/googledocs.json +4 -1
  15. package/assets/open-connector/catalog/apps/googlesheets.json +4 -1
  16. package/assets/open-connector/catalog/apps/granola.json +23 -0
  17. package/assets/open-connector/catalog/apps/keepa.json +3534 -987
  18. package/assets/open-connector/catalog/apps/linear.json +17 -0
  19. package/assets/open-connector/catalog/apps/linear_mcp.json +510 -0
  20. package/assets/open-connector/catalog/apps/moneyforward_mcp.json +1432 -0
  21. package/assets/open-connector/catalog/apps/notion.json +446 -1
  22. package/assets/open-connector/catalog/apps/notion_mcp.json +490 -0
  23. package/assets/open-connector/catalog/apps/odoo.json +619 -0
  24. package/assets/open-connector/catalog/apps/outlook.json +30 -8
  25. package/assets/open-connector/catalog/apps/outlook_calendar.json +23 -2
  26. package/assets/open-connector/catalog/apps/postiz.json +334 -0
  27. package/assets/open-connector/catalog/apps/proworkflow.json +529 -0
  28. package/assets/open-connector/catalog/apps/sellersprite_mcp.json +2 -1
  29. package/assets/open-connector/catalog/apps/slack.json +223 -0
  30. package/assets/open-connector/catalog/apps/slackbot.json +214 -0
  31. package/assets/open-connector/catalog/apps/tencent_docs.json +3 -0
  32. package/assets/open-connector/catalog/apps/wisburg.json +1528 -0
  33. package/assets/open-connector/catalog/apps/youtube.json +4 -1
  34. package/assets/open-connector/catalog/apps/zerotier.json +3319 -0
  35. package/assets/open-connector/catalog/apps-index.json +1 -1
  36. package/package.json +1 -1
  37. package/src/core/cast.d.ts +10 -0
  38. package/src/core/cast.js +14 -0
  39. package/src/core/guarded-fetch.d.ts +6 -3
  40. package/src/core/guarded-fetch.js +6 -3
  41. package/src/core/provider-scenarios.js +67 -13
  42. package/src/core/request.js +4 -1
  43. package/src/core/types.d.ts +1 -1
  44. package/src/mcp.js +10 -7
  45. package/src/oauth/oauth-client-config-service.d.ts +16 -1
  46. package/src/oauth/oauth-client-config-service.js +59 -3
  47. package/src/oauth/oauth-flow-service.d.ts +6 -0
  48. package/src/oauth/oauth-flow-service.js +4 -2
  49. package/src/providers/17track/runtime.js +1 -1
  50. package/src/providers/action-contracts.generated.d.ts +17 -5
  51. package/src/providers/aifinmarket/runtime.js +1 -1
  52. package/src/providers/aisa/executors.js +734 -46
  53. package/src/providers/aliyun_ack/runtime.js +1 -1
  54. package/src/providers/aliyun_sls/runtime.js +1 -1
  55. package/src/providers/app_store_server/runtime-helpers.js +1 -1
  56. package/src/providers/baizhi_mcp/actions.d.ts +2 -0
  57. package/src/providers/baizhi_mcp/actions.js +40 -0
  58. package/src/providers/baizhi_mcp/executors.d.ts +3 -0
  59. package/src/providers/baizhi_mcp/executors.js +102 -0
  60. package/src/providers/bazhuayu/runtime.js +2 -2
  61. package/src/providers/bilibili/runtime.js +2 -4
  62. package/src/providers/bilibili/upload.js +9 -7
  63. package/src/providers/cloudflare_browser_rendering/executors.js +1 -1
  64. package/src/providers/cloudflare_dns/executors.js +1 -1
  65. package/src/providers/{cloudflare-current-user.js → cloudflare_dns/runtime-user.js} +2 -2
  66. package/src/providers/cloudflare_dns/runtime.d.ts +1 -1
  67. package/src/providers/cloudflare_dns/runtime.js +1 -1
  68. package/src/providers/cloudflare_r2/executors.js +1 -1
  69. package/src/providers/cloudflare_r2/runtime.d.ts +1 -1
  70. package/src/providers/cloudflare_r2/runtime.js +1 -1
  71. package/src/providers/cloudflare_worker/executors.js +1 -1
  72. package/src/providers/cloudflare_worker/runtime.d.ts +1 -1
  73. package/src/providers/cloudflare_worker/runtime.js +1 -1
  74. package/src/providers/dingtalk_mcp/runtime.js +1 -1
  75. package/src/providers/discordbot/executors.d.ts +0 -9
  76. package/src/providers/discordbot/executors.js +9 -101
  77. package/src/providers/discordbot/runtime-guilds.d.ts +3 -0
  78. package/src/providers/discordbot/runtime-guilds.js +464 -0
  79. package/src/providers/discordbot/runtime.d.ts +42 -0
  80. package/src/providers/discordbot/runtime.js +124 -0
  81. package/src/providers/drawio_mcp/executors.d.ts +3 -0
  82. package/src/providers/drawio_mcp/executors.js +19 -0
  83. package/src/providers/drawio_mcp/runtime.d.ts +8 -0
  84. package/src/providers/drawio_mcp/runtime.js +175 -0
  85. package/src/providers/fastmoss_mcp/executors.js +2 -2
  86. package/src/providers/finchina/executors.js +1 -1
  87. package/src/providers/framejet/executors.d.ts +4 -0
  88. package/src/providers/framejet/executors.js +19 -0
  89. package/src/providers/framejet/runtime.d.ts +16 -0
  90. package/src/providers/framejet/runtime.js +148 -0
  91. package/src/providers/futunn/actions.d.ts +2 -0
  92. package/src/providers/futunn/actions.js +152 -0
  93. package/src/providers/futunn/actions.research.d.ts +2 -0
  94. package/src/providers/futunn/actions.research.js +423 -0
  95. package/src/providers/futunn/actions.trading.d.ts +2 -0
  96. package/src/providers/futunn/actions.trading.js +204 -0
  97. package/src/providers/futunn/executors.d.ts +3 -0
  98. package/src/providers/futunn/executors.js +24 -0
  99. package/src/providers/futunn/runtime-research.d.ts +3 -0
  100. package/src/providers/futunn/runtime-research.js +133 -0
  101. package/src/providers/futunn/runtime-trading.d.ts +3 -0
  102. package/src/providers/futunn/runtime-trading.js +39 -0
  103. package/src/providers/futunn/runtime.d.ts +2 -0
  104. package/src/providers/futunn/runtime.js +50 -0
  105. package/src/providers/futunn/transport.d.ts +11 -0
  106. package/src/providers/futunn/transport.js +76 -0
  107. package/src/providers/gildata/executors.js +1 -1
  108. package/src/providers/gmail/executors.js +3 -3
  109. package/src/providers/gmail/message.d.ts +6 -8
  110. package/src/providers/gmail/message.js +4 -0
  111. package/src/providers/gmail/scopes.d.ts +32 -0
  112. package/src/providers/gmail/scopes.js +37 -0
  113. package/src/providers/google_analytics/executors.js +2 -2
  114. package/src/providers/google_analytics/scopes.js +6 -1
  115. package/src/providers/google_bigquery/executors.js +2 -2
  116. package/src/providers/google_bigquery/scopes.js +2 -0
  117. package/src/providers/google_search_console/executors.js +2 -2
  118. package/src/providers/google_search_console/scopes.js +2 -0
  119. package/src/providers/googleads/executors.js +1 -1
  120. package/src/providers/googleads/scopes.d.ts +1 -3
  121. package/src/providers/googleads/scopes.js +2 -4
  122. package/src/providers/googlecalendar/executors.js +1 -1
  123. package/src/providers/googlecalendar/runtime-shared.js +2 -2
  124. package/src/providers/googlecalendar/scopes.js +2 -0
  125. package/src/providers/googlechat/executors.d.ts +1 -3
  126. package/src/providers/googlechat/executors.js +219 -28
  127. package/src/providers/googlechat/members.d.ts +55 -0
  128. package/src/providers/googlechat/members.js +293 -0
  129. package/src/providers/googlechat/runtime.d.ts +16 -0
  130. package/src/providers/googlechat/runtime.js +25 -0
  131. package/src/providers/googlechat/scopes.d.ts +22 -3
  132. package/src/providers/googlechat/scopes.js +30 -7
  133. package/src/providers/googledocs/executors.js +1 -1
  134. package/src/providers/googledrive/executors.js +2 -2
  135. package/src/providers/{google-auth.d.ts → googledrive/runtime-auth.d.ts} +2 -2
  136. package/src/providers/{google-auth.js → googledrive/runtime-auth.js} +3 -3
  137. package/src/providers/googledrive/runtime-collaboration.js +1 -1
  138. package/src/providers/{google-runtime.d.ts → googledrive/runtime-request.d.ts} +1 -1
  139. package/src/providers/{google-runtime.js → googledrive/runtime-request.js} +2 -2
  140. package/src/providers/googleforms/executors.js +2 -2
  141. package/src/providers/googleforms/scopes.d.ts +0 -3
  142. package/src/providers/googleforms/scopes.js +2 -6
  143. package/src/providers/googlemeet/executors.js +2 -2
  144. package/src/providers/googlemeet/scopes.d.ts +0 -3
  145. package/src/providers/googlemeet/scopes.js +2 -6
  146. package/src/providers/googlesheets/executors.js +1 -1
  147. package/src/providers/googlesheets/scopes.js +2 -0
  148. package/src/providers/googleslides/executors.js +2 -2
  149. package/src/providers/googleslides/scopes.d.ts +0 -3
  150. package/src/providers/googleslides/scopes.js +2 -6
  151. package/src/providers/googletasks/executors.js +2 -2
  152. package/src/providers/googletasks/scopes.d.ts +0 -3
  153. package/src/providers/googletasks/scopes.js +2 -6
  154. package/src/providers/granola/actions.js +2 -0
  155. package/src/providers/granola/runtime-mcp.js +2 -0
  156. package/src/providers/granola/runtime.js +2 -2
  157. package/src/providers/indiegogo/executors.js +1 -1
  158. package/src/providers/investoday_mcp/executors.js +2 -2
  159. package/src/providers/iyunbiao/runtime.js +2 -2
  160. package/src/providers/keepa/actions.d.ts +1 -1
  161. package/src/providers/keepa/actions.js +371 -149
  162. package/src/providers/keepa/deal-attributes.d.ts +1 -0
  163. package/src/providers/keepa/deal-attributes.js +26 -0
  164. package/src/providers/keepa/runtime.js +212 -18
  165. package/src/providers/kingdee/executors.js +1 -1
  166. package/src/providers/kingdee/runtime.js +2 -2
  167. package/src/providers/kuaidi100/runtime.js +1 -1
  168. package/src/providers/linear/executors.js +12 -9
  169. package/src/providers/linear_mcp/actions.d.ts +47 -0
  170. package/src/providers/linear_mcp/actions.js +102 -0
  171. package/src/providers/linear_mcp/endpoints.d.ts +3 -0
  172. package/src/providers/linear_mcp/endpoints.js +3 -0
  173. package/src/providers/linear_mcp/executors.d.ts +3 -0
  174. package/src/providers/linear_mcp/executors.js +9 -0
  175. package/src/providers/linear_mcp/runtime-mcp.d.ts +15 -0
  176. package/src/providers/linear_mcp/runtime-mcp.js +238 -0
  177. package/src/providers/lingxing_mcp/runtime.js +1 -1
  178. package/src/providers/mcdonalds_cn_mcp/runtime.js +1 -1
  179. package/src/providers/metabase/mcp-runtime.js +1 -1
  180. package/src/providers/moneyforward_mcp/executors.d.ts +3 -0
  181. package/src/providers/moneyforward_mcp/executors.js +11 -0
  182. package/src/providers/moneyforward_mcp/manifest.d.ts +31 -0
  183. package/src/providers/moneyforward_mcp/manifest.js +204 -0
  184. package/src/providers/moneyforward_mcp/runtime.d.ts +18 -0
  185. package/src/providers/moneyforward_mcp/runtime.js +296 -0
  186. package/src/providers/notion/executors.js +39 -3
  187. package/src/providers/notion_mcp/endpoints.d.ts +3 -0
  188. package/src/providers/notion_mcp/endpoints.js +3 -0
  189. package/src/providers/notion_mcp/executors.d.ts +3 -0
  190. package/src/providers/notion_mcp/executors.js +176 -0
  191. package/src/providers/notion_mcp/mcp-response.d.ts +86 -0
  192. package/src/providers/notion_mcp/mcp-response.js +314 -0
  193. package/src/providers/odoo/executors.d.ts +3 -0
  194. package/src/providers/odoo/executors.js +32 -0
  195. package/src/providers/odoo/runtime.d.ts +16 -0
  196. package/src/providers/odoo/runtime.js +140 -0
  197. package/src/providers/outlook/executors.js +27 -6
  198. package/src/providers/outlook/microsoft-graph.js +17 -6
  199. package/src/providers/outlook_calendar/executors.js +24 -7
  200. package/src/providers/patsnap_mcp/executors.js +2 -2
  201. package/src/providers/postiz/executors.d.ts +4 -0
  202. package/src/providers/postiz/executors.js +83 -0
  203. package/src/providers/provider-runtime.d.ts +15 -0
  204. package/src/providers/provider-runtime.js +57 -4
  205. package/src/providers/proworkflow/executors.d.ts +4 -0
  206. package/src/providers/proworkflow/executors.js +135 -0
  207. package/src/providers/registry.generated.js +12 -0
  208. package/src/providers/scrape_creators/catalog.js +1 -1
  209. package/src/providers/scrape_creators/runtime.js +1 -1
  210. package/src/providers/sellersprite_mcp/executors.js +2 -2
  211. package/src/providers/sellersprite_mcp/official-actions.js +3 -2
  212. package/src/providers/sentry/runtime.js +6 -7
  213. package/src/providers/slack/actions.js +52 -3
  214. package/src/providers/slack/runtime.js +58 -21
  215. package/src/providers/slickdeals/runtime.js +1 -1
  216. package/src/providers/sorftime_mcp/executors.js +2 -2
  217. package/src/providers/tikhub/bounded-response.d.ts +1 -1
  218. package/src/providers/tikhub/bounded-response.js +8 -34
  219. package/src/providers/tikhub/endpoint-catalog.js +1 -1
  220. package/src/providers/tikhub/runtime.js +2 -2
  221. package/src/providers/tongdaxin/executors.js +79 -15
  222. package/src/providers/uspto/executors.js +1 -1
  223. package/src/providers/waffo/executors.js +1 -1
  224. package/src/providers/waffo/runtime.js +1 -1
  225. package/src/providers/wecom_mcp/runtime.js +1 -1
  226. package/src/providers/wisburg/executors.d.ts +4 -0
  227. package/src/providers/wisburg/executors.js +13 -0
  228. package/src/providers/wisburg/runtime.d.ts +12 -0
  229. package/src/providers/wisburg/runtime.js +133 -0
  230. package/src/providers/xydc_mcp/executors.js +2 -2
  231. package/src/providers/youtube/executors.js +1 -1
  232. package/src/providers/youtube/runtime.js +1 -1
  233. package/src/providers/zerotier/executors.d.ts +9 -0
  234. package/src/providers/zerotier/executors.js +629 -0
  235. package/src/providers/zerotier/runtime.d.ts +54 -0
  236. package/src/providers/zerotier/runtime.js +207 -0
  237. package/src/server/api/openapi.js +12 -2
  238. package/src/server/api/runtime-api.d.ts +8 -1
  239. package/src/server/api/runtime-api.js +19 -1
  240. package/src/server/connect-server.js +10 -2
  241. package/src/providers/sentry/scopes.d.ts +0 -1
  242. package/src/providers/sentry/scopes.js +0 -7
  243. /package/src/providers/{cloudflare-current-user.d.ts → cloudflare_dns/runtime-user.d.ts} +0 -0
@@ -0,0 +1,423 @@
1
+ import { s } from "../../core/json-schema.js";
2
+ import { defineProviderAction } from "../../core/provider-definition.js";
3
+ export const futunnResearchActions = [
4
+ defineProviderAction("futunn", {
5
+ name: "search_news",
6
+ operationType: "read",
7
+ description: "Search news, announcements and research reports by keyword.",
8
+ requiredScopes: ["quote:read"],
9
+ inputSchema: s.object("Content search options.", {
10
+ keyword: s.string("Search keyword, company name, ticker or topic.", { minLength: 1 }),
11
+ size: s.integer("Number of results; default 10, maximum 50.", { minimum: 1, maximum: 50 }),
12
+ type: s.withEnum(s.integer("Content type: 1=news/discussion, 2=announcement/topic, 3=report/live stream; omit for all."), [1, 2, 3]),
13
+ sortType: s.withEnum(s.integer("Sort: 1=reads/popularity, 2=latest."), [1, 2]),
14
+ language: s.stringEnum("Content language.", ["zh-CN", "zh-HK", "en", "ja"]),
15
+ }, { optional: ["size", "type", "sortType", "language"] }),
16
+ outputSchema: s.requiredObject("Search results.", {
17
+ items: s.array("Matching content items.", s.looseObject("Search result with title, link and timestamp.", {
18
+ title: s.string("Title; news titles may contain em highlight tags."),
19
+ url: s.string("Content link."),
20
+ publish_time: s.integer("Publication timestamp in seconds."),
21
+ })),
22
+ }),
23
+ }),
24
+ defineProviderAction("futunn", {
25
+ name: "search_community",
26
+ operationType: "read",
27
+ description: "Search community discussions, topics and live streams by keyword.",
28
+ requiredScopes: ["quote:read"],
29
+ inputSchema: s.object("Content search options.", {
30
+ keyword: s.string("Search keyword, company name, ticker or topic.", { minLength: 1 }),
31
+ size: s.integer("Number of results; default 10, maximum 50.", { minimum: 1, maximum: 50 }),
32
+ type: s.withEnum(s.integer("Content type: 1=news/discussion, 2=announcement/topic, 3=report/live stream; omit for all."), [1, 2, 3]),
33
+ sortType: s.withEnum(s.integer("Sort: 1=reads/popularity, 2=latest."), [1, 2]),
34
+ language: s.stringEnum("Content language.", ["zh-CN", "zh-HK", "en", "ja"]),
35
+ }, { optional: ["size", "type", "sortType", "language"] }),
36
+ outputSchema: s.requiredObject("Search results.", {
37
+ items: s.array("Matching content items.", s.looseObject("Search result with title, link and timestamp.", {
38
+ title: s.string("Title; news titles may contain em highlight tags."),
39
+ url: s.string("Content link."),
40
+ publish_time: s.integer("Publication timestamp in seconds."),
41
+ })),
42
+ }),
43
+ }),
44
+ defineProviderAction("futunn", {
45
+ name: "get_security_info",
46
+ operationType: "read",
47
+ description: "Get basic security information, including listing date and lot size.",
48
+ requiredScopes: ["quote:read"],
49
+ inputSchema: s.requiredObject("Security information query.", {
50
+ symbols: s.array("Securities to query, up to 400.", s.string("Security code including market prefix, for example HK.00700.", { minLength: 1 }), { minItems: 1, maxItems: 400 }),
51
+ }),
52
+ outputSchema: s.requiredObject("Security profiles; unresolved codes may be omitted by the provider.", {
53
+ securities: s.array("Resolved security profiles.", s.looseObject("Security profile.", {
54
+ code: s.string("Security code including market prefix, for example HK.00700.", {
55
+ minLength: 1,
56
+ }),
57
+ name: s.string("Security name."),
58
+ lot_size: s.integer("Board lot size or contract multiplier."),
59
+ stock_id: s.integer("Provider security identifier."),
60
+ })),
61
+ }),
62
+ }),
63
+ defineProviderAction("futunn", {
64
+ name: "get_market_state",
65
+ operationType: "read",
66
+ description: "Get trading-session states for a batch of securities.",
67
+ requiredScopes: ["quote:read"],
68
+ inputSchema: s.object("Market state query.", {
69
+ symbols: s.array("Securities to query, up to 400.", s.string("Security code including market prefix, for example HK.00700.", {
70
+ minLength: 1,
71
+ }), { minItems: 1, maxItems: 400 }),
72
+ includePreAfterMarket: s.boolean("Include US pre-market and after-hours sessions."),
73
+ includeOvernight: s.boolean("Include US overnight sessions."),
74
+ includeCryptoBrokers: s.boolean("Expand cryptocurrency records by broker."),
75
+ }, { optional: ["includePreAfterMarket", "includeOvernight", "includeCryptoBrokers"] }),
76
+ outputSchema: s.requiredObject("Market state results.", {
77
+ states: s.array("States matched to requested securities.", s.looseObject("Security market state.", {
78
+ code: s.string("Security code including market prefix, for example HK.00700.", {
79
+ minLength: 1,
80
+ }),
81
+ market_state: s.string("Market state such as open, closed or pre-market."),
82
+ trade_section: s.array("Trading session details.", s.looseObject("Provider record with additional fields preserved.", {})),
83
+ })),
84
+ }),
85
+ }),
86
+ defineProviderAction("futunn", {
87
+ name: "screen_stocks",
88
+ operationType: "read",
89
+ description: "Screen securities with combined market, financial and technical conditions.",
90
+ requiredScopes: ["quote:read"],
91
+ inputSchema: {
92
+ ...s.object("Stock screening options. Factor IDs and scaling follow https://open.futunn.com/api/quote/screening/stock-screen.", {
93
+ screenQueries: s.array("Combined screening conditions.", {
94
+ description: "Exactly one official screening condition branch.",
95
+ oneOf: [
96
+ s.requiredObject("One simple_field_query branch.", {
97
+ simple_field_query: s.looseObject("Official simple_field_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
98
+ }),
99
+ s.requiredObject("One plate_query branch.", {
100
+ plate_query: s.looseObject("Official plate_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
101
+ }),
102
+ s.requiredObject("One simple_property_query branch.", {
103
+ simple_property_query: s.looseObject("Official simple_property_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
104
+ }),
105
+ s.requiredObject("One cumulative_property_query branch.", {
106
+ cumulative_property_query: s.looseObject("Official cumulative_property_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
107
+ }),
108
+ s.requiredObject("One financial_property_query branch.", {
109
+ financial_property_query: s.looseObject("Official financial_property_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
110
+ }),
111
+ s.requiredObject("One indicator_positional_query branch.", {
112
+ indicator_positional_query: s.looseObject("Official indicator_positional_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
113
+ }),
114
+ s.requiredObject("One indicator_pattern_query branch.", {
115
+ indicator_pattern_query: s.looseObject("Official indicator_pattern_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
116
+ }),
117
+ s.requiredObject("One featured_property_query branch.", {
118
+ featured_property_query: s.looseObject("Official featured_property_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
119
+ }),
120
+ s.requiredObject("One broker_holdings_query branch.", {
121
+ broker_holdings_query: s.looseObject("Official broker_holdings_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
122
+ }),
123
+ s.requiredObject("One kline_shape_query branch.", {
124
+ kline_shape_query: s.looseObject("Official kline_shape_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
125
+ }),
126
+ s.requiredObject("One option_query branch.", {
127
+ option_query: s.looseObject("Official option_query payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
128
+ }),
129
+ ],
130
+ }),
131
+ retrieveQueries: s.array("Factors to return in matching order.", {
132
+ description: "Exactly one official retrieval factor branch.",
133
+ oneOf: [
134
+ s.requiredObject("One basic_property branch.", {
135
+ basic_property: s.looseObject("Official basic_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
136
+ }),
137
+ s.requiredObject("One simple_property branch.", {
138
+ simple_property: s.looseObject("Official simple_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
139
+ }),
140
+ s.requiredObject("One cumulative_property branch.", {
141
+ cumulative_property: s.looseObject("Official cumulative_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
142
+ }),
143
+ s.requiredObject("One financial_property branch.", {
144
+ financial_property: s.looseObject("Official financial_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
145
+ }),
146
+ s.requiredObject("One featured_property branch.", {
147
+ featured_property: s.looseObject("Official featured_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
148
+ }),
149
+ s.requiredObject("One indicator_property branch.", {
150
+ indicator_property: s.looseObject("Official indicator_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
151
+ }),
152
+ s.requiredObject("One broker_property branch.", {
153
+ broker_property: s.looseObject("Official broker_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
154
+ }),
155
+ s.requiredObject("One kline_shape_property branch.", {
156
+ kline_shape_property: s.looseObject("Official kline_shape_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
157
+ }),
158
+ s.requiredObject("One option_property branch.", {
159
+ option_property: s.looseObject("Official option_property payload. Preserve provider field IDs, periods and multiplier-scaled ranges.", {}),
160
+ }),
161
+ ],
162
+ }),
163
+ sort: {
164
+ description: "Sort direction and exactly one supported factor.",
165
+ oneOf: [
166
+ s.requiredObject("Sort by simple_property.", {
167
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
168
+ simple_property: s.looseObject("Official sort factor, including name and any required period.", {}),
169
+ }),
170
+ s.requiredObject("Sort by cumulative_property.", {
171
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
172
+ cumulative_property: s.looseObject("Official sort factor, including name and any required period.", {}),
173
+ }),
174
+ s.requiredObject("Sort by financial_property.", {
175
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
176
+ financial_property: s.looseObject("Official sort factor, including name and any required period.", {}),
177
+ }),
178
+ s.requiredObject("Sort by featured_property.", {
179
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
180
+ featured_property: s.looseObject("Official sort factor, including name and any required period.", {}),
181
+ }),
182
+ ],
183
+ },
184
+ sorts: s.array("Ordered multi-factor sorting; do not combine with sort.", {
185
+ description: "Sort direction and exactly one supported factor.",
186
+ oneOf: [
187
+ s.requiredObject("Sort by simple_property.", {
188
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
189
+ simple_property: s.looseObject("Official sort factor, including name and any required period.", {}),
190
+ }),
191
+ s.requiredObject("Sort by cumulative_property.", {
192
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
193
+ cumulative_property: s.looseObject("Official sort factor, including name and any required period.", {}),
194
+ }),
195
+ s.requiredObject("Sort by financial_property.", {
196
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
197
+ financial_property: s.looseObject("Official sort factor, including name and any required period.", {}),
198
+ }),
199
+ s.requiredObject("Sort by featured_property.", {
200
+ direction: s.withEnum(s.integer("1=ascending, 2=descending, 3=absolute ascending, 4=absolute descending."), [1, 2, 3, 4]),
201
+ featured_property: s.looseObject("Official sort factor, including name and any required period.", {}),
202
+ }),
203
+ ],
204
+ }),
205
+ nextKey: s.string("Opaque next-page cursor; omit for the first page."),
206
+ limit: s.integer("Page size; default 200, maximum 300.", { minimum: 1, maximum: 300 }),
207
+ watchlistStockIds: s.array("Security IDs for watchlist mode 1.", s.integer("Provider security ID.")),
208
+ holdingStockIds: s.array("Security IDs for holdings mode 2.", s.integer("Provider security ID.")),
209
+ userStockListMode: s.withEnum(s.integer("0=all securities, 1=watchlist, 2=holdings."), [0, 1, 2]),
210
+ }, {
211
+ optional: [
212
+ "retrieveQueries",
213
+ "sort",
214
+ "sorts",
215
+ "nextKey",
216
+ "limit",
217
+ "watchlistStockIds",
218
+ "holdingStockIds",
219
+ "userStockListMode",
220
+ ],
221
+ }),
222
+ not: { required: ["sort", "sorts"] },
223
+ },
224
+ outputSchema: s.requiredObject("Screened securities and pagination.", {
225
+ items: s.array("Matched securities; results align with retrieveQueries and retain provider-scaled values.", s.looseObject("Screening result.", {
226
+ code: s.string("Security code including market prefix, for example HK.00700.", {
227
+ minLength: 1,
228
+ }),
229
+ name: s.string("Security name."),
230
+ results: s.array("Returned factor values and type information.", s.looseObject("Provider record with additional fields preserved.", {})),
231
+ })),
232
+ pagination: s.nullable(s.looseObject("Pagination metadata from the response envelope; null when omitted.", {
233
+ has_more: s.boolean("Whether more results are available."),
234
+ next_key: s.string("Opaque next-page cursor; omit for the first page."),
235
+ total: s.integer("Total matching records when provided."),
236
+ })),
237
+ }),
238
+ }),
239
+ defineProviderAction("futunn", {
240
+ name: "get_financial_statements",
241
+ operationType: "read",
242
+ description: "Get financial statements or key metrics by reporting period.",
243
+ requiredScopes: ["quote:read"],
244
+ inputSchema: s.object("Financial statement query.", {
245
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
246
+ minLength: 1,
247
+ }),
248
+ statementType: s.withEnum(s.integer("1=income statement, 2=balance sheet, 3=cash flow, 4=key metrics; default 1."), [1, 2, 3, 4]),
249
+ financialType: s.integer("Financial period code: 1=Q1, 2=H1, 3=Q3, 4=Q4, 5=cumulative H1, 6=cumulative Q3, 7=annual, 10=latest; defaults vary by endpoint."),
250
+ currencyCode: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
251
+ nextKey: s.string("Opaque next-page cursor; omit for the first page."),
252
+ limit: s.integer("Page size; default 10, maximum 50.", { minimum: 1, maximum: 50 }),
253
+ }, { optional: ["statementType", "financialType", "currencyCode", "nextKey", "limit"] }),
254
+ outputSchema: s.requiredObject("Financial reports and pagination.", {
255
+ reports: s.array("Financial reports; empty when no data is available.", s.looseObject("Financial report and original accounting metadata.", {
256
+ period_text: s.string("Financial reporting period."),
257
+ currency_code: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
258
+ item_list: s.array("Financial statement fields.", s.looseObject("Financial statement field.", {
259
+ field_id: s.integer("Financial field ID."),
260
+ display_name: s.string("Financial field display name."),
261
+ data: s.number("Reported financial value."),
262
+ value_type: s.string("amount for monetary values or percent for percentages."),
263
+ yoy: s.number("Year-over-year percentage change."),
264
+ qoq: s.number("Quarter-over-quarter percentage change."),
265
+ })),
266
+ })),
267
+ pagination: s.nullable(s.looseObject("Pagination metadata from the response envelope; null when omitted.", {
268
+ has_more: s.boolean("Whether more results are available."),
269
+ next_key: s.string("Opaque next-page cursor; omit for the first page."),
270
+ })),
271
+ noData: s.boolean("Whether the provider explicitly reported no_data for a valid security."),
272
+ }),
273
+ }),
274
+ defineProviderAction("futunn", {
275
+ name: "get_revenue_breakdown",
276
+ operationType: "read",
277
+ description: "Get revenue composition by product, industry, region or business.",
278
+ requiredScopes: ["quote:read"],
279
+ inputSchema: s.object("Revenue composition query.", {
280
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
281
+ minLength: 1,
282
+ }),
283
+ date: s.integer("Financial period end timestamp in seconds; 0 selects the latest period."),
284
+ financialType: s.integer("Financial period selector; default 0."),
285
+ currencyCode: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
286
+ }, { optional: ["date", "financialType", "currencyCode"] }),
287
+ outputSchema: s.requiredObject("Revenue composition and available reporting periods.", {
288
+ revenue: s.nullable(s.looseObject("Revenue breakdown with available period choices.", {
289
+ period: s.string("Financial reporting period."),
290
+ currency_code: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
291
+ breakdown_list: s.array("Revenue composition dimensions and items.", s.looseObject("Provider record with additional fields preserved.", {})),
292
+ screen_date_list: s.array("Available period dates in seconds and financial type codes.", s.looseObject("Provider record with additional fields preserved.", {})),
293
+ })),
294
+ noData: s.boolean("Whether the provider explicitly reported no_data for a valid security."),
295
+ }),
296
+ }),
297
+ defineProviderAction("futunn", {
298
+ name: "get_operational_efficiency",
299
+ operationType: "read",
300
+ description: "Get historical employee counts and per-employee financial metrics.",
301
+ requiredScopes: ["quote:read"],
302
+ inputSchema: s.object("Operational efficiency query.", {
303
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
304
+ minLength: 1,
305
+ }),
306
+ limit: s.integer("Page size; default 10, maximum 100.", { minimum: 1, maximum: 100 }),
307
+ financialType: s.withEnum(s.integer("7=annual reports (default), 102=all cumulative quarterly reports."), [7, 102]),
308
+ currencyCode: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
309
+ nextKey: s.string("Opaque next-page cursor; omit for the first page."),
310
+ }, { optional: ["limit", "financialType", "currencyCode", "nextKey"] }),
311
+ outputSchema: s.requiredObject("Operational efficiency results and pagination.", {
312
+ efficiency: s.nullable(s.looseObject("Efficiency metrics in the reported currency.", {
313
+ currency_code: s.string("Report currency code, for example USD or CNY; omit for the native currency."),
314
+ item_list: s.array("Reporting-period employee counts and per-employee metrics.", s.looseObject("Provider record with additional fields preserved.", {})),
315
+ })),
316
+ pagination: s.nullable(s.looseObject("Pagination metadata from the response envelope; null when omitted.", {
317
+ has_more: s.boolean("Whether more results are available."),
318
+ next_key: s.string("Opaque next-page cursor; omit for the first page."),
319
+ })),
320
+ noData: s.boolean("Whether the provider explicitly reported no_data for a valid security."),
321
+ }),
322
+ }),
323
+ defineProviderAction("futunn", {
324
+ name: "get_valuation",
325
+ operationType: "read",
326
+ description: "Get PE, PB or PS valuation history and market or sector comparisons.",
327
+ requiredScopes: ["quote:read"],
328
+ inputSchema: s.object("Valuation query.", {
329
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
330
+ minLength: 1,
331
+ }),
332
+ valuationType: s.withEnum(s.integer("1=PE (default), 2=PB, 3=PS."), [1, 2, 3]),
333
+ intervalType: s.withEnum(s.integer("History span: 1=3mo, 2=6mo, 3=1yr, 4=3yr, 5=since May 2019, 6=5yr, 7=10yr, 8=2yr, 9=20yr, 10=30yr."), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
334
+ }, { optional: ["valuationType", "intervalType"] }),
335
+ outputSchema: s.requiredObject("Valuation results.", {
336
+ valuation: s.looseObject("Valuation trends, distributions and growth analysis.", {
337
+ trend: s.looseObject("Current, historical and forward valuation metrics.", {}),
338
+ market_distribution: s.looseObject("Provider record with additional fields preserved.", {}),
339
+ plate_distribution: s.looseObject("Provider record with additional fields preserved.", {}),
340
+ profit_growth_rate: s.looseObject("Provider record with additional fields preserved.", {}),
341
+ }),
342
+ }),
343
+ }),
344
+ defineProviderAction("futunn", {
345
+ name: "get_capital_flow",
346
+ operationType: "read",
347
+ description: "Get intraday capital flow by order size and trading session.",
348
+ requiredScopes: ["quote:read"],
349
+ inputSchema: s.object("Intraday capital flow query.", {
350
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
351
+ minLength: 1,
352
+ }),
353
+ section: s.stringEnum("Trading session; default NORMAL.", ["NORMAL", "FULL", "PREMARKET", "AFTERHOURS"]),
354
+ }, { optional: ["section"] }),
355
+ outputSchema: s.requiredObject("Intraday capital flow results.", {
356
+ flows: s.array("Time-ordered capital flow observations.", s.looseObject("Capital flow observation.", {
357
+ capital_flow_item_time: s.integer("Observation timestamp in milliseconds."),
358
+ in_flow: s.number("Net inflow in the security local currency; negative means outflow."),
359
+ super_in_flow: s.number("Net inflow from super-large orders."),
360
+ big_in_flow: s.number("Net inflow from large orders."),
361
+ mid_in_flow: s.number("Net inflow from medium orders."),
362
+ sml_in_flow: s.number("Net inflow from small orders."),
363
+ })),
364
+ lastValidTime: s.nullable(s.integer("Last valid data timestamp in milliseconds.")),
365
+ }),
366
+ }),
367
+ defineProviderAction("futunn", {
368
+ name: "get_capital_flow_history",
369
+ operationType: "read",
370
+ description: "Get daily, weekly or monthly capital flows; move end earlier to retrieve preceding data.",
371
+ requiredScopes: ["quote:read"],
372
+ inputSchema: s.object("Historical capital flow query.", {
373
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
374
+ minLength: 1,
375
+ }),
376
+ periodType: s.stringEnum("Aggregation period; default DAY.", ["DAY", "WEEK", "MONTH"]),
377
+ start: s.string("Inclusive date in YYYY-MM-DD format.", { format: "date" }),
378
+ end: s.string("Inclusive date in YYYY-MM-DD format.", { format: "date" }),
379
+ count: s.integer("Maximum observations; default 365, maximum 1000.", {
380
+ minimum: 1,
381
+ maximum: 1000,
382
+ }),
383
+ }, { optional: ["periodType", "start", "end", "count"] }),
384
+ outputSchema: s.requiredObject("Historical capital flows and pagination.", {
385
+ flows: s.array("Time-ordered capital flow observations.", s.looseObject("Capital flow observation.", {
386
+ capital_flow_item_time: s.integer("Observation timestamp in milliseconds."),
387
+ in_flow: s.number("Net inflow in the security local currency; negative means outflow."),
388
+ super_in_flow: s.number("Net inflow from super-large orders."),
389
+ big_in_flow: s.number("Net inflow from large orders."),
390
+ mid_in_flow: s.number("Net inflow from medium orders."),
391
+ sml_in_flow: s.number("Net inflow from small orders."),
392
+ })),
393
+ pagination: s.nullable(s.looseObject("Pagination metadata from the response envelope; null when omitted.", {
394
+ has_more: s.boolean("Whether more results are available."),
395
+ })),
396
+ }),
397
+ }),
398
+ defineProviderAction("futunn", {
399
+ name: "get_capital_distribution",
400
+ operationType: "read",
401
+ description: "Get current-day capital inflow and outflow distribution by order size.",
402
+ requiredScopes: ["quote:read"],
403
+ inputSchema: s.requiredObject("Capital distribution query.", {
404
+ symbol: s.string("Security code including market prefix, for example HK.00700.", {
405
+ minLength: 1,
406
+ }),
407
+ }),
408
+ outputSchema: s.requiredObject("Capital distribution results.", {
409
+ distribution: s.nullable(s.looseObject("Cumulative intraday inflow and outflow in local currency.", {
410
+ capital_in_super: s.number("Inflow for super orders."),
411
+ capital_in_big: s.number("Inflow for big orders."),
412
+ capital_in_mid: s.number("Inflow for mid orders."),
413
+ capital_in_small: s.number("Inflow for small orders."),
414
+ capital_out_super: s.number("Outflow for super orders."),
415
+ capital_out_big: s.number("Outflow for big orders."),
416
+ capital_out_mid: s.number("Outflow for mid orders."),
417
+ capital_out_small: s.number("Outflow for small orders."),
418
+ update_time: s.integer("Update timestamp in milliseconds."),
419
+ })),
420
+ noData: s.boolean("Whether the provider explicitly reported no_data for a valid security."),
421
+ }),
422
+ }),
423
+ ];
@@ -0,0 +1,2 @@
1
+ import type { ActionDefinition } from "../../core/types.ts";
2
+ export declare const futunnTradingActions: readonly ActionDefinition[];
@@ -0,0 +1,204 @@
1
+ import { s } from "../../core/json-schema.js";
2
+ import { defineProviderAction } from "../../core/provider-definition.js";
3
+ export const futunnTradingActions = [
4
+ defineProviderAction("futunn", {
5
+ name: "list_open_orders",
6
+ operationType: "read",
7
+ description: "List recent orders, including pending orders and orders filled or cancelled in the last 24 hours.",
8
+ requiredScopes: ["trade:read"],
9
+ inputSchema: s.object("Account order or fill query.", {
10
+ accountId: s.string("Trading account ID as a decimal string.", { pattern: "^[0-9]+$" }),
11
+ market: s.stringEnum("Trading market; HKCC denotes China Stock Connect.", [
12
+ "NONE",
13
+ "HK",
14
+ "US",
15
+ "SG",
16
+ "HKCC",
17
+ "CA",
18
+ "FUTURES",
19
+ "JP",
20
+ "KR",
21
+ "MY",
22
+ "AU",
23
+ ]),
24
+ pageFlag: s.string("Opaque page flag; omit or use an empty string for the first page."),
25
+ pageSize: s.integer("Page size; default 50, range 10-100.", { minimum: 10, maximum: 100 }),
26
+ }, { optional: ["pageFlag", "pageSize"] }),
27
+ outputSchema: s.requiredObject("One page of account records.", {
28
+ orders: s.array("Returned account records in provider order.", s.looseObject("Order with original quantities, prices and status fields.", {
29
+ order_id: s.string("Order ID."),
30
+ code: s.string("Security code including market prefix, for example HK.00700.", {
31
+ minLength: 1,
32
+ }),
33
+ order_status: s.string("Order status."),
34
+ qty: s.string("Quantity as a decimal string."),
35
+ price: s.string("Price as a decimal string."),
36
+ create_time: s.integer("Creation timestamp in microseconds."),
37
+ })),
38
+ pageFlag: s.nullable(s.string("Next-page flag; null when omitted.")),
39
+ completed: s.nullable(s.boolean("True means this batch is complete; null means the provider omitted the flag.")),
40
+ }),
41
+ }),
42
+ defineProviderAction("futunn", {
43
+ name: "list_history_orders",
44
+ operationType: "read",
45
+ description: "List historical orders filtered by creation time in microseconds.",
46
+ requiredScopes: ["trade:read"],
47
+ inputSchema: s.object("Account order or fill query.", {
48
+ accountId: s.string("Trading account ID as a decimal string.", { pattern: "^[0-9]+$" }),
49
+ market: s.stringEnum("Trading market; HKCC denotes China Stock Connect.", [
50
+ "NONE",
51
+ "HK",
52
+ "US",
53
+ "SG",
54
+ "HKCC",
55
+ "CA",
56
+ "FUTURES",
57
+ "JP",
58
+ "KR",
59
+ "MY",
60
+ "AU",
61
+ ]),
62
+ pageFlag: s.string("Opaque page flag; omit or use an empty string for the first page."),
63
+ pageSize: s.integer("Page size; default 50, range 10-100.", { minimum: 10, maximum: 100 }),
64
+ code: s.string("Security code including market prefix, for example HK.00700.", {
65
+ minLength: 1,
66
+ }),
67
+ start: s.string("Unix timestamp in microseconds as a decimal string; 0 uses the provider 90-day default window.", { pattern: "^[0-9]+$" }),
68
+ end: s.string("Unix timestamp in microseconds as a decimal string; 0 uses the provider 90-day default window.", { pattern: "^[0-9]+$" }),
69
+ }, { optional: ["pageFlag", "pageSize", "code", "start", "end"] }),
70
+ outputSchema: s.requiredObject("One page of account records.", {
71
+ orders: s.array("Returned account records in provider order.", s.looseObject("Order with original quantities, prices and status fields.", {
72
+ order_id: s.string("Order ID."),
73
+ code: s.string("Security code including market prefix, for example HK.00700.", {
74
+ minLength: 1,
75
+ }),
76
+ order_status: s.string("Order status."),
77
+ qty: s.string("Quantity as a decimal string."),
78
+ price: s.string("Price as a decimal string."),
79
+ create_time: s.integer("Creation timestamp in microseconds."),
80
+ })),
81
+ pageFlag: s.nullable(s.string("Next-page flag; null when omitted.")),
82
+ completed: s.nullable(s.boolean("True means this batch is complete; null means the provider omitted the flag.")),
83
+ }),
84
+ }),
85
+ defineProviderAction("futunn", {
86
+ name: "list_today_deals",
87
+ operationType: "read",
88
+ description: "List today's execution fills for a trading account.",
89
+ requiredScopes: ["trade:read"],
90
+ inputSchema: s.object("Account order or fill query.", {
91
+ accountId: s.string("Trading account ID as a decimal string.", { pattern: "^[0-9]+$" }),
92
+ market: s.stringEnum("Trading market; HKCC denotes China Stock Connect.", [
93
+ "NONE",
94
+ "HK",
95
+ "US",
96
+ "SG",
97
+ "HKCC",
98
+ "CA",
99
+ "FUTURES",
100
+ "JP",
101
+ "KR",
102
+ "MY",
103
+ "AU",
104
+ ]),
105
+ pageFlag: s.string("Opaque page flag; omit or use an empty string for the first page."),
106
+ pageSize: s.integer("Page size; default 50, range 10-100.", { minimum: 10, maximum: 100 }),
107
+ }, { optional: ["pageFlag", "pageSize"] }),
108
+ outputSchema: s.requiredObject("One page of account records.", {
109
+ deals: s.array("Returned account records in provider order.", s.looseObject("Execution fill record.", {
110
+ deal_id: s.string("Case-sensitive base58 fill ID; preserve exactly."),
111
+ order_id: s.string("Order ID."),
112
+ qty: s.string("Quantity as a decimal string."),
113
+ price: s.string("Price as a decimal string."),
114
+ create_time: s.integer("Creation timestamp in microseconds."),
115
+ })),
116
+ pageFlag: s.nullable(s.string("Next-page flag; null when omitted.")),
117
+ completed: s.nullable(s.boolean("True means this batch is complete; null means the provider omitted the flag.")),
118
+ }),
119
+ }),
120
+ defineProviderAction("futunn", {
121
+ name: "list_history_deals",
122
+ operationType: "read",
123
+ description: "List historical execution fills filtered by update time in microseconds.",
124
+ requiredScopes: ["trade:read"],
125
+ inputSchema: s.object("Account order or fill query.", {
126
+ accountId: s.string("Trading account ID as a decimal string.", { pattern: "^[0-9]+$" }),
127
+ market: s.stringEnum("Trading market; HKCC denotes China Stock Connect.", [
128
+ "NONE",
129
+ "HK",
130
+ "US",
131
+ "SG",
132
+ "HKCC",
133
+ "CA",
134
+ "FUTURES",
135
+ "JP",
136
+ "KR",
137
+ "MY",
138
+ "AU",
139
+ ]),
140
+ pageFlag: s.string("Opaque page flag; omit or use an empty string for the first page."),
141
+ pageSize: s.integer("Page size; default 50, range 10-50.", { minimum: 10, maximum: 50 }),
142
+ code: s.string("Security code including market prefix, for example HK.00700.", {
143
+ minLength: 1,
144
+ }),
145
+ start: s.string("Unix timestamp in microseconds as a decimal string; 0 uses the provider 90-day default window.", { pattern: "^[0-9]+$" }),
146
+ end: s.string("Unix timestamp in microseconds as a decimal string; 0 uses the provider 90-day default window.", { pattern: "^[0-9]+$" }),
147
+ }, { optional: ["pageFlag", "pageSize", "code", "start", "end"] }),
148
+ outputSchema: s.requiredObject("One page of account records.", {
149
+ deals: s.array("Returned account records in provider order.", s.looseObject("Execution fill record.", {
150
+ deal_id: s.string("Case-sensitive base58 fill ID; preserve exactly."),
151
+ order_id: s.string("Order ID."),
152
+ qty: s.string("Quantity as a decimal string."),
153
+ price: s.string("Price as a decimal string."),
154
+ create_time: s.integer("Creation timestamp in microseconds."),
155
+ })),
156
+ pageFlag: s.nullable(s.string("Next-page flag; null when omitted.")),
157
+ completed: s.nullable(s.boolean("True means this batch is complete; null means the provider omitted the flag.")),
158
+ }),
159
+ }),
160
+ defineProviderAction("futunn", {
161
+ name: "get_order_details",
162
+ operationType: "read",
163
+ description: "Get details of fewer than 50 orders from the same exchange.",
164
+ requiredScopes: ["trade:read"],
165
+ inputSchema: s.requiredObject("Order detail query.", {
166
+ accountId: s.string("Trading account ID as a decimal string.", { pattern: "^[0-9]+$" }),
167
+ exchange: s.stringEnum("Exchange shared by all requested orders.", [
168
+ "US",
169
+ "SEHK",
170
+ "SGX",
171
+ "SSE",
172
+ "SZSE",
173
+ "JP",
174
+ "CA",
175
+ "CME",
176
+ "CBOT",
177
+ "NYMEX",
178
+ "COMEX",
179
+ "CBOE",
180
+ "HKFE",
181
+ "KR",
182
+ "BMS",
183
+ "BMD",
184
+ "ASX",
185
+ ]),
186
+ orderIds: s.array("Order IDs from the same exchange.", s.string("Order ID.", { minLength: 1 }), {
187
+ minItems: 1,
188
+ maxItems: 49,
189
+ }),
190
+ }),
191
+ outputSchema: s.requiredObject("Order detail results.", {
192
+ orders: s.array("Order details.", s.looseObject("Order with original quantities, prices and status fields.", {
193
+ order_id: s.string("Order ID."),
194
+ code: s.string("Security code including market prefix, for example HK.00700.", {
195
+ minLength: 1,
196
+ }),
197
+ order_status: s.string("Order status."),
198
+ qty: s.string("Quantity as a decimal string."),
199
+ price: s.string("Price as a decimal string."),
200
+ create_time: s.integer("Creation timestamp in microseconds."),
201
+ })),
202
+ }),
203
+ }),
204
+ ];
@@ -0,0 +1,3 @@
1
+ import type { ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
2
+ export declare const executors: ProviderExecutors;
3
+ export declare const proxy: ProviderProxyExecutor;