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. Checked against the imitations of the brokers, not yet on live accounts. The interface can change before the beta.

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/. Licence: MIT or Apache-2.0.

Metadata

Release files for brokapi 0.1.0a3

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

Built distributions (wheels)

Table of built distributions (wheels) for brokapi 0.1.0a3
File
brokapi-0.1.0a3-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
brokapi-0.1.0a3-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.0a3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
brokapi-0.1.0a3-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
brokapi-0.1.0a3-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 44.1 MB

Release files / brokapi-0.1.0a3.tar.gz

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

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

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

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

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

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

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

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

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

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

Download URL brokapi-0.1.0a3-cp310-abi3-macosx_10_12_x86_64.whl
Size 8.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
59f56f5c6160cde4fa604a45a46ff24b70a884cc2d83d9031502e7bebb40dd1e
BLAKE2b-256 checksum
How to use checksums
36dda3574a8f2c2bb01944cf453958ba56352d7540b3054ce0813818996a1820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for brokapi 0.1.0a3

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.

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