Aperiodic
指标
市场实时
文档价格
获取数据

指标库 · L1与L2订单簿

L1失衡

示例CSV
Binance BTC-USDT永续合约,5分钟K线,2025年5月1日至31日,取自免费预览。免费延迟数据源不含该数据集,付费套餐提供实时推送。
构建方法BTC, May 2025字段下载常见问题

最优报价处买单量与卖单量的对比,提供K线收盘值及K线内均值。

买卖失衡、比率与占比,均提供瞬时值(末值)及区间均值。

Built from
L1(最优报价)
字段
10
K线周期
1m to 1d; 15s and 30s on Prime
套餐
Prime
交易所
Binance, OKX, Hyperliquid
实时
付费套餐提供实时数据

构建方法

取自免费预览的一根真实5分钟K线,逐字段展示。

2025年5月14日14:00至14:05 UTC的5分钟K线,Binance BTC-USDT永续合约,数据来自免费预览。

  1. 步骤 1

    比较最优买价与卖价上的挂单量

    不平衡度=7.266 − 7.712 BTC=-0.446 BTC
    imbalance_ratio=(买价 − 卖价) / (买价 + 卖价)=-0.0298
    bid_percentage=买价 / (买价 + 卖价)=48.5%

    imbalance_ratio 的取值范围为−1(买价一侧无挂单)至1(卖价一侧无挂单)。在该K线收盘时,买卖双方几乎持平。

    最优卖价7.712 BTC$103,805.7
    最优买价7.266 BTC$103,805.6
  2. 步骤 2

    最新报价或K线均值

    imbalance_ratio_avg=K线周期内所有报价更新的均值=-0.1203

    最新报价值在K线之间跳动较大,而K线内各次更新的均值波动较小。每次更新只计一次,无论其持续多久。

    0.96-0.41
    13:0514:00
    imbalance_ratio,最新报价imbalance_ratio_avg
  3. 步骤 3

    无界比率

    bid_ask_ratio=买价 / 卖价,取最新报价=0.942
    bid_ask_ratio_avg=各次更新的买价 / 卖价均值=56.3

    均值为 56.3,尽管买方平均占 44.0% 的挂单量。少数几次更新中卖方几乎为空,使 bid / ask 变得极大,均值也随之被拉高。imbalance_ratio 的取值限定在−1与1之间,因此不存在这一问题。

  4. 步骤 4

    本根K线

    不平衡度
    -0.446 BTC
    imbalance_ratio
    -0.0298
    bid_percentage
    48.5%
    bid_ask_ratio
    0.942
    imbalance_avg
    -3.177 BTC
    imbalance_ratio_avg
    -0.1203
    bid_percentage_avg
    44.0%
    bid_ask_ratio_avg
    56.3

最优档失衡能否预测BTC的下一根K线?

BTC最优档失衡与当根K线涨跌的相关系数为0.38,与下一根K线的相关系数为0.002。

Binance BTC-USDT永续合约,5分钟K线,2025年5月1日至31日,取自免费预览。

同一K线内的平均价格变动
-6.71
-5.61
-4.54
-3.39
-0.664
1.45
3.71
4.83
5.65
6.50
12345678910

按盘口平均失衡度分组的K线,从卖单偏重到买单偏重. 个基点。

按平均失衡度对K线排序:卖单最偏重的十分之一平均下跌6.71 bps,买单最偏重的十分之一平均上涨6.50 bps。订单簿随行情同步倾斜。

对下一根K线而言,收盘时的取值表现优于均值(0.055对0.002),因为它是最新信息。但其噪声也更大:12%的K线中该值超出±0.9,即当时某一侧几乎为空。

解读方法

imbalance 为最优报价处买单量减去卖单量。 imbalance_ratio 将其缩放至-1(全为卖单)到1(全为买单)之间。 bid_percentage and ask_percentage 分别为买卖双方各自的占比。

成交最活跃的前 _avg 字段为区间内所有报价更新的均值,每次更新计一次。不带前缀的字段为最后一次报价。在报价频繁撤换时,两者差异最大。

bid_ask_ratio 在某一侧几乎为空时会变得极大。请改用缩放至±1的比率。

不平衡度
区间内最新最优买单数量减最优卖单数量
imbalance_ratio
最优买单与最优卖单数量的最新标准化差值
bid_ask_ratio
最新最优买单数量除以最优卖单数量
bid_percentage
最新盘口顶层数量中买方挂单所占比例
ask_percentage
最新盘口顶层数量中卖方挂单所占比例
imbalance_avg
区间内最优买单数量减最优卖单数量的平均值
imbalance_ratio_avg
区间内买卖数量标准化失衡的平均值
bid_ask_ratio_avg
区间内最优买单数量除以最优卖单数量的平均值
全部 10 个字段收起字段
bid_percentage_avg
盘口顶层数量中买方所占比例的平均值
ask_percentage_avg
盘口顶层数量中卖方所占比例的平均值

从零讲解,详见 从第一性原理理解市场(我们的互动课程):

  • 最优价位上的买卖失衡:课时 2, 价差从何而来 →
背后的研究收起研究内容

Order book imbalance is arguably the single most validated short-term predictive signal in the market microstructure literature. The intuition is immediate: if there's substantially more resting size on the bid than the ask, the next price move is more likely upward.

The Cont-Kukanov-Stoikov framework

Cont, Kukanov & Stoikov (2014) provided the definitive empirical analysis, showing that order book imbalance — defined as:

OBI=Qbid−QaskQbid+QaskOBI = \frac{Q_{bid} - Q_{ask}}{Q_{bid} + Q_{ask}}OBI=Qbid​+Qask​Qbid​−Qask​​

