@dshtrading/kit-crypto 0.3.0 → 0.4.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.
|
@@ -57,9 +57,10 @@ description: 加密标的定性分析框架:趋势结构→量价→波动率
|
|
|
57
57
|
## 输出格式
|
|
58
58
|
|
|
59
59
|
1. **定性结论**(一句话:方向 + 结构状态 + 关键条件)
|
|
60
|
-
2.
|
|
60
|
+
2. **依据清单**(按证据契约逐条落账:`来源等级`(S–E)+ `判定` + `锚点`。锚点 = 工具名 + 参数 + 数值 + 数据时间,或知识卡 id / 公告章节;判定只有 `supported` / `contradicted` / `mixed` / `insufficient` 四态,写不出锚点的记 `insufficient`,单一 C/D/E 级来源不得单独支撑 `supported`)
|
|
61
61
|
3. **反方情景**(什么数据出现会推翻本结论——必须具体到指标与阈值)
|
|
62
62
|
4. **置信度**(高/中/低 + 原因;单周期、新闻面未覆盖、低流动性至少占其一即不得标高)
|
|
63
|
+
5. **未覆盖项**(拿不到的数据或工具单列缺口,写明影响哪条结论;不得用「数据有限」带过,不得用记忆补数)
|
|
63
64
|
|
|
64
65
|
## 禁止事项
|
|
65
66
|
|
|
@@ -7,6 +7,8 @@ description: 加密合约交易风控检查清单:开仓前逐项核对杠杆
|
|
|
7
7
|
|
|
8
8
|
开仓前逐项核对,任何一项不过则不建仓:
|
|
9
9
|
|
|
10
|
+
**依据闸门(先过)**:每条开仓理由必须能指回锚点(工具名 + 参数 + 数值 + 数据时间 / 公告或章节 / facts 条目 / 知识卡 id + updatedAt)。只有 C/D/E 级来源、或写不出锚点的理由,按证据不足处理(insufficient),不得作为入场依据。
|
|
11
|
+
|
|
10
12
|
1. **杠杆**:名义杠杆是否在计划上限内(默认 ≤3x);波动率放大时段(重大数据公布、周末薄流动性)是否降杠杆。
|
|
11
13
|
2. **仓位**:单笔风险是否 ≤ 账户权益的既定百分比;同一标的的多笔仓位是否合并计算了净敞口。
|
|
12
14
|
3. **资金费率**:当前 funding rate 与下一次结算时间;跨期/现货对冲时,费率方向是否与持仓方向一致(套利而非付费)。
|
|
@@ -30,6 +30,8 @@ description: 财经观点沉淀与知识库策展指南:基于 Content Insight
|
|
|
30
30
|
- `medium`:核心逻辑有参考价值,但部分数据存在滞后或口误出入;
|
|
31
31
|
- `low`:存在重大关键事实失准或关键数据无法核实。
|
|
32
32
|
|
|
33
|
+
> **分层说明(勿混用)**:卡片 `factCheck` 三桶是**素材级**核查记录(这条声称被核实到什么程度);结论级证据契约的 `supported` / `contradicted` / `mixed` / `insufficient` 四态是**结论级**判定(这条结论能否成立)。卡片字段不因四态改名;引用卡片时按证据契约归入 C/D 级线索,不得单独支撑 `supported` 结论。
|
|
34
|
+
|
|
33
35
|
---
|
|
34
36
|
|
|
35
37
|
## 3. 标准策展 SOP
|
package/lib/api/lib/index.d.ts
CHANGED
|
@@ -620,6 +620,8 @@ declare module '@deepseek-ai/cordis' {
|
|
|
620
620
|
tradingNewsRegistry: TradingNewsRegistry;
|
|
621
621
|
/** 跨市场快讯源(@dshtrading/connector-jin10 提供;缺席 = 未安装快讯连接器)。 */
|
|
622
622
|
tradingFlashFeed: FlashFeedService;
|
|
623
|
+
/** 宏观/利率源(@dshtrading/connector-jin10 提供;缺席 = 未安装金十连接器)。 */
|
|
624
|
+
tradingMacroFeed: MacroFeedService;
|
|
623
625
|
}
|
|
624
626
|
}
|
|
625
627
|
/**
|
|
@@ -746,6 +748,50 @@ interface FlashFeedService {
|
|
|
746
748
|
/** 关键词搜快讯(上游一次性返回、不支持翻页)。 */
|
|
747
749
|
searchFlash(keyword: string, limit?: number | undefined): Promise<readonly NewsItem[]>;
|
|
748
750
|
}
|
|
751
|
+
/**
|
|
752
|
+
* 宏观经济日历条目(金十当周经济数据,2026-09-15):数值均为上游快照原样字符串,
|
|
753
|
+
* `actual` 缺省 = 未公布。
|
|
754
|
+
*/
|
|
755
|
+
interface MacroCalendarEntry {
|
|
756
|
+
/** ISO 8601 公布时间(东八区解释,同 NewsItem 口径)。 */
|
|
757
|
+
readonly publishedAt: string;
|
|
758
|
+
/** 重要度(上游 star,0–5)。 */
|
|
759
|
+
readonly star: number;
|
|
760
|
+
/** 地区(标题前缀推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
761
|
+
readonly region: string;
|
|
762
|
+
readonly title: string;
|
|
763
|
+
readonly previous?: string;
|
|
764
|
+
readonly consensus?: string;
|
|
765
|
+
readonly actual?: string;
|
|
766
|
+
readonly revised?: string;
|
|
767
|
+
/** 上游公布影响词(利多/利空/影响较小…;原样透传)。 */
|
|
768
|
+
readonly affect?: string;
|
|
769
|
+
}
|
|
770
|
+
/** 央行最新利率条目(金十网页版,2026-09-15)。 */
|
|
771
|
+
interface MacroRateEntry {
|
|
772
|
+
/** 地区(flag 名推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
773
|
+
readonly region: string;
|
|
774
|
+
readonly bankName: string;
|
|
775
|
+
/** 最新利率(上游原样字符串,如 "3.75"/"0")。 */
|
|
776
|
+
readonly rate: string;
|
|
777
|
+
/** 公布日(上游原样 YYYY-MM-DD)。 */
|
|
778
|
+
readonly publishedAt: string;
|
|
779
|
+
/** 所属指标名(如「美联储利率决定(上限)」;部分央行缺省)。 */
|
|
780
|
+
readonly indicatorName?: string;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* 宏观/利率源契约(2026-09-15 金十接入):host 平面由金十连接器 provide
|
|
784
|
+
* tradingMacroFeed,GUI 宏观面板(桥 /dshtrading/api/macro/*)消费;服务缺席 =
|
|
785
|
+
* 未安装/未启用该数据源 → 消费方报 TRADING_NOT_IMPLEMENTED,绝不把「没有数据源」
|
|
786
|
+
* 伪装成「没有数据」。日历走官方 MCP(list_calendar),利率走网页版公开接口
|
|
787
|
+
* (spikes/impl-jin10-macro-rates/EVIDENCE.md)。
|
|
788
|
+
*/
|
|
789
|
+
interface MacroFeedService {
|
|
790
|
+
/** 当周经济日历(周一~周日,北京时间;limit 截尾,缺省全周)。 */
|
|
791
|
+
listCalendar(limit?: number | undefined): Promise<readonly MacroCalendarEntry[]>;
|
|
792
|
+
/** 央行最新利率(全量,客户端按地区过滤)。 */
|
|
793
|
+
listRates(): Promise<readonly MacroRateEntry[]>;
|
|
794
|
+
}
|
|
749
795
|
/** 新闻聚合器注册表契约(Issue #37,router 插件提供)。 */
|
|
750
796
|
interface TradingNewsRegistry {
|
|
751
797
|
register(market: string, aggregator: NewsAggregator): () => void;
|
|
@@ -753,4 +799,4 @@ interface TradingNewsRegistry {
|
|
|
753
799
|
markets(): string[];
|
|
754
800
|
}
|
|
755
801
|
//#endregion
|
|
756
|
-
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, InsiderTradeItem, InstitutionalHoldingItem, Interval, Kline, LimitUpPoolItem, MainOperationSegment, MarketDataRegistration, MarketDataRegistry, MarketDataService, MarketRouterService, NewsAggregator, NewsItem, OperatingEfficiency, Order, OrderRequest, OrderSide, OrderStatus, OrderType, Orderbook, OrderbookLevel, Position, PositionSide, ResearchReportItem, ShareholderItem, SplitItem, StockFundamentals, Ticker, TradeFill, TradeRegistration, TradeRegistry, TradeService, TradeTick, TradingNewsRegistry };
|
|
802
|
+
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, InsiderTradeItem, InstitutionalHoldingItem, Interval, Kline, LimitUpPoolItem, MacroCalendarEntry, MacroFeedService, MacroRateEntry, MainOperationSegment, MarketDataRegistration, MarketDataRegistry, MarketDataService, MarketRouterService, NewsAggregator, NewsItem, OperatingEfficiency, Order, OrderRequest, OrderSide, OrderStatus, OrderType, Orderbook, OrderbookLevel, Position, PositionSide, ResearchReportItem, ShareholderItem, SplitItem, StockFundamentals, Ticker, TradeFill, TradeRegistration, TradeRegistry, TradeService, TradeTick, TradingNewsRegistry };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dshtrading/kit-crypto",
|
|
3
3
|
"description": "Crypto toolkit plugin for dsh-trading: market-specific tools and bundled trading skills (skill provider); runs as a crypto-trader preset row (session-scoped)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dshtrading/indicators": "0.
|
|
22
|
-
"@dshtrading/knowledge": "0.
|
|
21
|
+
"@dshtrading/indicators": "0.4.0",
|
|
22
|
+
"@dshtrading/knowledge": "0.4.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@deepseek-ai/cordis": ">=4.0.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"tsdown": "^0.22.0",
|
|
32
32
|
"vitest": "^3.0.0",
|
|
33
|
-
"@dshtrading/api": "0.
|
|
33
|
+
"@dshtrading/api": "0.4.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsdown",
|