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 (BCS, T-Bank, Finam, ALOR): market data, orders, reconciliation and rate limits. 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())

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.0a5

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.0a5
File Size Uploaded Provenance
brokapi-0.1.0a5.tar.gz 1.6 MB Without provenance Details

Built distributions (wheels)

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

Total release size: 58.4 MB

Release files / brokapi-0.1.0a5.tar.gz

Download URL brokapi-0.1.0a5.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
1a259360316d163fb276e9dac8a94b54f9df934006e7ccf22f2b16acd32b35bd
BLAKE2b-256 checksum
How to use checksums
3afa81f01463bb4e9d76f2720682c9b06056c332c4c8dadd6f6655daa5f490d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL brokapi-0.1.0a5-cp310-abi3-win_amd64.whl
Size 12.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8b189b4c7507576cd45b34f4136a8d6368d4e6bf66450f226ea228d61026597a
BLAKE2b-256 checksum
How to use checksums
1356a3b328e263f55df8cdc316e20a799c542ad9b09923dd70108c80e7657d62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL brokapi-0.1.0a5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 10.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
218c80ac09d648737c2d759e91c4dc655b133175e0670519e037bf33fa2354d4
BLAKE2b-256 checksum
How to use checksums
554e831ab9e757353ca44d61f80e7e66516d82d4b276d6ee395fa2e617b1ef12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL brokapi-0.1.0a5-cp310-abi3-macosx_11_0_arm64.whl
Size 10.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5c25a296240c94eedd2edcd963f82c89b83bef717fd53eb89574020dac48db21
BLAKE2b-256 checksum
How to use checksums
a368d33937ae776006866ffb3b18f9e8a152deb447faaadc016df57d6cbda841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL brokapi-0.1.0a5-cp310-abi3-macosx_10_12_x86_64.whl
Size 11.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
94717ea3f93f6cb02ff3e83d65dca6d47ba17c69f59883dd087c94d39609de6f
BLAKE2b-256 checksum
How to use checksums
459738a2dd6f77b577078fe63a5ec06105d8e4b888e919a08ad299ccf946ddc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for brokapi 0.1.0a5

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