qmetrics.net

TqSdk Python

Python SDK for futures and options trading

TqSdk Python screenshot

TqSdk is an open Python library from ShinnyTech for futures, options, and stock strategies with live quotes, backtests, and broker connectivity.

Overview

TqSdk packages market data, backtesting, simulation, and trading workflows for Chinese futures and related markets into one Python API. Strategies connect through the Diff protocol to quote gateways and broker relays maintained by ShinnyTech's infrastructure, covering historical ticks, K-lines, and live trading.

The library advertises support for many domestic futures brokers, CTP direct connections, asset-manager gateways, simulation, and tick- or bar-level backtests. Hundreds of indicator functions and tight pandas and numpy integration are included so researchers can analyze series in memory without operating their own databases.

Documentation walks new users through a ten-minute quick start, account handling, order management, target positions, and advanced topics. Recent material also describes official AI skill packs that help coding assistants write TqSdk programs against the reference docs.

TqSdk requires Python 3.9 or newer and installs through pip. It is aimed at individual quants and teams building automated trading or research tools rather than at providing a hosted website UI by itself.

Key features

  • Unified market data and trading API
  • Historical tick and K-line datasets
  • Backtest and simulation modes
  • Multiple China futures broker routes
  • In-memory data without local DB setup
  • Large indicator function library
  • pandas and numpy friendly workflows
  • Documented AI skill pack integration

Use cases

  • Futures and options strategy research
  • Automated trading on supported brokers
  • Tick-level historical backtests
  • Teaching quantitative trading in Python

Tags

Similar software

CCXT

Multi-language unified cryptocurrency exchange API

CCXT connects applications to many cryptocurrency and prediction-market exchanges through one normalized API. It ships for JavaScript, Python, PHP, Go, C#, Java, and Rust.

  • 100+ exchange integrations
  • Unified REST and WebSocket API
  • Public and private endpoints
PythonDetails →
★ 45.1k⟳ todayMIT

yfinance

Python access to Yahoo Finance market data

yfinance wraps Yahoo Finance public APIs so Python code can pull quotes, history, fundamentals, options, and related market metadata. It is unofficial and meant for research and education.

  • Single and multi-ticker objects
  • Historical price download helper
  • Fundamentals and calendar fields
PythonDetails →
★ 26.1k⟳ 6 days agoApache-2.0

AKShare

Python interface library for China financial market data

AKShare is a Python package that fetches stocks, futures, funds, bonds, FX, and macroeconomic series from many public sources. Results come back as pandas DataFrames with Chinese column names.

  • Nearly 1000 finance and macro data endpoints
  • pandas DataFrame output with Chinese headers
  • Offline keyword search across interface catalog
PythonDetails →
★ 23.6k⟳ todayMIT

TA Lib Python

Python bindings for TA-Lib technical analysis indicators

ta-lib-python wraps the TA-Lib C library with Cython and NumPy for technical analysis on financial price series. It exposes function, abstract, and streaming APIs with optional Pandas and Polars inputs.

  • 200+ technical indicators
  • Function, abstract, streaming APIs
  • NumPy, Pandas, Polars inputs
CythonDetails →
★ 12.5k⟳ 6 days agoBSD-2-Clause

PyPortfolioOpt

Portfolio optimization methods in Python

PyPortfolioOpt implements mean-variance optimization, Black-Litterman allocation, hierarchical risk parity, and related portfolio methods with scikit-learn-style APIs.

  • Mean-variance optimization
  • Black-Litterman allocation
  • Hierarchical risk parity
Jupyter NotebookDetails →
★ 6.2k⟳ 4 months agoMIT

GoPay

Go SDK for WeChat Alipay and other payment APIs

GoPay wraps many Chinese and international payment providers in one Go module. Separate packages cover WeChat, Alipay, Douyin, PayPal, Apple verification, and others.

  • Multi-provider payment clients
  • WeChat and Alipay v3
  • PayPal and Apple verify
GoDetails →
★ 5.8k⟳ 3 months agoApache-2.0