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

指标库 · 订单流

成交连续段结构

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

同向成交连续段能持续多久,成交方向多久翻转一次。

同向连续成交的游程长度、游程失衡度、方向翻转率,以及方向翻转时的价格变动。

Built from
成交
字段
7
K线周期
1m to 1d; 15s and 30s on Prime
套餐
Pro
交易所
Binance, OKX, Hyperliquid
实时
付费套餐提供实时数据

构建方法

一分钟的真实成交,逐字段展示。每个数值均与我们数据管道的输出一致。

2025年6月11日14:38至14:39(UTC)Binance BTC-USDT永续合约的全部11,692笔成交,数据取自免费的原始成交预览。

  1. 步骤 1

    将成交划分为同向连续段

    游程(run)指吃单方向相同的连续成交序列。该分钟共有 1,200 个游程,其中 600 个为吃单卖出, 600 个为吃单买入。

    正在加载11,692笔成交
  2. 步骤 2

    统计游程

    sell_run_max_len=最长连续卖出=339
    buy_run_max_len=最长连续买入=124
    sell_run_mean_len=平均连续卖出长度=13.52
    buy_run_mean_len=平均连续买入长度=5.97

    最长一轮为连续 339 笔吃单方卖出,始于 14:38:19.1。价格变动 -1.36 bps ,自首笔成交计至末笔成交。

    正在加载11,692笔成交
  3. 步骤 3

    方向翻转率与不平衡度

    flip_rate=1,199次换向 / 11,692笔成交=10.3%
    run_imbalance=(买入最大值 − 卖出最大值) / (买入最大值 + 卖出最大值)=-0.464
    price_change_on_flip=方向翻转时的平均 |收益率|=0.108 bps
  4. 步骤 4

    本根K线

    buy_run_max_len
    124
    sell_run_max_len
    339
    buy_run_mean_len
    5.97
    sell_run_mean_len
    13.52
    run_imbalance
    -0.464
    flip_rate
    0.1025
    price_change_on_flip
    1.08e-5

单边成交主导的K线,BTC价格走得更远吗?

成交方向极少翻转的BTC K线,价格变动幅度是频繁翻转K线的2.8×。

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

同一K线内价格变动幅度中位数
8.37
7.82
7.35
7.36
6.00
6.00
5.74
5.22
4.00
3.02
12345678910

按换向率对K线分组,从换向最少到最多. 个基点。

按换向率排序,换向最少的10%K线价格变动中位数为8.37 bps,换向最多的10%为3.02 bps。在全部K线中,换向率与价格变动幅度的相关系数为-0.27。K线换向率的中位数为10.9%。

典型K线内最长的连续段为同方向连续342笔成交,5月全月最长的连续段达5,482笔。

解读方法

连续段指同一方向上连续发生的一串成交。 buy_run_max_len and sell_run_max_len 为K线内最长的连续段, _mean_len 字段则为其平均值。

flip_rate 为方向与前一笔相反的成交占比。接近1时,买卖交替出现;数值较低则说明某一方在持续成交。

run_imbalance 对比买方与卖方连续段,取值范围为-1至1。 price_change_on_flip 为方向切换时的平均价格变动。

buy_run_max_len
买方成交连续出现的最长笔数
sell_run_max_len
卖方成交连续出现的最长笔数
buy_run_mean_len
买方连续成交游程的平均长度
sell_run_mean_len
卖方连续成交游程的平均长度
run_imbalance
最长买方游程与最长卖方游程之差的归一化值
flip_rate
成交方向与前一笔相反的成交笔数占比
price_change_on_flip
成交方向翻转时的平均绝对价格变动

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

  • 成交游程失衡度:课时 3, 谁在推动价格 →
背后的研究收起研究内容

Here's a microstructure concept that rarely gets discussed outside market-making desks: trade runs — consecutive sequences of same-direction trades. Their statistical properties reveal the hidden structure of order flow in ways that aggregate volume metrics completely miss.

The theoretical basis

Lillo & Farmer (2004) made a striking empirical discovery: order flow in equity markets exhibits long-range autocorrelation, with a Hurst exponent significantly above 0.5. Buys tend to follow buys, and sells follow sells, at horizons far longer than can be explained by individual order splitting. They attributed this to the herding behavior of institutional investors and the mechanical persistence of algorithmic execution.

Earlier, Hasbrouck (1991) showed that the autocorrelation structure of trade signs (buy/sell sequences) carries information about the permanent price impact of trades. Trades that cluster into runs tend to have higher permanent impact than isolated trades — because runs are the signature of informed order flow that the market hasn't yet fully absorbed.

Bouchaud et al. (2004) formalized this in their propagator model, showing that the long memory of order flow, combined with a power-law decay in individual trade impact, produces a market that is approximately efficient despite highly predictable order flow.

What we measure

  • Maximum run length (buy/sell separately) — the longest uninterrupted same-direction streak. Long runs signal sustained directional pressure — either a large order executing incrementally or multiple participants leaning the same way.
  • Mean run length — average persistence before a direction flip. Higher means more serial correlation in the tape.
  • Run imbalance ratio — (max_buy_run − max_sell_run) / (max_buy_run + max_sell_run). Captures asymmetry in directional persistence.
  • Flip rate — fraction of trades that change direction. High flip rate = choppy, mean-reverting tape. Low flip rate = persistent flow.
  • Price change on direction flip — how much price moves when a run ends. Large price changes on flips indicate that runs represent genuine information being incorporated; small changes suggest noise.

Practical implications

The flip rate is directly related to the Roll (1984) model of the bid-ask bounce: in a pure noise-trading world with constant spreads, every trade should alternate between bid and ask, producing a flip rate near 1.0 and negative first-order return autocorrelation exactly equal to the squared half-spread. Deviations from this benchmark — particularly low flip rates — indicate that something beyond the mechanical bid-ask bounce is driving the tape.

Run imbalance is particularly powerful: if buy runs average 8 trades but sell runs average 3, buyers are sustaining pressure longer. This asymmetry often precedes continued price movement — it's the microstructure expression of the order flow autocorrelation that Lillo & Farmer documented at daily horizons, compressed into intrabar timescales.


References:

  • Lillo, F. & Farmer, J.D. (2004). "The Long Memory of the Efficient Market." Studies in Nonlinear Dynamics & Econometrics, 8(3).
  • Hasbrouck, J. (1991). "Measuring the Information Content of Stock Trades." Journal of Finance, 46(1), 179–207.
  • Bouchaud, J.-P., Gefen, Y., Potters, M. & Wyart, M. (2004). "Fluctuations and Response in Financial Markets: The Subtle Nature of 'Random' Price Changes." Quantitative Finance, 4(2), 176–190.
  • Roll, R. (1984). "A Simple Implicit Measure of the Effective Bid–Ask Spread in an Efficient Market." Journal of Finance, 39(4), 1127–1139.

下载同月数据

无需注册账户。运行一条命令,或交给您的智能体执行。
# 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 run_structure --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线,均提供 Pro.

成交连续段结构 ,API文档中的说明:端点与参数 →

常见问题

相关内容

订单流吃单方买入与卖出对比:按规模细分,含毒性指标升价 / 跌价成交推高、压低或未改变价格的成交冲击Kyle's lambda、Amihud与交易规模的成本
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
  • 简体中文
  • 한국어
  • 日本語