@v587d/capital-generation 2.8.1 → 2.8.3
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/CHANGELOG.md +53 -0
- package/README.md +6 -7
- package/THIRD_PARTY_NOTICES.md +2 -3
- package/chart-ui/package.json +1 -1
- package/config/client.js +4 -4
- package/config/client.src.cjs +11 -1
- package/config/package.json +1 -1
- package/lib/sources/ftshare-rest.d.ts +5 -2
- package/lib/sources/ftshare-rest.js +1182 -5
- package/lib/time/tools.js +11 -0
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
- package/watchlist/package.json +1 -1
package/config/client.src.cjs
CHANGED
|
@@ -51,6 +51,7 @@ const REPO_URL = 'https://github.com/v587d/capital-generation'
|
|
|
51
51
|
const NPM_URL = `https://www.npmjs.com/package/${BUNDLE_NAME}`
|
|
52
52
|
|
|
53
53
|
const FUYAO_DEFAULT_REF = 'FUYAO_API_KEY'
|
|
54
|
+
const FTSHARE_DEFAULT_REF = 'FTSHARE_API_KEY'
|
|
54
55
|
const ANYSEARCH_DEFAULT_REF = 'ANYSEARCH_API_KEY'
|
|
55
56
|
const WIND_DEFAULT_REF = 'WIND_API_KEY'
|
|
56
57
|
const PADDLE_OCR_DEFAULT_REF = 'PADDLE_OCR_TOKEN'
|
|
@@ -68,6 +69,7 @@ const TABS_ID = 'capital-config-tabs'
|
|
|
68
69
|
const SKILL_DOC_ROUTE = '/capital-skills'
|
|
69
70
|
const DOC_URLS = {
|
|
70
71
|
fuyao: 'https://fuyao.aicubes.cn/docs/',
|
|
72
|
+
ftshare: 'https://market.ft.tech/gateway/doc/p/pb8eizu3',
|
|
71
73
|
anysearch: 'https://www.anysearch.com/docs/auth',
|
|
72
74
|
wind: 'https://market.windalice.com/',
|
|
73
75
|
paddleocr: 'https://aistudio.baidu.com/paddleocr',
|
|
@@ -76,11 +78,13 @@ const DOC_URLS = {
|
|
|
76
78
|
/**
|
|
77
79
|
* 密钥字段清单(渲染顺序 = 数组顺序)。读状态、寻 ref 名、写草稿、事件刷新都遍历这一份:
|
|
78
80
|
* 加一个 Key 以前要在九处各补一遍,漏掉的那处不会报错,只会让用户填了却不生效。
|
|
81
|
+
* FTShare 排在 Fuyao 之后:两家是同一格里的两个结构化数据上游(互为第二家),检索与解析跟在后面。
|
|
79
82
|
*/
|
|
80
|
-
const CREDENTIAL_FIELDS = ['fuyao', 'anysearch', 'wind', 'paddleocr']
|
|
83
|
+
const CREDENTIAL_FIELDS = ['fuyao', 'ftshare', 'anysearch', 'wind', 'paddleocr']
|
|
81
84
|
const SELECTED_SKILL_FIELDS = SELECTED_SKILL_CATALOG.map(({ key }) => key)
|
|
82
85
|
const DEFAULT_REFS = {
|
|
83
86
|
fuyao: FUYAO_DEFAULT_REF,
|
|
87
|
+
ftshare: FTSHARE_DEFAULT_REF,
|
|
84
88
|
anysearch: ANYSEARCH_DEFAULT_REF,
|
|
85
89
|
wind: WIND_DEFAULT_REF,
|
|
86
90
|
paddleocr: PADDLE_OCR_DEFAULT_REF,
|
|
@@ -97,6 +101,8 @@ const zh = {
|
|
|
97
101
|
componentsHint: '组件清单由 DSH 绘制,显示在下方。',
|
|
98
102
|
fuyaoLabel: 'Fuyao API Key',
|
|
99
103
|
fuyaoHint: '同花顺 Fuyao 结构化数据接口。保存后新 Capital 模式会话生效。',
|
|
104
|
+
ftshareLabel: 'FTShare API Key',
|
|
105
|
+
ftshareHint: '非凸科技 FTShare 结构化数据接口(免费档)。保存后新 Capital 模式会话生效。',
|
|
100
106
|
anysearchLabel: 'AnySearch API Key',
|
|
101
107
|
anysearchHint: 'AnySearch 网页搜索 / 提取接口。保存后新 Capital 模式会话生效。',
|
|
102
108
|
localFetchLabel: '允许启动本地提取网页内容',
|
|
@@ -141,6 +147,8 @@ const en = {
|
|
|
141
147
|
componentsHint: 'The component list is drawn by DSH and appears below.',
|
|
142
148
|
fuyaoLabel: 'Fuyao API Key',
|
|
143
149
|
fuyaoHint: 'Tonghuashun Fuyao structured-data API. Takes effect in new Capital mode sessions.',
|
|
150
|
+
ftshareLabel: 'FTShare API Key',
|
|
151
|
+
ftshareHint: 'Feikon FTShare structured-data API (free tier). Takes effect in new Capital mode sessions.',
|
|
144
152
|
anysearchLabel: 'AnySearch API Key',
|
|
145
153
|
anysearchHint: 'AnySearch web search / extract interface. Takes effect in new Capital mode sessions.',
|
|
146
154
|
localFetchLabel: 'Allow local web page extraction',
|
|
@@ -179,6 +187,7 @@ function text(value, fallback) {
|
|
|
179
187
|
|
|
180
188
|
function refOf(snapshot, field) {
|
|
181
189
|
if (field === 'fuyao') return text(snapshot.value?.fuyaoCredentialRef, DEFAULT_REFS.fuyao)
|
|
190
|
+
if (field === 'ftshare') return text(snapshot.value?.ftshareCredentialRef, DEFAULT_REFS.ftshare)
|
|
182
191
|
if (field === 'wind') return text(snapshot.value?.retriever?.windDocs?.credentialRef, DEFAULT_REFS.wind)
|
|
183
192
|
if (field === 'paddleocr') return text(snapshot.value?.retriever?.paddleOcr?.credentialRef, DEFAULT_REFS.paddleocr)
|
|
184
193
|
return text(snapshot.value?.retriever?.credentialRef, DEFAULT_REFS.anysearch)
|
|
@@ -765,6 +774,7 @@ function CapitalCard(props) {
|
|
|
765
774
|
onDiscard: props.discard,
|
|
766
775
|
},
|
|
767
776
|
h(SecretRow, { field: 'fuyao', label: t('fuyaoLabel'), hint: t('fuyaoHint'), docsUrl: DOC_URLS.fuyao, state: state.fuyao, disabled: disabled || state.saving || !state.fuyao.writable, onEdit: (value) => props.edit('fuyao', value), t }),
|
|
777
|
+
h(SecretRow, { field: 'ftshare', label: t('ftshareLabel'), hint: t('ftshareHint'), docsUrl: DOC_URLS.ftshare, state: state.ftshare, disabled: disabled || state.saving || !state.ftshare.writable, onEdit: (value) => props.edit('ftshare', value), t }),
|
|
768
778
|
h(SecretRow, { field: 'anysearch', label: t('anysearchLabel'), hint: t('anysearchHint'), docsUrl: DOC_URLS.anysearch, state: state.anysearch, disabled: disabled || state.saving || !state.anysearch.writable, onEdit: (value) => props.edit('anysearch', value), t }),
|
|
769
779
|
h(SecretRow, { field: 'wind', label: t('windLabel'), hint: t('windHint'), docsUrl: DOC_URLS.wind, state: state.wind, disabled: disabled || state.saving || !state.wind.writable, onEdit: (value) => props.edit('wind', value), t }),
|
|
770
780
|
h(SecretRow, { field: 'paddleocr', label: t('paddleocrLabel'), hint: t('paddleocrHint'), docsUrl: DOC_URLS.paddleocr, state: state.paddleocr, disabled: disabled || state.saving || !state.paddleocr.writable, onEdit: (value) => props.edit('paddleocr', value), t }),
|
package/config/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FTShare(非凸科技 `market.ft.tech/gateway`)REST source —— **资金流 + 行情/日 K 截面 + 快照与日历
|
|
3
|
-
* + 大宗与披露 +
|
|
3
|
+
* + 大宗与披露 + 申万行业 + 期货与贵金属**。
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* 为什么接这一族(批次 A–E 逐条真报文实测于 2026-10-15,批次 F 于 2026-10-16):
|
|
6
6
|
* - 同花顺 `capital-flow/*` 对我们是 `code=2004` 永久关闭,东财 `eastmoney_main_capital_snapshot`
|
|
7
7
|
* 实测**只有查询日一股一行**——个股资金流的历史序列在本仓一直是空的。这一族给到最近约 45 个交易日
|
|
8
8
|
* (T-45 仍有 5199 行、T-50 起 total=0),主力五档更给到约 187 个交易日。
|
|
9
9
|
* - 板块(行业)资金滚动此前只有 `eastmoney_cashflow_rotation` 一条,上游一抖就没有第二家。
|
|
10
10
|
* - 北交所行情此前是**零**:腾讯那一路在参数层明确拒 BJ,而这一族实测含 349 只北证票。
|
|
11
|
+
* - 期货与贵金属此前在本仓是**整块空白**(`ticker_search` 只允许消歧到期货交易所,没有一条数据端点),
|
|
12
|
+
* 所以批次 F 那十颗不是第二家,而是第一家:合约清单与要素、日/周/月/季 K 线、涨跌停价、每日结算参数、
|
|
13
|
+
* 仓单日报、品种周报、南华商品指数、东财会员持仓排名、贵金属价格。
|
|
11
14
|
* 上游分别是同花顺与同花顺 daec,与现有能力**不是同一条抓取路径**,才够称 plan B。
|
|
12
15
|
*
|
|
13
16
|
* ⛔ 本模块的 description 与注释**只允许写有原始报文可回查的数字**。2026-10-15 曾有一批"实测计数"
|