支持的指标
提供 59 个指标。参数和输出列以 registry 为准;可绘图指标见 catalog。
调用与读取
使用 POST /api/indicators;将 name、可选的 params 和 id 放入 calc[]:
json
{"exchange":"binance","market":"perp","symbol":"BTCUSDT","interval":"5m","limit":100,"calc":[{"name":"rsi","id":"rsi","params":{"period":14}}]}以下为响应局部示例。按 indicators[响应key] 读取,columns 与每行 data 按位置对应;open_time 为毫秒。
json
{
"indicators": {
"rsi": {
"columns": ["open_time", "rsi"],
"data": [[1735689600000, 55.0]],
"explain": {
"name": "RSI",
"summary_focus": ["当前 RSI 数值及近期变化"]
}
}
}
}需要解读说明时传 ?explain=true,读取各指标的 explain;只需要计算数值时可传 ?explain=false。
| 字段 | 使用方式 |
|---|---|
columns / data | 字段名及每根 K 线的值 |
objects | 部分指标返回的事件或区间对象,见对应指标页 |
meta | 部分指标返回的结果状态,见对应指标页 |
explain.summary_focus | 返回值的解读提示 |
explain.outputs / signals / caveats | 按指标提供的字段含义、信号规则及使用限制;不保证每个指标都有 |
类别分布
| 类别 | 数量 | 用途 |
|---|---|---|
base | 1 | 价格/成交量等基础列 |
momentum | 18 | 动量类(MACD、RSI 家族、TSI…) |
oscillator | 4 | 振荡器(RSI、Fisher、RVI…) |
trend | 15 | 趋势线(EMA、SuperTrend、PSAR…) |
trend_strength | 4 | 趋势强度(ADX、Aroon、Vortex…) |
volatility | 10 | 波动率(ATR、Bollinger、Keltner…) |
volume | 7 | 量价(OBV、CMF、CVD、KVO、VWAP…) |
注册表与目录的区别
/api/indicators/registry→ 完整自描述(参数、输出列、类型),给程序消费/api/indicators/catalog→ 可绘图的子集 + 配色/面板元信息,给 chart 客户端用/api/indicators→ POST 计算端点,返回 K 线 + 指标值
完整列表
base(1)
| ID | 说明 |
|---|---|
price | OHLCV 价格/成交量基础列 |
momentum(18)
| ID | 中文名 |
|---|---|
accelerator_oscillator | 加速振荡器 |
awesome_oscillator | 鳄鱼振荡器(AO) |
cci | 顺势指标(CCI) |
chande_mo | 钱德动量摆动指标 |
connors_rsi | Connors RSI |
coppock_curve | 科波克曲线 |
dpo | 去趋势价格振荡器 |
kst | 确知动量指标(KST) |
macd | MACD |
momentum | 动量(MOM) |
ppo | 价格振荡百分比(PPO) |
roc | 变动率(ROC) |
smi_ergodic | SMI 遍历指标 |
stoch_rsi | 随机 RSI(StochRSI) |
trix | TRIX 三重指数平滑 |
tsi | 真实强弱指数(TSI) |
ultimate_oscillator | 终极振荡器(UO) |
williams_r | 威廉指标(%R) |
oscillator(4)
| ID | 中文名 |
|---|---|
fisher_transform | Fisher 变换 |
rci_ribbon | RCI 排列指数带 |
rsi | 相对强弱指数(RSI) |
rvi | 相对活力指数(RVI) |
trend(15)
| ID | 中文名 |
|---|---|
alligator | 比尔威廉姆斯鳄鱼线 |
alma | 阿尔诺移动平均(ALMA) |
ema | 指数移动平均(EMA) |
hma | 赫尔移动平均(HMA) |
hmm_regime | HMM Mobius 双尺度方向(8 字段,含证据支持) |
lsma | 最小二乘移动平均 |
mcginley_dynamic | 麦吉利动态指标 |
mobius_trend | MobiusQuant 复合趋势线 |
parabolic_sar | 抛物线 SAR |
pi_cycle_bottom | Pi Cycle Bottom |
smc | 智能资金概念(SMC) |
supertrend | SuperTrend |
tema | 三重指数移动平均(TEMA) |
vwma | 成交量加权移动平均(VWMA) |
williams_stops | 威廉止损线 |
trend_strength(4)
| ID | 中文名 |
|---|---|
adx | 平均趋向指数(ADX) |
aroon_oscillator | Aroon 振荡器 |
choppiness_index | 震荡指数(CHOP) |
vortex | 涡旋指标(Vortex) |
volatility(10)
| ID | 中文名 |
|---|---|
atr | 平均真实波幅(ATR) |
bollinger | 布林带 |
chande_kroll_stop | Chande Kroll 止损 |
donchian_channels | 唐奇安通道 |
fibonacci_bollinger_bands | 斐波那契布林带 |
historical_volatility | 历史波动率 |
keltner_channels | 肯特纳通道 |
linear_regression_channel | 线性回归通道 |
mass_index | 梅斯线 |
stdev | 标准差 |
volume(7)
| ID | 中文名 |
|---|---|
chaikin_oscillator | 蔡金振荡器 |
cmf | 蔡金资金流量(CMF) |
cvd | 累计成交量差(CVD) |
kvo | 克林格成交量振荡器(KVO) |
obv | 能量潮(OBV) |
pvo | 成交量振荡百分比(PVO) |
vwap | 成交量加权均价(VWAP) |
用法示例
单指标:BTC 5m 的 EMA(20)
bash
curl -X POST -H "Authorization: Bearer mq_xxx" \
-H "Content-Type: application/json" \
-d '{
"exchange": "binance",
"market": "perp",
"symbol": "BTCUSDT",
"interval": "5m",
"limit": 100,
"calc": [{"name": "ema", "params": {"period": 20}}]
}' \
https://api.mobiusquant.ai/api/indicators多指标:RSI(14) + MACD + Bollinger
bash
curl -X POST -H "Authorization: Bearer mq_xxx" \
-H "Content-Type: application/json" \
-d '{
"exchange": "binance",
"market": "perp",
"symbol": "BTCUSDT",
"interval": "1h",
"limit": 200,
"calc": [
{"name": "rsi", "params": {"period": 14}},
{"name": "macd", "params": {"fast": 12, "slow": 26, "signal": 9}},
{"name": "bollinger", "params": {"period": 20, "stdev": 2}}
]
}' \
https://api.mobiusquant.ai/api/indicators同名指标多参数(用 id 区分)
json
{
"calc": [
{"id": "ema_fast", "name": "ema", "params": {"period": 12}},
{"id": "ema_slow", "name": "ema", "params": {"period": 26}}
]
}未指定 id 时,响应 key 由指标名和按字母排序的参数组成。同名不同参数可自动区分;同名同参数重复时必须用 id 消歧。
带绘图协议(给 chart 客户端用)
bash
curl -X POST -H "Authorization: Bearer mq_xxx" \
-H "Content-Type: application/json" \
-d '{
"exchange": "binance", "market": "perp", "symbol": "BTCUSDT",
"interval": "5m", "limit": 100,
"calc": [{"name": "supertrend"}, {"name": "rsi"}]
}' \
https://api.mobiusquant.ai/api/chart返回会带 items: [...],描述每个指标的面板归属(主图 main / 副图 sub)、值域、配色 role(primary / oversold / overbought / ...,由 chart 客户端按主题映射成具体颜色)。
配套接口
| Method | Path | 说明 |
|---|---|---|
| GET | /api/indicators/registry | 所有指标的参数 / 输出列签名(完整自描述) |
| GET | /api/indicators/catalog | 可绘图子集 + 配色/面板元信息 |
| POST | /api/indicators | 计算端点,返回 K 线 + 指标值 |
| POST | /api/chart | 同上,但带绘图协议(给 lightweight-charts 等) |
实时获取最新列表(包括我们后来增加的指标):
bash
curl -H "Authorization: Bearer mq_xxx" \
https://api.mobiusquant.ai/api/indicators/registry | jq '.indicators | keys[]'