# ctpbee/ctpbee

简单易用的期货实盘ctp交易框架

Repository: https://github.com/ctpbee/ctpbee
Canonical: https://ross.abutalabs.com/products/ctpbee
Language: Python
License: MIT
License Family: permissive
Topics: quant, ctp, microframework, ctpbee
Last push: 2026-08-24T08:53:42+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 33, longevity 100
- inputs: {"age_days": 2573, "days_push": 9, "days_rel": 232, "gap_med": 207.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1010, forks 238 (observed 2026-08-28T04:03:12.955779+00:00)

## What it is
ctpbee is a Python micro-framework for live and backtested futures trading via the CTP interface used by Chinese futures exchanges. It wraps the CTP trading API with a simplified high-level API for order placement, position tracking, tick/kline data, and backtesting.

## Use cases
- build a live futures trading bot on CTP
- backtest multi-timeframe multi-contract futures strategies
- subscribe to real-time tick data and generate klines
- place buy/sell open and close orders programmatically
- track position P&L for futures accounts
- extend a trading core with a plugin system

## When to choose
- you trade Chinese futures via CTP and want a lightweight Python framework
- you need both live trading and backtesting in one small core
- you find vnpy too heavy and want simpler installation and API

## When to avoid
- you need stock, crypto, or non-CTP markets
- you want a full GUI trading platform
- you need guaranteed production support or a large community

## Facets
- artifact type: framework
- maturity: active
- function: trading, sdk, plugin-system, cli
- domain: fintech, developer-tools
- platform: windows, python, cli
- tags: ctp, futures-trading, quant, microframework, backtesting, market-data, china-futures, quantitative-trading, automation, linux, macos

## Member repositories
- ctpbee/ctpbee (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:12.955779+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:56.311806+00:00, confidence not recorded.
  - readme: https://github.com/ctpbee/ctpbee (fetched 2026-08-28T04:03:12.955779+00:00, sha b9ae7efcda83)
  - registry_pypi: https://pypi.org/pypi/ctpbee/json (fetched 2026-08-29T13:11:52.164599+00:00, sha 545ffc68ecf1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
