Skip to content

支持的指标 ​

提供 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按指标提供的字段含义、信号规则及使用限制;不保证每个指标都有

类别分布 ​

类别数量用途
base1价格/成交量等基础列
momentum18动量类(MACD、RSI 家族、TSI…)
oscillator4振荡器(RSI、Fisher、RVI…)
trend15趋势线(EMA、SuperTrend、PSAR…)
trend_strength4趋势强度(ADX、Aroon、Vortex…)
volatility10波动率(ATR、Bollinger、Keltner…)
volume7量价(OBV、CMF、CVD、KVO、VWAP…)

注册表与目录的区别

  • /api/indicators/registry → 完整自描述(参数、输出列、类型),给程序消费
  • /api/indicators/catalog → 可绘图的子集 + 配色/面板元信息,给 chart 客户端用
  • /api/indicators → POST 计算端点,返回 K 线 + 指标值

完整列表 ​

base(1) ​

ID说明
priceOHLCV 价格/成交量基础列

momentum(18) ​

ID中文名
accelerator_oscillator加速振荡器
awesome_oscillator鳄鱼振荡器(AO)
cci顺势指标(CCI)
chande_mo钱德动量摆动指标
connors_rsiConnors RSI
coppock_curve科波克曲线
dpo去趋势价格振荡器
kst确知动量指标(KST)
macdMACD
momentum动量(MOM)
ppo价格振荡百分比(PPO)
roc变动率(ROC)
smi_ergodicSMI 遍历指标
stoch_rsi随机 RSI(StochRSI)
trixTRIX 三重指数平滑
tsi真实强弱指数(TSI)
ultimate_oscillator终极振荡器(UO)
williams_r威廉指标(%R)

oscillator(4) ​

ID中文名
fisher_transformFisher 变换
rci_ribbonRCI 排列指数带
rsi相对强弱指数(RSI)
rvi相对活力指数(RVI)

trend(15) ​

ID中文名
alligator比尔威廉姆斯鳄鱼线
alma阿尔诺移动平均(ALMA)
ema指数移动平均(EMA)
hma赫尔移动平均(HMA)
hmm_regimeHMM Mobius 双尺度方向(8 字段,含证据支持)
lsma最小二乘移动平均
mcginley_dynamic麦吉利动态指标
mobius_trendMobiusQuant 复合趋势线
parabolic_sar抛物线 SAR
pi_cycle_bottomPi Cycle Bottom
smc智能资金概念(SMC)
supertrendSuperTrend
tema三重指数移动平均(TEMA)
vwma成交量加权移动平均(VWMA)
williams_stops威廉止损线

trend_strength(4) ​

ID中文名
adx平均趋向指数(ADX)
aroon_oscillatorAroon 振荡器
choppiness_index震荡指数(CHOP)
vortex涡旋指标(Vortex)

volatility(10) ​

ID中文名
atr平均真实波幅(ATR)
bollinger布林带
chande_kroll_stopChande 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 客户端按主题映射成具体颜色)。


配套接口 ​

MethodPath说明
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[]'

AI 交易的基础设施平台