@dshtrading/api 0.2.1 → 0.3.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 +37 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -616,6 +616,10 @@ declare module '@deepseek-ai/cordis' {
|
|
|
616
616
|
tradingCnMarketData: MarketDataService;
|
|
617
617
|
/** hk 市场行情服务(由腾讯连接器同包双实例提供,config.market 分流;cn+hk 切片 2026-08-31 补齐)。 */
|
|
618
618
|
tradingHkMarketData: MarketDataService;
|
|
619
|
+
/** futures 市场行情服务(由同花顺期货连接器提供,issue #97;日K + 当日分时聚合)。 */
|
|
620
|
+
tradingFuturesMarketData: MarketDataService;
|
|
621
|
+
/** 全球品种行情(global 市场:大宗/外汇/海外指数;@dshtrading/connector-jin10 dataplane 行提供)。 */
|
|
622
|
+
tradingGlobalMarketData: MarketDataService;
|
|
619
623
|
/**
|
|
620
624
|
* crypto 市场交易服务(R3 2026-08-29 补齐,crypto 市场第一个真实 TradeService):
|
|
621
625
|
* 由 connector-okx 实现(签名 demo/live 下单),与 connector-binance 经
|
|
@@ -646,6 +650,8 @@ declare module '@deepseek-ai/cordis' {
|
|
|
646
650
|
* 各市场 Kit apply 时注册 aggregateNews 纯函数,GUI 行情桥按市场获取。
|
|
647
651
|
*/
|
|
648
652
|
tradingNewsRegistry: TradingNewsRegistry;
|
|
653
|
+
/** 跨市场快讯源(@dshtrading/connector-jin10 提供;缺席 = 未安装快讯连接器)。 */
|
|
654
|
+
tradingFlashFeed: FlashFeedService;
|
|
649
655
|
}
|
|
650
656
|
}
|
|
651
657
|
/**
|
|
@@ -721,6 +727,8 @@ interface NewsItem {
|
|
|
721
727
|
readonly publishedAt: string;
|
|
722
728
|
/** 关联标的代码(可选,格式随源不同)。 */
|
|
723
729
|
readonly relatedCodes?: readonly string[];
|
|
730
|
+
/** 热度等级(可选;金十快讯网页版 火/热/沸/爆,其他源不填)。 */
|
|
731
|
+
readonly hot?: string;
|
|
724
732
|
}
|
|
725
733
|
/** 新闻聚合请求选项。 */
|
|
726
734
|
interface AggregateNewsOptions {
|
|
@@ -732,6 +740,11 @@ interface AggregateNewsOptions {
|
|
|
732
740
|
symbol?: string | undefined;
|
|
733
741
|
/** CryptoPanic API token(仅 crypto 市场使用,可选)。 */
|
|
734
742
|
cryptoPanicKey?: string | undefined;
|
|
743
|
+
/**
|
|
744
|
+
* 启用的新闻/公告源 id 列表(issue #96 源配置化;各 kit 的 NewsSource 词汇)。
|
|
745
|
+
* 缺省 = 该市场全部默认源;空数组 = 显式关闭(返回空结果)。
|
|
746
|
+
*/
|
|
747
|
+
sources?: readonly string[] | undefined;
|
|
735
748
|
}
|
|
736
749
|
/** 新闻聚合结果。 */
|
|
737
750
|
interface AggregateNewsResult {
|
|
@@ -742,6 +755,29 @@ interface AggregateNewsResult {
|
|
|
742
755
|
}
|
|
743
756
|
/** 新闻聚合器函数签名(各 Kit 导出的 aggregateNews 符合此形状)。 */
|
|
744
757
|
type NewsAggregator = (options?: AggregateNewsOptions) => Promise<AggregateNewsResult>;
|
|
758
|
+
/**
|
|
759
|
+
* 跨市场快讯源契约(2026-09-13 金十接入):host 平面由快讯连接器 provide
|
|
760
|
+
* tradingFlashFeed,GUI 快讯面板(桥 /dshtrading/api/flash)与 agent 快讯工具
|
|
761
|
+
* 共用同一取数实现;服务缺席 = 未安装/未启用该数据源 → 消费方报
|
|
762
|
+
* TRADING_NOT_IMPLEMENTED,绝不把「没有数据源」伪装成「没有快讯」。
|
|
763
|
+
*/
|
|
764
|
+
interface FlashFeedService {
|
|
765
|
+
/**
|
|
766
|
+
* 最新快讯流(cursor 翻页);条目只含元数据(标题/时间/链接)。
|
|
767
|
+
* `hot` 非空时按热度等级服务端过滤(金十网页版 火/热/沸/爆)。
|
|
768
|
+
*/
|
|
769
|
+
listFlash(options?: {
|
|
770
|
+
cursor?: string | undefined;
|
|
771
|
+
limit?: number | undefined;
|
|
772
|
+
hot?: readonly string[] | undefined;
|
|
773
|
+
}): Promise<{
|
|
774
|
+
readonly items: readonly NewsItem[];
|
|
775
|
+
readonly nextCursor?: string | undefined;
|
|
776
|
+
readonly hasMore: boolean;
|
|
777
|
+
}>;
|
|
778
|
+
/** 关键词搜快讯(上游一次性返回、不支持翻页)。 */
|
|
779
|
+
searchFlash(keyword: string, limit?: number | undefined): Promise<readonly NewsItem[]>;
|
|
780
|
+
}
|
|
745
781
|
/** 新闻聚合器注册表契约(Issue #37,router 插件提供)。 */
|
|
746
782
|
interface TradingNewsRegistry {
|
|
747
783
|
register(market: string, aggregator: NewsAggregator): () => void;
|
|
@@ -749,4 +785,4 @@ interface TradingNewsRegistry {
|
|
|
749
785
|
markets(): string[];
|
|
750
786
|
}
|
|
751
787
|
//#endregion
|
|
752
|
-
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, 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 };
|
|
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 };
|
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.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|