predicts the direction of the next mid-price change with statistically and economically significant accuracy across multiple equity markets. The signal is monotonic: stronger imbalance produces larger expected price moves, and the relationship is approximately linear.

Their insight was that the imbalance captures the queue dynamics of the limit order book: when one side has substantially more depth, the probability that the opposite side is depleted first (triggering a price change toward the deeper side) increases mechanically.

Instantaneous vs. time-averaged

A single snapshot of imbalance is noisy — market makers continuously refresh quotes, and a momentary asymmetry can be an artifact of staggered updates. Huang & Polak (2011) showed that time-averaged imbalance over longer windows provides a smoother, more predictive signal that captures the sustained directional tilt of the book rather than transient fluctuations.

We compute both:

  • Last imbalance — the snapshot at interval close
  • Average imbalance — the mean imbalance across all quote updates in the interval

The divergence between them — how much the closing snapshot differs from the average — itself carries information. A large divergence indicates recent quote instability, suggesting a potential regime change within the bar.

L1 vs. L2: depth matters

Top-of-book (L1) imbalance captures only the best bid and ask. But Cao, Chen & Griffin (2005) demonstrated that information about future price changes exists at deeper levels of the book. A thin top-of-book bid sitting in front of massive size at deeper levels is structurally different from a thin bid with nothing behind it.

We compute L2 imbalance at cumulative depth tiers: 5, 10, 20, and 25 price levels per side. This captures the full shape of supply-demand imbalance, not just the frontier.

The L1-L2 divergence is the most actionable signal. When L1 shows thin bids but L2 reveals deep bid-side support, the apparent weakness is a mirage — the top-of-book thinness is likely a market maker adjusting inventory, not a genuine absence of demand. Conversely, thick L1 bids with empty L2 behind them indicate a single concentrated quote — remove that one market maker and there's a price gap.


References:

  • Cont, R., Kukanov, A. & Stoikov, S. (2014). "The Price Impact of Order Book Events." Journal of Financial Econometrics, 12(1), 47–88.
  • Huang, R. & Polak, T. (2011). "Lobster: Limit Order Book Reconstruction System." Working Paper, Humboldt-Universität zu Berlin.
  • Cao, C., Chen, Z. & Griffin, J.M. (2005). "Informational Content of Option Volume Prior to Takeovers." Journal of Business, 78(3), 1073–1109.

下载同月数据

无需注册账户。运行一条命令,或交给您的智能体执行。
# Install the Aperiodic CLI into ~/.local/bin
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | INSTALL_DIR="$HOME/.local/bin" bash
export PATH="$HOME/.local/bin:$PATH"

# Free preview — no API key required
aperiodic l1_imbalance --preview \
  --exchange binance-futures \
  --symbol perpetual-BTC-USDT:USDT \
  --interval 5m \
  --timestamp exchange \
  --start-date 2025-05-01 \
  --end-date 2025-05-31 \
  --output-dir ./data && echo "Saved to $PWD/data"

所有交易所和永续合约,从1分钟到日线K线,均提供 Prime.

L1失衡 ,API文档中的说明:端点与参数 →

常见问题

相关内容

L2订单簿失衡买卖挂单量对比,5至25档深度L1价格最优买卖价、中间价与微观价格L1流动性买卖价差与盘口挂单金额
Aperiodic

基于数百TB原始数据构建,提炼为时点(point-in-time)指标,可直接以 parquet 文件获取。另附其背后的原始成交、报价及衍生品数据。

数据
  • 指标库
  • 订单流
  • L1 & L2
  • 衍生品
  • 原始数据
  • 数据目录
  • 免费数据
  • 价格
应用场景
  • 优化回测
  • 发掘新Alpha
  • 更优执行
指数
  • 全部指数
  • 订单流指数
  • Pressure Index
  • Conviction Index
  • 持仓结构指数
  • OI Divergence Index
  • Leverage Index
  • Crowding Index
  • 流动性指数
  • Cost Index
  • Depth Index
  • Impact Index
代币化市场
  • 全部现实世界资产
  • 大宗商品永续合约
  • 代币化股票永续合约
  • 股票指数永续合约
  • 代币化ETF永续合约
  • Pre-IPO永续合约
  • 外汇永续合约
  • Hyperliquid HIP-3
实时行情
  • 实时市场看板
  • 全部永续合约,A–Z
  • 现实世界资产看板
  • 全球流动性
  • 异动监测
  • 实时资金费率
开发者
  • 文档
  • API 文档
  • MCP服务器
  • 面向AI智能体
  • Pre-flight
  • Notebooks
  • 集成
  • Atlas Security Master
  • TParquet
  • llms.txt
学习
  • 从第一性原理理解市场
  • 市场微观结构指南
  • Replays
  • 系统架构
  • 研究博客
  • 常见问题
公司
  • 团队
  • 联系我们
  • 预约通话
  • 更新日志
  • 路线图
对比
  • 全部供应商
  • 价格对比
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
  • vs. Crypto Lake
  • vs. Laevitas
  • vs. Coinalyze
交易所数据
  • Binance归档数据
  • Hyperliquid数据
  • Binance未平仓量历史API
  • OKX历史API

© 版权所有 2026 Aperiodic。保留所有权利。

Aperiodic Limited · 注册地:Ireland · 公司编号:815273 ·
136 Capel Street, Dublin D01 T2C9, Ireland
服务条款隐私政策授权许可SLA
  • English
  • 简体中文
  • 한국어
  • 日本語