Loading...
Loading...
跨市场股票技术指标服务。支持 A股/港股/美股 27种技术指标,包括 MA/EMA/RSI/MACD/KDJ/布林带/ADX/ATR/CCI/VWAP等。 当用户询问"RSI""MACD""布林带""技术指标""KDJ""OBV"等时触发。 ⚠️ 加密货币技术指标请使用 crypto-indicators skill。
npx skill4agent add hubblevision/hubble-data-service-skill cross-market-indicators所有接口均为 V2 版本()。/api/v2/...
BASE="http://43.167.234.49:3101"
AUTH=(-H "X-API-Key: 123456" -H "Content-Type: application/json")| 规则 | 值 |
|---|---|
| 必填: |
| 按市场对应格式 |
| 日期格式 | |
| 市场 | | | 示例 |
|---|---|---|---|
| A股 | | 带后缀 | |
| 港股 | | 带 .HK | |
| 美股 | | Ticker | |
| # | Indicator | Type | Key Parameters | Default |
|---|---|---|---|---|
| 1 | SMA | Trend | | 20 |
| 2 | EMA | Trend | | 20 |
| 3 | RSI | Oscillator | | 14 |
| 4 | MACD | Trend | | 12, 26, 9 |
| 5 | BOLL | Volatility | | 20, 2.0 |
| 6 | KDJ | Oscillator | | 9, 3, 3 |
| 7 | ADX | Trend | | 14 |
| 8 | ATR | Volatility | | 14 |
| 9 | CCI | Oscillator | | 14 |
| 10 | VWAP | Volume | | 20 |
| 11 | OBV | Volume | 无 | — |
| 12 | NATR | Volatility | | 14 |
| 13 | MFI | Volume | | 14 |
| 14 | WILLR | Oscillator | | 14 |
| 15 | STDDEV | Volatility | | 20 |
| 16 | Aroon | Trend | | 14 |
| 17 | TRIX | Trend | | 9 |
| 18 | MOM | Momentum | | 10 |
| 19 | ROC | Momentum | | 12 |
| 20 | CMO | Momentum | | 14 |
| 21 | AD | Volume | 无 | — |
| 22 | HT Trendline | Trend | 无 | — |
| 23 | PPO | Trend | | 12, 26 |
| 24 | SAR | Trend | | 0.02, 0.2 |
| 25 | Stoch | Oscillator | | 14, 3, 3 |
| 26 | ULTOSC | Oscillator | | 7, 14, 28 |
| 27 | ADOSC | Volume | | 3, 10 |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | — | |
| string | Yes | — | 股票代码 |
| string | No | | |
| int | No | | 记录数上限 |
| string | No | — | 起始日期 YYYY-MM-DD |
| string | No | — | 结束日期 YYYY-MM-DD |
| array | Yes | — | 指标列表 |
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | 指标类型(小写) |
| array | No | 指标参数 |
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | |
| string | Yes | 股票代码 |
| string | No | 默认 |
| int | No | 周期参数 |
| int | No | 默认 100 |
| Indicator | params | 示例 |
|---|---|---|
| sma, ema, rsi, atr, cci, vwap, natr, mfi, willr, stddev, aroon, trix | | |
| mom, roc, cmo | | |
| macd | | |
| boll | | |
| kdj | | |
| ppo, adosc | | |
| sar | | |
| stoch | | |
| ultosc | | |
| obv, ad, ht_trendline | 无 params | 省略 |
# A股:RSI + MACD + BOLL + KDJ
curl -sS "${AUTH[@]}" -X POST "$BASE/api/v2/indicators/batch" -d '{
"market": "cn",
"symbol": "000001.SZ",
"interval": "1d",
"limit": 100,
"indicators": [
{"type": "rsi", "params": [14]},
{"type": "macd", "params": [12, 26, 9]},
{"type": "boll", "params": [20, 2.0]},
{"type": "kdj", "params": [9, 3, 3]}
]
}'
# 港股:MACD + SMA
curl -sS "${AUTH[@]}" -X POST "$BASE/api/v2/indicators/batch" -d '{
"market": "hk",
"symbol": "00700.HK",
"interval": "1d",
"limit": 100,
"indicators": [
{"type": "macd", "params": [12, 26, 9]},
{"type": "sma", "params": [20]}
]
}'
# 美股:BOLL
curl -sS "${AUTH[@]}" -X POST "$BASE/api/v2/indicators/batch" -d '{
"market": "us",
"symbol": "AAPL",
"interval": "1d",
"limit": 100,
"indicators": [
{"type": "boll", "params": [20, 2.0]}
]
}'# A股 RSI
curl -sS "${AUTH[@]}" "$BASE/api/v2/indicators/rsi?market=cn&symbol=000001.SZ&interval=1d&period=14&limit=100"
# 港股 MACD
curl -sS "${AUTH[@]}" "$BASE/api/v2/indicators/macd?market=hk&symbol=00700.HK&interval=1d&fast_period=12&slow_period=26&signal_period=9&limit=100"
# 美股 BOLL
curl -sS "${AUTH[@]}" "$BASE/api/v2/indicators/boll?market=us&symbol=AAPL&interval=1d&period=20&nbdev=2.0&limit=100"
# 无参数指标:OBV
curl -sS "${AUTH[@]}" "$BASE/api/v2/indicators/obv?market=cn&symbol=000001.SZ&interval=1d&limit=100"
# 指标信息
curl -sS "${AUTH[@]}" "$BASE/api/v2/indicators/info"| 错误 | 原因 | 修复 |
|---|---|---|
| 400 (缺 market) | | 加上 |
| 400 (日期格式) | 用了 | 指标端点用 |
| BOLL 结果错误 | V1 习惯 | V2 用单个 |
| 404 | 指标类型拼写错误 | 小写: |