Market data. Trade execution. One Python client.
An asynchronous Python interface for Bynix, built for trading applications, data pipelines and developer tools.
🚀 Capability categories
- 🛡️ Free/open core — MIT-licensed public package; public market data works without an account, with optional browser, network, and DataFrame extras.
- ⚡ Fast market data — Stream-first ticks, forming/closed candles, bounded historical pages, and concurrent candle batches with REST fallback.
- 🔑 Multi-login and client pool — Token, password, browser, and OTP-capable providers plus independent named clients and account events.
- 🤖 Safe caller-owned automation — ExecutionOrchestrator/AutoExecutor accepts explicit application intents with dry-run, demo-only defaults, cooldown, concurrency limits, and no uncertain-order retry.
- 📊 Pure indicators — Decimal SMA, EMA, RSI, MACD, Bollinger Bands, ATR, and stochastic measurements over caller-owned data; no signals or strategy.
- 🎯 Execution conveniences —
buy_and_wait,sell/early close, settlement wait, journaling, and reconciliation around explicit one-order-at-a-time calls. - 🔍 Verified Bynix scope — Read the matrix for implemented, offline-tested, and live-demo-observed behavior; unsupported parity is not implied.
See the full verified scope in the feature and fallback matrix.
🛠️ Features
| API | Features |
|---|---|
connect · PasswordAuth · BrowserAuth |
Session tokens, password login, browser-assisted login and 2FA callbacks. |
get_assets · get_asset · get_payouts |
Asset discovery, exact symbol lookup, availability and payout information. |
get_candles · get_historical_candles · get_candles_batch |
Recent candles and paginated historical OHLCV with UTC timestamps. |
subscribe_ticks · stream_candles · get_tick |
Live ticks, forming/closed candles and automatic REST polling fallback. |
place_order · wait_order_result · close_trade_early · ExecutionOrchestrator |
Explicit demo, real and funded orders, settlement lookup and early close. |
SQLiteJournal · reconcile_order · unresolved_orders |
Durable order records, restart recovery and duplicate-reference protection. |
ClientPool · account_events · get_balance_breakdown |
Independent named clients, account events and detailed balances. |
proxy · dns_servers · connect_any |
HTTP/SOCKS5 proxies, custom DNS and trusted-domain connection fallback. |
get_realtime_sentiment · stream_sentiment |
Streaming market sentiment using the platform-style candle and tick model. |
export_candles · candles_to_dataframe · resample_candles · sma · ema · rsi · macd · bollinger_bands · atr · stochastic |
Decimal-preserving CSV/JSON export, optional pandas and candle resampling. |
📦 Installation
Install the published package from PyPI. Add optional browser, networking and DataFrame integrations as needed.
python -m pip install pybynix
python -m pip install "pybynix[browser,network,dataframe]"
python -m playwright install chromium
⚡ Stream your first market
Public market data works without an account. This complete example retrieves candles and reads three incoming ticks.
import asyncio
from pybynix import Bynix
async def main():
async with Bynix.public() as client:
candles = await client.get_candles("EUR/USD OTC", interval="1m", count=100)
print(candles[-1])
async with await client.subscribe_ticks("EUR/USD OTC") as ticks:
for _ in range(3):
tick = await anext(ticks)
print(tick.timestamp, tick.price)
asyncio.run(main())
🔐 Authentication and sessions
Use the interactive login command, import an existing Bynix access token, or configure a password/browser provider. Login stores a local session; Python applications can also supply their own session provider. Use the client in an async context manager.
pybynix login
pybynix doctor
pybynix balances
import asyncio
import os
from pybynix import Bynix, PasswordAuth, SQLiteJournal
async def main():
async with Bynix(
provider=PasswordAuth(os.environ["BYNIX_EMAIL"], os.environ["BYNIX_PASSWORD"]),
journal=SQLiteJournal("orders.sqlite"),
) as client:
print(await client.get_balance())
asyncio.run(main())
🎯 Order execution
With a connected authenticated client, place an explicit demo order and await the server result. Demo is the default account. Real or funded execution requires allow_real_trading=True; funded orders also require challenge_id. Keep order IDs and use SQLiteJournal for restart recovery.
async def execute_demo_order(client):
order = await client.place_order("EUR/USD OTC", "call", "1.00", 5)
result = await client.wait_order_result(order["trade_id"], timeout=90)
return result
🌐 Connections and recovery
Persistent connections, resubscription and bounded queues support continuous consumers. Auto mode uses the platform's REST tick endpoint when streaming is unavailable. Network extras enable authenticated SOCKS5 and custom DNS. Configure the same route on your authentication provider.
client = Bynix.from_token(token, proxy="socks5://user:password@proxy-host:1080")
# HTTP CONNECT: proxy="http://proxy-host:8080"
# Custom DNS: Bynix.from_token(token, dns_servers=["1.1.1.1"])
# Data fallback: Bynix.public(stream_transport="auto")
💻 Command-line tools
Inspect the platform, stream prices, export candles and check published domains from the terminal. The CLI supplies public data directly and uses a saved session for account commands.
pybynix stream --symbol "EUR/USD OTC" --interval 15s --count 5
pybynix candles --symbol "EUR/USD OTC" --count 100 --output candles.csv
pybynix sentiment --symbol "EUR/USD OTC"
pybynix domains
📚 Documentation
Detailed signatures, return values, runnable examples and recovery behavior are documented below. Use exact trade_symbol values from the asset catalog.
- API reference
- Authentication
- Examples
- Recovery and networking
- Automation boundary
- Feature and fallback matrix
- Launch checklist
- Repository map
- Troubleshooting
🧪 Testing and performance
The validation record lists tested Python versions, asset/timeframe coverage, demo execution, interrupted connections and measured performance. Reproducible tests and benchmark inputs accompany the source. Validation · Benchmarks
🔬 Research
The architecture, protocol adaptation, and empirical evaluation of PyBynix are documented in our research paper. It covers asynchronous stream recovery, safe order lifecycle handling, and benchmark observations.
🤝 Community and license
Contributions, reproducible bug reports and documentation improvements are welcome. PyBynix is independently maintained; platform and language trademarks remain with their owners. Contributing · Security · MIT
C. M. Jubayer Hossain Bappy · PyBynix
Metadata
Release files for pybynix 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pybynix-1.0.0.tar.gz | 1.6 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybynix-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.7 MB
Release files / pybynix-1.0.0.tar.gz
| Download URL | pybynix-1.0.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24d6f5b8e850f0f7be341a43eaa383dbebb3117c8e22d8fd044a0a95eed6b95d
|
|
BLAKE2b-256 checksum How to use checksums |
e0ee67acd7f1f941484664ab79d2fe6bbbb2ae1151f65c4e5430e21f0a1a6d1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / pybynix-1.0.0-py3-none-any.whl
| Download URL | pybynix-1.0.0-py3-none-any.whl |
|---|---|
| Size | 44.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0ddf4a70d373f0b993210568cc0dca5a6a916df3560f89c1952d174cde5c96b
|
|
BLAKE2b-256 checksum How to use checksums |
75ec41747c8c60dbda51ee740bad7681e3e53e53dcaba87e8313ae4b1bea7161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for pybynix 1.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pybynix-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA 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.