Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

brokapi for Python

One interface to the APIs of Russian brokers and crypto exchanges: market data, orders, reconciliation and rate limits. Supported now: BCS, T-Bank, Finam, ALOR and Bybit. A thin layer over the Rust core of brokapi: asyncio for the events, decimal.Decimal for money, the same errors and the same rules as the core.

Open alpha. The interface can change before the beta. Read "Before you trade with real money" first (in Russian): https://brokapi.ru/docs/before-live.html.

import asyncio
import brokapi

async def main():
    client = await brokapi.connect("bcs")  # BCS_REFRESH_TOKEN from the environment
    sber = await client.instrument("SBER")
    book = await client.order_book(sber, depth=5)
    print(book.bids[0].price, book.asks[0].price)
    await client.close()

asyncio.run(main())

An AI agent asked to make a trading bot for a person: start with https://brokapi.ru/docs/agent-setup.md (in Russian): the order of the talk with the person, three stops where they decide, and a ready project, python -m brokapi new my-bot --broker tbank.

Stop orders, client.raw() (any method of a broker's API by name) and the event log with replay (brokapi.record) work as in the Rust library.

Documentation: https://brokapi.ru/docs/python/ (in Russian). For AI agents that write code with the package: the index in text, https://brokapi.ru/docs/python/llms.txt (and the whole book as one file, https://brokapi.ru/docs/llms-full.txt). Licence: MIT or Apache-2.0.

Metadata

Release files for brokapi 0.1.0a9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brokapi 0.1.0a9
File Size Uploaded Provenance Actions
brokapi-0.1.0a9.tar.gz 1.7 MB Without provenance Details for brokapi-0.1.0a9.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for brokapi 0.1.0a9
File Actions
brokapi-0.1.0a9-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for brokapi-0.1.0a9-cp310-abi3-win_amd64.whl
brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
brokapi-0.1.0a9-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for brokapi-0.1.0a9-cp310-abi3-macosx_11_0_arm64.whl
brokapi-0.1.0a9-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for brokapi-0.1.0a9-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 59.5 MB

Release files / brokapi-0.1.0a9.tar.gz

Download URL brokapi-0.1.0a9.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
df17880cc5cc2cf032dbd889050eacc2b7d4fc00f4e8ccb398c5cd47722ed44a
BLAKE2b-256 checksum
How to use checksums
a3db427a06371730f5d1f05c439d7318b79714a974b614de3d8c45e6552a70ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / brokapi-0.1.0a9-cp310-abi3-win_amd64.whl

Download URL brokapi-0.1.0a9-cp310-abi3-win_amd64.whl
Size 13.1 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ca31500a304425cb7fd5839cce1d1d508a027d4f5a249bbf94f2f2b0fa44519a
BLAKE2b-256 checksum
How to use checksums
7eb29d9e6e97b77cb5a86084b74952567e0b9e747c363853fd63d532d2e96fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
04c14f92a0e8e28fd5449bb6653e1fd7e43453d0635433d626f9bbd6c9f2247f
BLAKE2b-256 checksum
How to use checksums
e31d0f6a10193dff3fc282ea8d540d7e7456b2c1b3bf57498c1a59497e2614fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL brokapi-0.1.0a9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 11.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
04968c7053b77429f23f67987bdddec4ee7a1d25d7f51dc4ed4b0cd660fa131c
BLAKE2b-256 checksum
How to use checksums
4262e99bc3f51330f0a3938087e8e4a2adc2c9e8fb7df2ee64e93d77db2ff45a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / brokapi-0.1.0a9-cp310-abi3-macosx_11_0_arm64.whl

Download URL brokapi-0.1.0a9-cp310-abi3-macosx_11_0_arm64.whl
Size 10.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5073e59c57e17591fd28ee707054ba0de777adf66228999d1bf5242a70b18f3b
BLAKE2b-256 checksum
How to use checksums
95076ad6953d77fd92c50a4699d9fd4eda0dc4663b737bb48ef29742ed8f4e85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / brokapi-0.1.0a9-cp310-abi3-macosx_10_12_x86_64.whl

Download URL brokapi-0.1.0a9-cp310-abi3-macosx_10_12_x86_64.whl
Size 11.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8e065d252668752b241051c17498d591a5f6395159ebcafd4b13b32e3d775095
BLAKE2b-256 checksum
How to use checksums
7e9013b61ed6bacbfac2bc82ec60a0c714f4f86957dd1a1b362bddadc75108ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for brokapi 0.1.0a9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page