@dshtrading/api 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.
- package/lib/index.d.ts +47 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -652,6 +652,8 @@ declare module '@deepseek-ai/cordis' {
|
|
|
652
652
|
tradingNewsRegistry: TradingNewsRegistry;
|
|
653
653
|
/** 跨市场快讯源(@dshtrading/connector-jin10 提供;缺席 = 未安装快讯连接器)。 */
|
|
654
654
|
tradingFlashFeed: FlashFeedService;
|
|
655
|
+
/** 宏观/利率源(@dshtrading/connector-jin10 提供;缺席 = 未安装金十连接器)。 */
|
|
656
|
+
tradingMacroFeed: MacroFeedService;
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
659
|
/**
|
|
@@ -778,6 +780,50 @@ interface FlashFeedService {
|
|
|
778
780
|
/** 关键词搜快讯(上游一次性返回、不支持翻页)。 */
|
|
779
781
|
searchFlash(keyword: string, limit?: number | undefined): Promise<readonly NewsItem[]>;
|
|
780
782
|
}
|
|
783
|
+
/**
|
|
784
|
+
* 宏观经济日历条目(金十当周经济数据,2026-09-15):数值均为上游快照原样字符串,
|
|
785
|
+
* `actual` 缺省 = 未公布。
|
|
786
|
+
*/
|
|
787
|
+
interface MacroCalendarEntry {
|
|
788
|
+
/** ISO 8601 公布时间(东八区解释,同 NewsItem 口径)。 */
|
|
789
|
+
readonly publishedAt: string;
|
|
790
|
+
/** 重要度(上游 star,0–5)。 */
|
|
791
|
+
readonly star: number;
|
|
792
|
+
/** 地区(标题前缀推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
793
|
+
readonly region: string;
|
|
794
|
+
readonly title: string;
|
|
795
|
+
readonly previous?: string;
|
|
796
|
+
readonly consensus?: string;
|
|
797
|
+
readonly actual?: string;
|
|
798
|
+
readonly revised?: string;
|
|
799
|
+
/** 上游公布影响词(利多/利空/影响较小…;原样透传)。 */
|
|
800
|
+
readonly affect?: string;
|
|
801
|
+
}
|
|
802
|
+
/** 央行最新利率条目(金十网页版,2026-09-15)。 */
|
|
803
|
+
interface MacroRateEntry {
|
|
804
|
+
/** 地区(flag 名推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
805
|
+
readonly region: string;
|
|
806
|
+
readonly bankName: string;
|
|
807
|
+
/** 最新利率(上游原样字符串,如 "3.75"/"0")。 */
|
|
808
|
+
readonly rate: string;
|
|
809
|
+
/** 公布日(上游原样 YYYY-MM-DD)。 */
|
|
810
|
+
readonly publishedAt: string;
|
|
811
|
+
/** 所属指标名(如「美联储利率决定(上限)」;部分央行缺省)。 */
|
|
812
|
+
readonly indicatorName?: string;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* 宏观/利率源契约(2026-09-15 金十接入):host 平面由金十连接器 provide
|
|
816
|
+
* tradingMacroFeed,GUI 宏观面板(桥 /dshtrading/api/macro/*)消费;服务缺席 =
|
|
817
|
+
* 未安装/未启用该数据源 → 消费方报 TRADING_NOT_IMPLEMENTED,绝不把「没有数据源」
|
|
818
|
+
* 伪装成「没有数据」。日历走官方 MCP(list_calendar),利率走网页版公开接口
|
|
819
|
+
* (spikes/impl-jin10-macro-rates/EVIDENCE.md)。
|
|
820
|
+
*/
|
|
821
|
+
interface MacroFeedService {
|
|
822
|
+
/** 当周经济日历(周一~周日,北京时间;limit 截尾,缺省全周)。 */
|
|
823
|
+
listCalendar(limit?: number | undefined): Promise<readonly MacroCalendarEntry[]>;
|
|
824
|
+
/** 央行最新利率(全量,客户端按地区过滤)。 */
|
|
825
|
+
listRates(): Promise<readonly MacroRateEntry[]>;
|
|
826
|
+
}
|
|
781
827
|
/** 新闻聚合器注册表契约(Issue #37,router 插件提供)。 */
|
|
782
828
|
interface TradingNewsRegistry {
|
|
783
829
|
register(market: string, aggregator: NewsAggregator): () => void;
|
|
@@ -785,4 +831,4 @@ interface TradingNewsRegistry {
|
|
|
785
831
|
markets(): string[];
|
|
786
832
|
}
|
|
787
833
|
//#endregion
|
|
788
|
-
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, IAccount, 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, TradingError, TradingErrorCode, TradingNewsRegistry };
|
|
834
|
+
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, IAccount, 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, TradingError, TradingErrorCode, TradingNewsRegistry };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dshtrading/api",
|
|
3
3
|
"description": "Pure TypeScript contracts for dsh-trading: market-data/trade service interfaces, domain types, and the shared error vocabulary",
|
|
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",
|