$npx skillfedfor your agent

betfairlightweight

Lightweight python wrapper for Betfair API-NG

Worth itPyPI InternetReleased Mar 202674.0K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — betfairlightweight-2.23.2-py3-none-any.whl
v2.23.2 · released 2026-03-16 · Python >=3.9 · 1 runtime deps: requests

Yes. The package is actively maintained, has low install friction, carries no security vulnerabilities, and is licensed permissively. Install it if you need a programmatic Betfair client; the only real prerequisite is having valid Betfair credentials and understanding the API authentication model (app key, SSL certs, or interactive login).AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Betfair account credentials (username, password, app key) and SSL certificates for non-interactive login; interactive login available without certs but less secure.
  • Low friction install with a single runtime dependency (requests).
  • The project is actively maintained with recent commits and has been stable since 2016, tested on Python 3.9 through 3.14.

License · maintenance · safety

permissive license (permissive) — MIT License permits commercial and private use, modification, and distribution with minimal restrictions—standard permissive terms that impose no meaningful constraint on adoption.

last release 2026-03-16 (151 days) · last repo commit 2026-06-24 · 511 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 73,990 downloads/mo, #14,893 on PyPI

Verify before relying

pip install betfairlightweight

import betfairlightweight

trading = betfairlightweight.APIClient('username', 'password', app_key='app_key', certs='/certs')
trading.login()
event_types = trading.betting.list_event_types()
  • Whether C/Rust acceleration via the [speed] extra meaningfully improves latency for typical streaming or order-placement workloads.
  • Performance characteristics under high-frequency order updates or large market subscriptions.
  • Stability and completeness of support for all Betfair API endpoints across different market types and regions.
Same gist for agents: .md · .json

What it is and what it does

betfairlightweight is a client library that bridges Python code to the Betfair exchange API, handling authentication, market queries, order placement, and real-time streaming of market and order data. It wraps the Betfair API-NG endpoints and provides pythonic abstractions for betting operations (listing events, placing bets, managing orders) and account operations (checking balances, viewing statements). The library can optionally use C and Rust libraries for faster parsing and serialization when installed with the [speed] extra.

Typically used by traders and bots that need to connect to Betfair programmatically—either for one-off queries via the REST endpoints or for continuous market monitoring and order management via streaming listeners. It handles session management (login, keep-alive, logout), caches market and order state, and can push updates through a queue for asynchronous processing. Historical data can also be parsed and replayed using the same streaming infrastructure.

Use it for

  • Build a trading bot that subscribes to live market streams, processes price updates, and places orders based on custom logic.
  • Backtest a betting strategy by replaying historical market data through the same streaming listeners used for live trading.
  • Query account balances, statement history, and available funds programmatically for portfolio management or reporting.
  • Monitor in-play events and race status in real time to trigger conditional bets or risk management actions.
  • Aggregate market data across multiple event types or regions and export to CSV or a database for analysis.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries no security vulnerabilities, and is licensed permissively. Install it if you need a programmatic Betfair client; the only real prerequisite is having valid Betfair credentials and understanding the API authentication model (app key, SSL certs, or interactive login).

Install

betfairlightweight on PyPI

Before you install

Low friction install with a single runtime dependency (requests). The project is actively maintained with recent commits and has been stable since 2016, tested on Python 3.9 through 3.14.

Requires Betfair account credentials (username, password, app key) and SSL certificates for non-interactive login; interactive login available without certs but less secure.

License in practice

MIT License permits commercial and private use, modification, and distribution with minimal restrictions—standard permissive terms that impose no meaningful constraint on adoption.

Quickstart

pip install betfairlightweight

import betfairlightweight

trading = betfairlightweight.APIClient('username', 'password', app_key='app_key', certs='/certs')
trading.login()
event_types = trading.betting.list_event_types()

Verify before relying

  • Whether C/Rust acceleration via the [speed] extra meaningfully improves latency for typical streaming or order-placement workloads.
  • Performance characteristics under high-frequency order updates or large market subscriptions.
  • Stability and completeness of support for all Betfair API endpoints across different market types and regions.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
requests
MaintenanceActively maintained 151 days since the last release
Last repo commit
First released
Downloads73,990 / month, #14,893 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Evidence: betfairlightweight-2.23.2-py3-none-any.whl

Tags

Capabilities
betfair api wrapperbetting exchange clientmarket streaming pythonorder streaming betfairbetfair trading apiexchange stream listenerbetfair account management
Topics
betting-exchangestreaming-apitrading-bot

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “betfair api wrapper”

  • betfairlightweightA Python wrapper for the Betfair API-NG that handles betting…
  • twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
  • asyncprawAsync PRAW provides asynchronous access to Reddit's API, allowing you…

Give your agent the search over MCP, or paste the wish link into any chat.

More Internet packages

botocore Worth it
PyPI · Internet · released Aug 2026

Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.

Install it if you need programmatic access to AWS services.

permissive licensepure Python · 3.10+
1.5Bdownloads / mo
aiobotocore Worth it
PyPI · Internet · released Aug 2026

Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.

Install it if you need to call AWS services from async Python code; it is the standard way to do so.

Apache-2.0pure Python · 3.10+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
filelock Worth it
PyPI · Libraries · released Aug 2026

Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.

MITpure Python · 3.10+
717.1Mdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
googleapis-common-protos Worth it
PyPI · Internet · released Aug 2026

Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.

Apache-2.0pure Python · 3.10+
513.7Mdownloads / mo

See also nautilus_trader · schwab-py · pycoingecko · simplefix · ccxt · tradingview-ta · forex-python · alpaca-trade-api · backtesting · twython