DEV Community

Cover image for Stream Quotex Candlesticks & Live Market Data with Python: Announcing alltradingapi on PyPI
All Trading Api
All Trading Api

Posted on

Stream Quotex Candlesticks & Live Market Data with Python: Announcing alltradingapi on PyPI

Algorithmic traders and quant developers building custom indicator engines, Discord signal channels, or automated trading bots for Quotex often hit a major obstacle: Quotex publishes no official developer API.

Until now, the only workarounds were running resource-heavy headless browsers or maintaining fragile WebSocket connections that frequently broke.

Today, we are proud to announce the official release of alltradingapi on PyPI — the independent, zero-dependency Python client for the All Trading API market data gateway.


📦 Installation

pip install alltradingapi
Enter fullscreen mode Exit fullscreen mode

PyPI: https://pypi.org/project/alltradingapi/


⚡ What You Can Build

  1. Automated Trading Bots: Ingest real-time OHLCV candles to trigger high-speed strategy alerts.
  2. Backtesting Engines: Download hours of 1-minute historical candlestick data for OTC and currency pairs.
  3. Payout Monitors: Track live payout percentages across 30+ assets to only trade when yields are optimal.

🛠️ Code Example: Fetching 1-Minute OTC Candles

from alltradingapi import Client

# Authenticate via key or environment variable ATA_API_KEY
with Client(key="ap_your_key") as ata:
    # Query candles
    candles = ata.candles(
        asset="EURUSD_otc",
        hours=2,
        timeframe="1m"
    )

    print(f"Retrieved {len(candles)} candles.")
    latest = candles[-1]
    print(f"Timestamp: {latest.time} | Open: {latest.open} | Close: {latest.close}")
Enter fullscreen mode Exit fullscreen mode

Output:

Retrieved 120 candles.
Timestamp: 1794079860 | Open: 1.15852 | Close: 1.15873
Enter fullscreen mode Exit fullscreen mode

🚀 Asynchronous Support (AsyncIO)

For high-concurrency environments, alltradingapi provides a native AsyncClient:

import asyncio
from alltradingapi import AsyncClient

async def main():
    async with AsyncClient(key="ap_your_key") as ata:
        assets = await ata.assets(only_open=True)
        print(f"Open OTC Assets: {len(assets)}")

asyncio.run(main())
Enter fullscreen mode Exit fullscreen mode

🛡️ Core Highlights

  • Zero Dependencies: Pure Python standard library.
  • Resilient: Automatic exponential backoff for rate limiting.
  • Production Ready: Full type hinting (py.typed) and MIT licensed.

🔗 Website: alltradingapi.com

📖 Docs: alltradingapi.com/docs

🐙 GitHub: github.com/alltradingapi/alltradingapi-python

Top comments (0)