# openctp/openctp

openctp提供CTP股票期权、中泰证券XTP、华鑫证券奇点TORA、东方证券OST、东方财富证券EMT、盈透证券TWS、易盛TAP、量投QDP等各通道的CTPAPI兼容接口，CTP程序可以无缝对接各股票柜台。openctp也提供了一套基于TTS交易系统的模拟环境，同样提供了CTPAPI兼容接口，不仅支持国内期货与期权全品种，也支持A股股票、基金、债券以及股票期权模拟交易，可以替代Simnow，为CTP量化交易开发者提供7x24可用的模拟环境。

Repository: https://github.com/openctp/openctp
Canonical: https://ross.abutalabs.com/products/openctp
Homepage: http://www.openctp.cn
Language: C
License: BSD-3-Clause
License Family: permissive
Topics: ctp, futures, quant, simnow, trader, xtp, stock, options, tts, ctpapi, tora
Last push: 2026-07-29T18:23:14+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 1853, "days_push": 35, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2910, forks 593 (observed 2026-08-28T04:07:29.221977+00:00)

## What it is
openctp is a CTPAPI-compatible interface layer and trading platform ecosystem for Chinese futures and securities markets. It wraps broker counter APIs (XTP, TORA, EMT, OST, TAP, QDP, TWS, etc.) behind the standard CTPAPI so CTP programs can switch counters by replacing two DLLs, and provides a 7x24 TTS-based simulated trading environment as a SimNow replacement.

## Use cases
- connect a CTP-based trading program to XTP, TORA, EMT or other broker counters without code changes
- get a 7x24 available simulated trading environment to replace SimNow
- paper trade Chinese futures, options, A-shares, funds and bonds via CTPAPI
- use CTPAPI bindings from Python, Java, Go, Rust or C# for quant development
- query market reference data for futures and options via a RESTful data center
- test trading strategies against a simulation environment before live deployment

## When to choose
- you develop CTP quant trading tools for Chinese futures or stock markets and need counter portability
- you need a reliable 24/7 mock trading backend for developing or validating CTPAPI programs
- you want CTPAPI bindings in a language other than C++

## When to avoid
- you trade non-Chinese markets or need FIX/REST APIs unrelated to CTP
- you need a full production brokerage system rather than client-side API adapters and simulation
- you require guaranteed official vendor support for broker counter interfaces

## Facets
- artifact type: library
- maturity: active
- function: sdk, trading, api-framework, developer-tools
- domain: fintech, apis, developer-tools
- platform: windows, cpp, python, go, rust, jvm, dotnet
- tags: ctp, ctpapi, futures-trading, simnow, tts, quant-trading, brokerage-apis, simulated-trading, chinese-markets, command-line, linux

## Member repositories
- openctp/openctp (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:29.221977+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:34:20.844770+00:00, confidence not recorded.
  - readme: https://github.com/openctp/openctp (fetched 2026-08-28T04:07:29.221977+00:00, sha 37f6bee26b73)
  - homepage: http://www.openctp.cn (fetched 2026-08-29T09:49:33.216515+00:00, sha 5befde856e43)
- Data as of 2026-08-30T08:39:29.467469+00:00.
