@oomol-lab/open-connector 1.6.4 → 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.
- package/assets/open-connector/catalog/apps/aisa.json +6394 -0
- package/assets/open-connector/catalog/apps/baizhi_mcp.json +135 -0
- package/assets/open-connector/catalog/apps/bilibili.json +2586 -0
- package/assets/open-connector/catalog/apps/bitwarden.json +1423 -0
- package/assets/open-connector/catalog/apps/cronfree.json +303 -0
- package/assets/open-connector/catalog/apps/cufinder.json +368 -0
- package/assets/open-connector/catalog/apps/discordbot.json +2888 -248
- package/assets/open-connector/catalog/apps/drawio_mcp.json +192 -0
- package/assets/open-connector/catalog/apps/firecrawl.json +176 -32
- package/assets/open-connector/catalog/apps/framejet.json +273 -0
- package/assets/open-connector/catalog/apps/futunn.json +2967 -0
- package/assets/open-connector/catalog/apps/gmail.json +298 -0
- package/assets/open-connector/catalog/apps/google_analytics.json +4 -1
- package/assets/open-connector/catalog/apps/google_bigquery.json +4 -1
- package/assets/open-connector/catalog/apps/google_search_console.json +4 -1
- package/assets/open-connector/catalog/apps/googlecalendar.json +4 -1
- package/assets/open-connector/catalog/apps/googlechat.json +694 -7
- package/assets/open-connector/catalog/apps/googledocs.json +4 -1
- package/assets/open-connector/catalog/apps/googlesheets.json +4 -1
- package/assets/open-connector/catalog/apps/granola.json +23 -0
- package/assets/open-connector/catalog/apps/investoday_mcp.json +22228 -197
- package/assets/open-connector/catalog/apps/ixspy.json +2274 -0
- package/assets/open-connector/catalog/apps/keepa.json +3534 -987
- package/assets/open-connector/catalog/apps/linear.json +17 -0
- package/assets/open-connector/catalog/apps/linear_mcp.json +510 -0
- package/assets/open-connector/catalog/apps/moneyforward_mcp.json +1432 -0
- package/assets/open-connector/catalog/apps/notion.json +446 -1
- package/assets/open-connector/catalog/apps/notion_mcp.json +490 -0
- package/assets/open-connector/catalog/apps/odoo.json +619 -0
- package/assets/open-connector/catalog/apps/osv.json +663 -0
- package/assets/open-connector/catalog/apps/outlook.json +30 -8
- package/assets/open-connector/catalog/apps/outlook_calendar.json +23 -2
- package/assets/open-connector/catalog/apps/pdf_vector.json +329 -0
- package/assets/open-connector/catalog/apps/postiz.json +334 -0
- package/assets/open-connector/catalog/apps/proworkflow.json +529 -0
- package/assets/open-connector/catalog/apps/pulsetic.json +406 -0
- package/assets/open-connector/catalog/apps/sellersprite_mcp.json +2 -1
- package/assets/open-connector/catalog/apps/shopee.json +1785 -0
- package/assets/open-connector/catalog/apps/slack.json +304 -0
- package/assets/open-connector/catalog/apps/slackbot.json +295 -0
- package/assets/open-connector/catalog/apps/speak_ai.json +360 -0
- package/assets/open-connector/catalog/apps/tencent_docs.json +3 -0
- package/assets/open-connector/catalog/apps/wisburg.json +1528 -0
- package/assets/open-connector/catalog/apps/youtube.json +4 -1
- package/assets/open-connector/catalog/apps/zerotier.json +3319 -0
- package/assets/open-connector/catalog/apps/zyhub.json +1585 -0
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +1 -1
- package/src/core/cast.d.ts +10 -0
- package/src/core/cast.js +14 -0
- package/src/core/guarded-fetch.d.ts +6 -3
- package/src/core/guarded-fetch.js +6 -3
- package/src/core/json-schema.d.ts +5 -1
- package/src/core/json-schema.js +14 -2
- package/src/core/provider-scenarios.js +67 -13
- package/src/core/request.js +4 -1
- package/src/core/types.d.ts +10 -1
- package/src/mcp.js +10 -7
- package/src/oauth/oauth-client-config-service.d.ts +16 -1
- package/src/oauth/oauth-client-config-service.js +59 -3
- package/src/oauth/oauth-credential-refresh-service.js +3 -1
- package/src/oauth/oauth-flow-service.d.ts +6 -0
- package/src/oauth/oauth-flow-service.js +21 -4
- package/src/oauth/oauth-token.d.ts +13 -0
- package/src/providers/17track/runtime.js +1 -1
- package/src/providers/action-contracts.generated.d.ts +32 -8
- package/src/providers/aifinmarket/runtime.js +1 -1
- package/src/providers/aisa/executors.d.ts +4 -0
- package/src/providers/aisa/executors.js +864 -0
- package/src/providers/aliyun_ack/runtime.js +1 -1
- package/src/providers/aliyun_sls/runtime.js +1 -1
- package/src/providers/app_store_server/runtime-helpers.js +1 -1
- package/src/providers/baizhi_mcp/actions.d.ts +2 -0
- package/src/providers/baizhi_mcp/actions.js +40 -0
- package/src/providers/baizhi_mcp/executors.d.ts +3 -0
- package/src/providers/baizhi_mcp/executors.js +102 -0
- package/src/providers/bazhuayu/runtime.js +2 -2
- package/src/providers/bilibili/articles.d.ts +3 -0
- package/src/providers/bilibili/articles.js +369 -0
- package/src/providers/bilibili/executors.d.ts +8 -0
- package/src/providers/bilibili/executors.js +262 -0
- package/src/providers/bilibili/runtime.d.ts +95 -0
- package/src/providers/bilibili/runtime.js +236 -0
- package/src/providers/bilibili/upload.d.ts +14 -0
- package/src/providers/bilibili/upload.js +107 -0
- package/src/providers/bitwarden/executors.d.ts +3 -0
- package/src/providers/bitwarden/executors.js +146 -0
- package/src/providers/cloudflare_browser_rendering/executors.js +1 -1
- package/src/providers/cloudflare_dns/executors.js +1 -1
- package/src/providers/{cloudflare-current-user.js → cloudflare_dns/runtime-user.js} +2 -2
- package/src/providers/cloudflare_dns/runtime.d.ts +1 -1
- package/src/providers/cloudflare_dns/runtime.js +1 -1
- package/src/providers/cloudflare_r2/executors.js +1 -1
- package/src/providers/cloudflare_r2/runtime.d.ts +1 -1
- package/src/providers/cloudflare_r2/runtime.js +1 -1
- package/src/providers/cloudflare_worker/executors.js +1 -1
- package/src/providers/cloudflare_worker/runtime.d.ts +1 -1
- package/src/providers/cloudflare_worker/runtime.js +1 -1
- package/src/providers/cronfree/executors.d.ts +4 -0
- package/src/providers/cronfree/executors.js +89 -0
- package/src/providers/cufinder/executors.d.ts +4 -0
- package/src/providers/cufinder/executors.js +105 -0
- package/src/providers/dingtalk_mcp/runtime.js +1 -1
- package/src/providers/discordbot/executors.d.ts +0 -9
- package/src/providers/discordbot/executors.js +9 -101
- package/src/providers/discordbot/runtime-guilds.d.ts +3 -0
- package/src/providers/discordbot/runtime-guilds.js +464 -0
- package/src/providers/discordbot/runtime.d.ts +42 -0
- package/src/providers/discordbot/runtime.js +124 -0
- package/src/providers/drawio_mcp/executors.d.ts +3 -0
- package/src/providers/drawio_mcp/executors.js +19 -0
- package/src/providers/drawio_mcp/runtime.d.ts +8 -0
- package/src/providers/drawio_mcp/runtime.js +175 -0
- package/src/providers/elevenreader/runtime.js +6 -5
- package/src/providers/fastmoss_mcp/executors.js +2 -2
- package/src/providers/finchina/executors.js +1 -1
- package/src/providers/framejet/executors.d.ts +4 -0
- package/src/providers/framejet/executors.js +19 -0
- package/src/providers/framejet/runtime.d.ts +16 -0
- package/src/providers/framejet/runtime.js +148 -0
- package/src/providers/futunn/actions.d.ts +2 -0
- package/src/providers/futunn/actions.js +152 -0
- package/src/providers/futunn/actions.research.d.ts +2 -0
- package/src/providers/futunn/actions.research.js +423 -0
- package/src/providers/futunn/actions.trading.d.ts +2 -0
- package/src/providers/futunn/actions.trading.js +204 -0
- package/src/providers/futunn/executors.d.ts +3 -0
- package/src/providers/futunn/executors.js +24 -0
- package/src/providers/futunn/runtime-research.d.ts +3 -0
- package/src/providers/futunn/runtime-research.js +133 -0
- package/src/providers/futunn/runtime-trading.d.ts +3 -0
- package/src/providers/futunn/runtime-trading.js +39 -0
- package/src/providers/futunn/runtime.d.ts +2 -0
- package/src/providers/futunn/runtime.js +50 -0
- package/src/providers/futunn/transport.d.ts +11 -0
- package/src/providers/futunn/transport.js +76 -0
- package/src/providers/gildata/executors.js +1 -1
- package/src/providers/gmail/attachment-stream.d.ts +2 -0
- package/src/providers/gmail/attachment-stream.js +162 -0
- package/src/providers/gmail/executors.d.ts +3 -1
- package/src/providers/gmail/executors.js +54 -26
- package/src/providers/gmail/message.d.ts +6 -8
- package/src/providers/gmail/message.js +4 -0
- package/src/providers/gmail/scopes.d.ts +32 -0
- package/src/providers/gmail/scopes.js +37 -0
- package/src/providers/google_analytics/executors.js +2 -2
- package/src/providers/google_analytics/scopes.js +6 -1
- package/src/providers/google_bigquery/executors.js +2 -2
- package/src/providers/google_bigquery/scopes.js +2 -0
- package/src/providers/google_search_console/executors.js +2 -2
- package/src/providers/google_search_console/scopes.js +2 -0
- package/src/providers/googleads/executors.js +1 -1
- package/src/providers/googleads/scopes.d.ts +1 -3
- package/src/providers/googleads/scopes.js +2 -4
- package/src/providers/googlecalendar/executors.js +1 -1
- package/src/providers/googlecalendar/runtime-shared.js +2 -2
- package/src/providers/googlecalendar/scopes.js +2 -0
- package/src/providers/googlechat/executors.d.ts +1 -3
- package/src/providers/googlechat/executors.js +219 -28
- package/src/providers/googlechat/members.d.ts +55 -0
- package/src/providers/googlechat/members.js +293 -0
- package/src/providers/googlechat/runtime.d.ts +16 -0
- package/src/providers/googlechat/runtime.js +25 -0
- package/src/providers/googlechat/scopes.d.ts +22 -3
- package/src/providers/googlechat/scopes.js +30 -7
- package/src/providers/googledocs/executors.js +1 -1
- package/src/providers/googledrive/executors.js +2 -2
- package/src/providers/{google-auth.d.ts → googledrive/runtime-auth.d.ts} +2 -2
- package/src/providers/{google-auth.js → googledrive/runtime-auth.js} +3 -3
- package/src/providers/googledrive/runtime-collaboration.js +1 -1
- package/src/providers/{google-runtime.d.ts → googledrive/runtime-request.d.ts} +1 -1
- package/src/providers/{google-runtime.js → googledrive/runtime-request.js} +2 -2
- package/src/providers/googleforms/executors.js +2 -2
- package/src/providers/googleforms/scopes.d.ts +0 -3
- package/src/providers/googleforms/scopes.js +2 -6
- package/src/providers/googlemeet/executors.js +2 -2
- package/src/providers/googlemeet/scopes.d.ts +0 -3
- package/src/providers/googlemeet/scopes.js +2 -6
- package/src/providers/googlesheets/executors.js +1 -1
- package/src/providers/googlesheets/scopes.js +2 -0
- package/src/providers/googleslides/executors.js +2 -2
- package/src/providers/googleslides/scopes.d.ts +0 -3
- package/src/providers/googleslides/scopes.js +2 -6
- package/src/providers/googletasks/executors.js +2 -2
- package/src/providers/googletasks/scopes.d.ts +0 -3
- package/src/providers/googletasks/scopes.js +2 -6
- package/src/providers/granola/actions.js +2 -0
- package/src/providers/granola/runtime-mcp.js +2 -0
- package/src/providers/granola/runtime.js +2 -2
- package/src/providers/indiegogo/executors.js +1 -1
- package/src/providers/investoday_mcp/executors.js +2 -2
- package/src/providers/investoday_mcp/official-actions.js +19 -372
- package/src/providers/investoday_mcp/official-tool-types.d.ts +10 -0
- package/src/providers/investoday_mcp/official-tool-types.js +4 -0
- package/src/providers/investoday_mcp/official-tools/charts.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/charts.js +32 -0
- package/src/providers/investoday_mcp/official-tools/fixed-income.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/fixed-income.js +326 -0
- package/src/providers/investoday_mcp/official-tools/funds.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/funds.js +1085 -0
- package/src/providers/investoday_mcp/official-tools/hong-kong.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/hong-kong.js +275 -0
- package/src/providers/investoday_mcp/official-tools/indices-industries.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/indices-industries.js +642 -0
- package/src/providers/investoday_mcp/official-tools/macro-calendar.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/macro-calendar.js +398 -0
- package/src/providers/investoday_mcp/official-tools/other.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/other.js +131 -0
- package/src/providers/investoday_mcp/official-tools/research-news.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/research-news.js +302 -0
- package/src/providers/investoday_mcp/official-tools/stocks.d.ts +2 -0
- package/src/providers/investoday_mcp/official-tools/stocks.js +2829 -0
- package/src/providers/ixspy/executors.d.ts +3 -0
- package/src/providers/ixspy/executors.js +220 -0
- package/src/providers/iyunbiao/runtime.js +2 -2
- package/src/providers/keepa/actions.d.ts +1 -1
- package/src/providers/keepa/actions.js +371 -149
- package/src/providers/keepa/deal-attributes.d.ts +1 -0
- package/src/providers/keepa/deal-attributes.js +26 -0
- package/src/providers/keepa/runtime.js +212 -18
- package/src/providers/kingdee/executors.js +1 -1
- package/src/providers/kingdee/runtime.js +2 -2
- package/src/providers/kuaidi100/runtime.js +1 -1
- package/src/providers/linear/executors.js +12 -9
- package/src/providers/linear_mcp/actions.d.ts +47 -0
- package/src/providers/linear_mcp/actions.js +102 -0
- package/src/providers/linear_mcp/endpoints.d.ts +3 -0
- package/src/providers/linear_mcp/endpoints.js +3 -0
- package/src/providers/linear_mcp/executors.d.ts +3 -0
- package/src/providers/linear_mcp/executors.js +9 -0
- package/src/providers/linear_mcp/runtime-mcp.d.ts +15 -0
- package/src/providers/linear_mcp/runtime-mcp.js +238 -0
- package/src/providers/lingxing_mcp/runtime.js +1 -1
- package/src/providers/mcdonalds_cn_mcp/runtime.js +1 -1
- package/src/providers/metabase/mcp-runtime.js +1 -1
- package/src/providers/moneyforward_mcp/executors.d.ts +3 -0
- package/src/providers/moneyforward_mcp/executors.js +11 -0
- package/src/providers/moneyforward_mcp/manifest.d.ts +31 -0
- package/src/providers/moneyforward_mcp/manifest.js +204 -0
- package/src/providers/moneyforward_mcp/runtime.d.ts +18 -0
- package/src/providers/moneyforward_mcp/runtime.js +296 -0
- package/src/providers/notion/executors.js +39 -3
- package/src/providers/notion_mcp/endpoints.d.ts +3 -0
- package/src/providers/notion_mcp/endpoints.js +3 -0
- package/src/providers/notion_mcp/executors.d.ts +3 -0
- package/src/providers/notion_mcp/executors.js +176 -0
- package/src/providers/notion_mcp/mcp-response.d.ts +86 -0
- package/src/providers/notion_mcp/mcp-response.js +314 -0
- package/src/providers/odoo/executors.d.ts +3 -0
- package/src/providers/odoo/executors.js +32 -0
- package/src/providers/odoo/runtime.d.ts +16 -0
- package/src/providers/odoo/runtime.js +140 -0
- package/src/providers/osv/executors.d.ts +2 -0
- package/src/providers/osv/executors.js +11 -0
- package/src/providers/osv/runtime.d.ts +9 -0
- package/src/providers/osv/runtime.js +66 -0
- package/src/providers/outlook/executors.js +27 -6
- package/src/providers/outlook/microsoft-graph.js +17 -6
- package/src/providers/outlook_calendar/executors.js +24 -7
- package/src/providers/patsnap_mcp/executors.js +2 -2
- package/src/providers/pdf_vector/executors.d.ts +4 -0
- package/src/providers/pdf_vector/executors.js +108 -0
- package/src/providers/postiz/executors.d.ts +4 -0
- package/src/providers/postiz/executors.js +83 -0
- package/src/providers/provider-runtime.d.ts +18 -0
- package/src/providers/provider-runtime.js +60 -4
- package/src/providers/proworkflow/executors.d.ts +4 -0
- package/src/providers/proworkflow/executors.js +135 -0
- package/src/providers/pulsetic/executors.d.ts +4 -0
- package/src/providers/pulsetic/executors.js +126 -0
- package/src/providers/registry.generated.js +24 -0
- package/src/providers/scrape_creators/catalog.js +1 -1
- package/src/providers/scrape_creators/runtime.js +1 -1
- package/src/providers/sellersprite_mcp/executors.js +2 -2
- package/src/providers/sellersprite_mcp/official-actions.js +3 -2
- package/src/providers/sentry/runtime.js +6 -7
- package/src/providers/shopee/actions.d.ts +2 -0
- package/src/providers/shopee/actions.js +474 -0
- package/src/providers/shopee/executors.d.ts +3 -0
- package/src/providers/shopee/executors.js +85 -0
- package/src/providers/shopee/runtime.d.ts +79 -0
- package/src/providers/shopee/runtime.js +693 -0
- package/src/providers/slack/actions.js +69 -3
- package/src/providers/slack/runtime.js +116 -21
- package/src/providers/slickdeals/runtime.js +1 -1
- package/src/providers/sorftime_mcp/executors.js +2 -2
- package/src/providers/speak_ai/executors.d.ts +3 -0
- package/src/providers/speak_ai/executors.js +187 -0
- package/src/providers/tikhub/bounded-response.d.ts +1 -1
- package/src/providers/tikhub/bounded-response.js +8 -34
- package/src/providers/tikhub/endpoint-catalog.js +1 -1
- package/src/providers/tikhub/runtime.js +2 -2
- package/src/providers/tongdaxin/executors.js +79 -15
- package/src/providers/tushare/runtime.js +22 -9
- package/src/providers/uspto/executors.js +1 -1
- package/src/providers/waffo/executors.js +1 -1
- package/src/providers/waffo/runtime.js +1 -1
- package/src/providers/wecom_mcp/runtime.js +1 -1
- package/src/providers/wisburg/executors.d.ts +4 -0
- package/src/providers/wisburg/executors.js +13 -0
- package/src/providers/wisburg/runtime.d.ts +12 -0
- package/src/providers/wisburg/runtime.js +133 -0
- package/src/providers/xydc_mcp/executors.js +2 -2
- package/src/providers/youtube/executors.js +1 -1
- package/src/providers/youtube/runtime.js +1 -1
- package/src/providers/zerotier/executors.d.ts +9 -0
- package/src/providers/zerotier/executors.js +629 -0
- package/src/providers/zerotier/runtime.d.ts +54 -0
- package/src/providers/zerotier/runtime.js +207 -0
- package/src/providers/zyhub/executors.d.ts +3 -0
- package/src/providers/zyhub/executors.js +240 -0
- package/src/server/api/openapi.js +12 -2
- package/src/server/api/runtime-api.d.ts +8 -1
- package/src/server/api/runtime-api.js +19 -1
- package/src/server/connect-server.js +10 -2
- package/src/server/files/transit-files.d.ts +3 -2
- package/src/server/files/transit-files.js +31 -35
- package/src/providers/sentry/scopes.d.ts +0 -1
- package/src/providers/sentry/scopes.js +0 -7
- /package/src/providers/{cloudflare-current-user.d.ts → cloudflare_dns/runtime-user.d.ts} +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { futunnResearchActions } from "./actions.research.js";
|
|
4
|
+
import { futunnTradingActions } from "./actions.trading.js";
|
|
5
|
+
const symbol = s.nonEmptyString("Security code with market prefix, for example US.AAPL or HK.00700.");
|
|
6
|
+
const accountId = s.nonEmptyString("Trading account ID returned by list_accounts, kept as a decimal string.", {
|
|
7
|
+
pattern: "^[0-9]+$",
|
|
8
|
+
});
|
|
9
|
+
const date = s.string("Date in YYYY-MM-DD format in the market timezone.", { format: "date" });
|
|
10
|
+
const snapshot = s.looseObject("Market snapshot with additional category-specific fields.", {
|
|
11
|
+
code: symbol,
|
|
12
|
+
last_price: s.number("Latest traded price."),
|
|
13
|
+
update_time: s.integer("Quote update timestamp in milliseconds."),
|
|
14
|
+
volume: s.number("Trading volume in shares or contracts."),
|
|
15
|
+
});
|
|
16
|
+
const bar = s.looseObject("Historical candlestick with additional provider fields.", {
|
|
17
|
+
time_key: s.integer("Candlestick timestamp in milliseconds."),
|
|
18
|
+
open: s.number("Opening price."),
|
|
19
|
+
close: s.number("Closing price."),
|
|
20
|
+
high: s.number("Highest price."),
|
|
21
|
+
low: s.number("Lowest price."),
|
|
22
|
+
volume: s.number("Trading volume before applying volumePrecision."),
|
|
23
|
+
});
|
|
24
|
+
const tradingDay = s.looseObject("Trading day and session details.", {
|
|
25
|
+
time: date,
|
|
26
|
+
trade_date_type: s.string("Session type, such as WHOLE or MORNING."),
|
|
27
|
+
trade_second: s.integer("Total trading seconds in the session."),
|
|
28
|
+
});
|
|
29
|
+
const position = s.looseObject("Position details with additional provider fields.", {
|
|
30
|
+
code: symbol,
|
|
31
|
+
stock_name: s.string("Security name."),
|
|
32
|
+
qty: s.string("Position quantity as a decimal string."),
|
|
33
|
+
cost_price: s.string("Position cost price as a decimal string."),
|
|
34
|
+
cost_price_valid: s.boolean("Whether the cost price is valid."),
|
|
35
|
+
pl_val: s.string("Profit or loss as a decimal string."),
|
|
36
|
+
pl_val_valid: s.boolean("Whether the profit or loss value is valid."),
|
|
37
|
+
});
|
|
38
|
+
const quoteScope = ["quote:read"];
|
|
39
|
+
const tradeScope = ["trade:read"];
|
|
40
|
+
export const futunnActions = [
|
|
41
|
+
...futunnResearchActions,
|
|
42
|
+
...futunnTradingActions,
|
|
43
|
+
defineProviderAction("futunn", {
|
|
44
|
+
name: "get_market_snapshot",
|
|
45
|
+
operationType: "read",
|
|
46
|
+
description: "Get real-time market snapshots and valuation metrics for up to 400 securities.",
|
|
47
|
+
requiredScopes: quoteScope,
|
|
48
|
+
inputSchema: s.requiredObject("Securities to query.", {
|
|
49
|
+
symbols: s.array("Security codes to query.", symbol, { minItems: 1, maxItems: 400 }),
|
|
50
|
+
}),
|
|
51
|
+
outputSchema: s.requiredObject("Market snapshot results.", {
|
|
52
|
+
snapshots: s.array("Market snapshots with prices, volume, valuation and category-specific fields.", snapshot),
|
|
53
|
+
}),
|
|
54
|
+
}),
|
|
55
|
+
defineProviderAction("futunn", {
|
|
56
|
+
name: "get_history_kline",
|
|
57
|
+
operationType: "read",
|
|
58
|
+
description: "Get a page of historical candlesticks, retaining the next-page timestamp and volume precision.",
|
|
59
|
+
requiredScopes: quoteScope,
|
|
60
|
+
inputSchema: s.object("Historical candlestick query.", {
|
|
61
|
+
symbol,
|
|
62
|
+
start: date,
|
|
63
|
+
end: s.nonEmptyString("End date in YYYY-MM-DD format, or the previous nextTime converted to a string for pagination."),
|
|
64
|
+
ktype: s.withEnum(s.integer("Candlestick interval: 1=1min, 2=day, 3=week, 4=month, 5=year, 6=5min, 7=15min, 8=30min, 9=60min. Default 2."), [1, 2, 3, 4, 5, 6, 7, 8, 9]),
|
|
65
|
+
autype: s.withEnum(s.integer("Price adjustment: 0=none, 1=forward (default), 2=backward."), [0, 1, 2]),
|
|
66
|
+
num: s.integer("Number of bars requested; default and maximum 370.", {
|
|
67
|
+
minimum: 1,
|
|
68
|
+
maximum: 370,
|
|
69
|
+
}),
|
|
70
|
+
extendedTime: s.withEnum(s.integer("Extended session: 0=default, 1=US pre/after market, 2=US overnight."), [0, 1, 2]),
|
|
71
|
+
}, { optional: ["start", "ktype", "autype", "num", "extendedTime"] }),
|
|
72
|
+
outputSchema: s.requiredObject("Historical candlesticks and pagination metadata.", {
|
|
73
|
+
bars: s.array("Historical candlesticks in upstream order.", bar),
|
|
74
|
+
nextTime: s.nullable(s.integer("Next page end timestamp in milliseconds, or null when absent.")),
|
|
75
|
+
volumePrecision: s.nullable(s.integer("Divide bar volumes by 10 to this power; null when the provider omits precision.")),
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
defineProviderAction("futunn", {
|
|
79
|
+
name: "list_trading_days",
|
|
80
|
+
operationType: "read",
|
|
81
|
+
description: "List trading days for a market within an inclusive date range.",
|
|
82
|
+
requiredScopes: quoteScope,
|
|
83
|
+
inputSchema: s.requiredObject("Market and date range.", {
|
|
84
|
+
market: s.stringEnum("Market to query.", [
|
|
85
|
+
"HK",
|
|
86
|
+
"US",
|
|
87
|
+
"SH",
|
|
88
|
+
"SZ",
|
|
89
|
+
"BJ",
|
|
90
|
+
"SG",
|
|
91
|
+
"JP",
|
|
92
|
+
"KR",
|
|
93
|
+
"CA",
|
|
94
|
+
"AU",
|
|
95
|
+
"JP_FUTURE",
|
|
96
|
+
"SG_FUTURE",
|
|
97
|
+
]),
|
|
98
|
+
start: date,
|
|
99
|
+
end: date,
|
|
100
|
+
}),
|
|
101
|
+
outputSchema: s.requiredObject("Trading calendar results.", {
|
|
102
|
+
tradingDays: s.array("Trading dates with session type and trading seconds.", tradingDay),
|
|
103
|
+
}),
|
|
104
|
+
}),
|
|
105
|
+
defineProviderAction("futunn", {
|
|
106
|
+
name: "list_accounts",
|
|
107
|
+
operationType: "read",
|
|
108
|
+
description: "List trading accounts authorized by the connected user.",
|
|
109
|
+
requiredScopes: tradeScope,
|
|
110
|
+
inputSchema: s.requiredObject("Authorized account query.", {}),
|
|
111
|
+
outputSchema: s.requiredObject("Authorized trading accounts.", {
|
|
112
|
+
accounts: s.array("Authorized accounts; numeric account_id values are returned as lossless decimal strings.", s.looseObject("Authorized account details.", {
|
|
113
|
+
account_id: s.string("Trading account ID as a lossless decimal string."),
|
|
114
|
+
security_firm: s.string("Broker identifier."),
|
|
115
|
+
acc_type: s.string("Account type, such as cash or margin."),
|
|
116
|
+
})),
|
|
117
|
+
}),
|
|
118
|
+
}),
|
|
119
|
+
defineProviderAction("futunn", {
|
|
120
|
+
name: "get_account_funds",
|
|
121
|
+
operationType: "read",
|
|
122
|
+
description: "Get account assets, cash, buying power and margin balances in the requested currency.",
|
|
123
|
+
requiredScopes: tradeScope,
|
|
124
|
+
inputSchema: s.requiredObject("Account funds query.", {
|
|
125
|
+
accountId,
|
|
126
|
+
currency: s.nonEmptyString("Display currency, for example USD or HKD; ignored by account types that do not support conversion."),
|
|
127
|
+
}),
|
|
128
|
+
outputSchema: s.requiredObject("Account fund balances.", {
|
|
129
|
+
funds: s.looseObject("Account balances; monetary amounts retain upstream decimal strings.", {
|
|
130
|
+
total_assets: s.string("Total net assets."),
|
|
131
|
+
cash: s.string("Cash balance."),
|
|
132
|
+
power: s.string("Maximum buying power."),
|
|
133
|
+
currency: s.string("Display currency."),
|
|
134
|
+
}),
|
|
135
|
+
}),
|
|
136
|
+
}),
|
|
137
|
+
defineProviderAction("futunn", {
|
|
138
|
+
name: "list_positions",
|
|
139
|
+
operationType: "read",
|
|
140
|
+
description: "List account positions, optionally filtered by security code and profit/loss ratio.",
|
|
141
|
+
requiredScopes: tradeScope,
|
|
142
|
+
inputSchema: s.object("Account position query.", {
|
|
143
|
+
accountId,
|
|
144
|
+
code: symbol,
|
|
145
|
+
plRatioMin: s.string("Minimum profit/loss percentage as a decimal string, for example 10."),
|
|
146
|
+
plRatioMax: s.string("Maximum profit/loss percentage as a decimal string, for example 20."),
|
|
147
|
+
}, { optional: ["code", "plRatioMin", "plRatioMax"] }),
|
|
148
|
+
outputSchema: s.requiredObject("Account position results.", {
|
|
149
|
+
positions: s.array("Positions with upstream quantities, prices and profit/loss decimal strings.", position),
|
|
150
|
+
}),
|
|
151
|
+
}),
|
|
152
|
+
];
|
|
@@ -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
|
+
];
|