@openfinclaw/openfinclaw-strategy 2026.4.11 → 2026.4.12

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.
Files changed (3) hide show
  1. package/SKILL.md +1 -1
  2. package/package.json +1 -1
  3. package/src/cli.ts +9 -1
package/SKILL.md CHANGED
@@ -12,7 +12,7 @@ metadata:
12
12
 
13
13
  统一金融工具平台,一个 API Key 即可使用所有功能:
14
14
 
15
- - **行情数据**: 价格查xq询、K线、加密市场数据、多资产对比、代码搜索
15
+ - **行情数据**: 价格查询、K线、加密市场数据、多资产对比、代码搜索
16
16
  - **策略工具**: 创建、验证、发布、Fork 策略
17
17
  - **统一认证**: 一个 API Key 访问 Hub 和 DataHub
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfinclaw/openfinclaw-strategy",
3
- "version": "2026.4.11",
3
+ "version": "2026.4.12",
4
4
  "description": "OpenFinClaw - Unified financial tools: market data (price/K-line/crypto/compare/search), strategy publishing, fork, and validation. Single API key for Hub and DataHub.",
5
5
  "keywords": [
6
6
  "backtest",
package/src/cli.ts CHANGED
@@ -63,10 +63,18 @@ export function registerStrategyCli(params: {
63
63
  url.searchParams.set("limit", String(limit));
64
64
  url.searchParams.set("offset", String(offset));
65
65
 
66
+ if (!config.apiKey) {
67
+ console.error(
68
+ "✗ API key not configured. Set apiKey in plugin config or OPENFINCLAW_API_KEY env var.",
69
+ );
70
+ process.exitCode = 1;
71
+ return;
72
+ }
73
+
66
74
  try {
67
75
  const response = await fetch(url.toString(), {
68
76
  method: "GET",
69
- headers: { Accept: "application/json" },
77
+ headers: { Accept: "application/json", Authorization: `Bearer ${config.apiKey}` },
70
78
  signal: AbortSignal.timeout(config.requestTimeoutMs),
71
79
  });
72
80