# shinnytech/tqsdk-python

天勤量化开发包, 期货量化, 实时行情/历史数据/实盘交易

Repository: https://github.com/shinnytech/tqsdk-python
Canonical: https://ross.abutalabs.com/products/tqsdk-python
Homepage: https://doc.shinnytech.com/tqsdk/latest
Language: Python
License: Apache-2.0
License Family: permissive
Topics: futures, diff, python, program-trading, quant, tqsdk
Last push: 2026-08-18T01:54:26+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 3009, "days_push": 16, "days_rel": 16, "gap_med": 25, "n_releases_24m": 24}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4978, forks 776 (observed 2026-08-28T04:09:04.135581+00:00)

## What it is
TqSdk is an open-source Python SDK by Shinny Technology for building quantitative trading strategies for Chinese futures, options, and stocks. It provides real-time and historical market data, tick/kline backtesting, simulated and live trading, and technical indicators in a single library.

## Use cases
- get real-time futures quotes in python
- backtest a futures trading strategy tick by tick
- place live orders through a futures broker from python
- compute spread between two futures contracts and trade it
- fetch historical kline and tick data for chinese futures
- paper trade a strategy with a simulated account
- calculate technical indicators on kline series

## When to choose
- you trade Chinese futures, options, or stocks and want market data plus trading in one SDK
- you want tick-level backtesting and simulated trading without maintaining your own database
- you need CTP direct connection or support for most Chinese futures brokers

## When to avoid
- you trade crypto, forex, or non-Chinese markets
- you need a broker-agnostic framework outside Shinny's gateway ecosystem
- you require fully offline operation without a Kuaiqi account

## Facets
- artifact type: library
- maturity: active
- function: trading, sdk, data-science, streaming, http-client
- domain: fintech, data-science, developer-tools
- platform: python, windows, cross-platform
- tags: quant, futures, options, stocks, backtesting, live-trading, market-data, ctp, algorithmic-trading, tqsdk, quantitative-trading, linux, macos

## Member repositories
- shinnytech/tqsdk-python (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:04.135581+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-29T18:17:43.682158+00:00, confidence not recorded.
  - readme: https://github.com/shinnytech/tqsdk-python (fetched 2026-08-28T04:09:04.135581+00:00, sha 21b9f85524e6)
  - homepage: https://doc.shinnytech.com/tqsdk/latest (fetched 2026-08-29T08:59:06.855005+00:00, sha 8e108330389d)
  - site_page: https://doc.shinnytech.com/tqsdk/latest/quickstart.html (fetched 2026-08-29T08:59:06.863882+00:00, sha 6b2188969482)
- Data as of 2026-08-30T08:39:29.467469+00:00.
