# ranaroussi/qtpylib

QTPyLib, Pythonic Algorithmic Trading

Repository: https://github.com/ranaroussi/qtpylib
Canonical: https://ross.abutalabs.com/products/qtpylib
Homepage: http://qtpylib.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: algotrading, quantitative-finance, interactivebrokers, backtester, algo-trading, interactive-brokers, algorithmic-trading
Archived: true
Last push: 2021-09-22T05:54:46+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3667, "days_push": 1806, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2267, forks 517 (observed 2026-08-28T04:06:32.792925+00:00)

## What it is
QTPyLib is an event-driven algorithmic trading library in Python supporting backtesting, paper, and live trading via Interactive Brokers. It captures tick/bar/trade market data into MySQL and uses ZeroMQ pub/sub to connect a central blotter with multiple running algos.

## Use cases
- backtest trading strategies in python
- live trade with interactive brokers api
- capture and store tick and bar market data
- build event-driven algo trading bots
- compute technical indicators in strategies
- run multiple algos sharing one market data feed

## When to choose
- you trade through Interactive Brokers and want a Pythonic strategy framework
- you need integrated backtesting plus live/paper trading in one library
- you want market data persisted to a database for later analysis

## When to avoid
- you need crypto or forex broker integrations beyond Interactive Brokers
- you require actively maintained software - the latest release is from 2021
- you want a GUI-based trading platform rather than a code library

## Facets
- artifact type: library
- maturity: maintenance
- function: trading, streaming, database, message-queue
- domain: fintech
- platform: python, windows
- tags: algo-trading, interactive-brokers, backtester, event-driven, zeromq, talib, market-data, backtesting, algorithmic-trading, quantitative-finance, data-engineering, linux, macos

## Member repositories
- ranaroussi/qtpylib (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:32.792925+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-30T02:42:21.507716+00:00, confidence not recorded.
  - readme: https://github.com/ranaroussi/qtpylib (fetched 2026-08-28T04:06:32.792925+00:00, sha d6ec6d6decf3)
  - homepage: http://qtpylib.io (fetched 2026-08-29T10:22:33.050950+00:00, sha 26b5b1874ac5)
  - registry_pypi: https://pypi.org/pypi/qtpylib/json (fetched 2026-08-29T10:22:33.060319+00:00, sha ee9e7056999f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
