ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified finance Safety 3/5

bybit-orderbook-backtester

Download, process, and backtest ByBit derivatives historical order book data. Use this skill when the user wants to: (1) download historical order book snapshots from ByBit's derivatives history-data page using Selenium automation, (2) process/unzip ob500 JSONL files and filter to depth 50, (3) run any of 10 order-book-based trading strategies (Order Book Imbalance, Breakout, False Breakout, Scalping, Momentum, Reversal, Spoofing Detection, Optimal Execution, Market Making, Latency Arbitrage) against the data, or (4) generate full backtest performance reports with PnL, Sharpe ratio, win rate, max drawdown, and strategy comparison. Triggers on: "bybit order book", "order book backtest", "download bybit data", "ob500", "order book imbalance", "spoofing detection strategy", "market making backtest", "crypto order book", "depth of book backtest", "bybit historical data".

Why use this skill?

Download, process, and backtest ByBit derivatives order book data with ease. Analyze 10+ trading strategies and generate detailed performance reports.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/davidm413/bybit-order-book
Or

What This Skill Does

The ByBit Order Book Backtester is a comprehensive, end-to-end quantitative research pipeline designed for traders and developers. It allows users to download, process, and analyze high-frequency historical order book data (ob500) from ByBit. The tool automates the retrieval of raw snapshot ZIP files using headless Selenium, cleans and parses the JSONL data into optimized Parquet formats, and executes sophisticated trading strategies. With built-in support for 10 distinct strategies, including market making, spoofing detection, and order book imbalance, the skill provides actionable performance reports covering critical metrics such as Sharpe ratio, maximum drawdown, win rate, and cumulative PnL.

Installation

To install the skill, use the ClawHub CLI command:

clawhub install openclaw/skills/skills/davidm413/bybit-order-book

Ensure you have the necessary system dependencies installed:

pip install undetected-chromedriver selenium pandas numpy pyarrow

Chrome or Chromium must be available on your system path for the Selenium automation component to function correctly.

Use Cases

  1. Strategy Development: Quickly prototype and validate order book-based algorithms against real-world liquidity conditions.
  2. Performance Benchmarking: Compare multiple strategies side-by-side using standardized performance reports.
  3. Data Analysis: Convert raw, bulky JSONL data into lightweight, analytical Parquet files for use in custom machine learning pipelines.
  4. Market Microstructure Research: Detect anomalous patterns like spoofing or latency arbitrage opportunities using historical high-frequency snapshots.

Example Prompts

  1. "Download ByBit order book data for BTCUSDT for the month of July 2024 and process it to depth 50."
  2. "Run the market making and imbalance strategies against the BTCUSDT processed data and generate a performance comparison report."
  3. "Backtest the spoofing detection strategy on the existing ETHUSDT dataset and limit the run to the first 50,000 rows for a quick check."

Tips & Limitations

  • Data Volume: Raw historical data is massive. Always use the --sample-interval 1s flag during processing to convert millions of snapshots into manageable files without losing critical predictive value.
  • Selenium Reliability: ByBit may occasionally update their frontend or use aggressive Cloudflare protection. If the automatic download fails, you can bypass the bottleneck by manually downloading the ZIP files from the ByBit History Data page and placing them directly into ./data/raw/.
  • Storage: Ensure you have sufficient disk space. A single month of high-frequency data can occupy several gigabytes depending on the symbol's volatility and trade frequency.

Metadata

Author@davidm413
Stars2387
Views2
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-davidm413-bybit-order-book": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#crypto#backtesting#finance#trading#data-science
Safety Score: 3/5

Flags: network-access, file-write, file-read, code-execution