@dshtrading/connector-finnhub 0.6.3 → 0.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/lib/index.d.ts CHANGED
@@ -38,6 +38,13 @@ declare class FinnhubTradeService extends Service implements TradeService {
38
38
  getBalance(): Promise<AccountBalance$1>;
39
39
  placeOrder(order: OrderRequest): Promise<Order$1>;
40
40
  cancelOrder(orderId: string, _symbol?: string): Promise<void>;
41
+ /**
42
+ * 单笔订单状态查询(api 契约必选方法,R3 okx 切片 2026-08-29 引入)。本连接器没有单笔
43
+ * 订单状态端点:必须显式拒绝,绝不编造订单回执——编造回执会被读成「订单存在/不存在」,
44
+ * 而契约语义是 TRADING_NOT_IMPLEMENTED(不可用)。
45
+ * 与 connector-ccxt / connector-bybit / connector-tushare 的同名方法同形。
46
+ */
47
+ getOrder(_symbol: string, _id: string): Promise<Order$1>;
41
48
  getPositions(): Promise<Position$1[]>;
42
49
  getOrders(): Promise<Order$1[]>;
43
50
  }
package/lib/index.js CHANGED
@@ -80,6 +80,15 @@ var FinnhubTradeService = class extends Service {
80
80
  if (!liveTradingEnabled(this.config.liveTrading) || this.config.dryRun) throw new TradingServiceError("TRADING_LIVE_TRADING_DISABLED", "Finnhub TradeService.cancelOrder rejected at the service seam: cancel is a live action and requires a signed live-trading grant (see @dshtrading/authority) with dryRun=false.");
81
81
  return this.client.cancelOrder(void 0, orderId);
82
82
  }
83
+ /**
84
+ * 单笔订单状态查询(api 契约必选方法,R3 okx 切片 2026-08-29 引入)。本连接器没有单笔
85
+ * 订单状态端点:必须显式拒绝,绝不编造订单回执——编造回执会被读成「订单存在/不存在」,
86
+ * 而契约语义是 TRADING_NOT_IMPLEMENTED(不可用)。
87
+ * 与 connector-ccxt / connector-bybit / connector-tushare 的同名方法同形。
88
+ */
89
+ async getOrder(_symbol, _id) {
90
+ throw new TradingServiceError("TRADING_NOT_IMPLEMENTED", "Finnhub TradeService.getOrder is not implemented: this connector has no single-order status lookup. That means \"not available\", NOT \"order not found\".");
91
+ }
83
92
  async getPositions() {
84
93
  return [];
85
94
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dshtrading/connector-finnhub",
3
3
  "description": "Finnhub 商业数据源美股连接器(BYOK):tradingUsMarketData / tradingUsTrade 双服务 + us_get_ticker / us_get_klines / us_get_news 三个行情工具,服务缝三态下单闸门;凭证只存 ref 名 FINNHUB_API_KEY,不内置密钥。",
4
- "version": "0.6.3",
4
+ "version": "0.7.0",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "./lib/index.d.ts",
@@ -21,13 +21,13 @@
21
21
  ],
22
22
  "license": "PolyForm-Noncommercial-1.0.0",
23
23
  "dependencies": {
24
- "@dshtrading/authority": "^0.6.3",
25
- "@dshtrading/api": "^0.6.3"
24
+ "@dshtrading/authority": "^0.7.0",
25
+ "@dshtrading/api": "^0.7.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@deepseek-ai/cordis": ">=4.0.0",
29
- "@deepseek-ai/dsh-tools": ">=0.2.1-rc.2",
30
- "@deepseek-ai/schemastery": ">=3.18.0"
28
+ "@deepseek-ai/cordis": ">=4.1.0",
29
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.1",
30
+ "@deepseek-ai/schemastery": ">=3.19.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "tsdown": "^0.22.0",