DEV Community

All Trading Api
All Trading Api

Posted on

ðŸ“Ķ Stream Quotex Candlesticks & Live Market Data in Node.js: Announcing alltradingapi on npm! âšĄðŸ“ˆ

🚀 Introducing alltradingapi: The Official Node.js & TypeScript Client for Quotex Market Data ðŸ“Ķ⚡

Building automated trading strategies, Discord signal bots, or custom live charting dashboards in JavaScript/TypeScript for binary OTC markets like Quotex has traditionally been an uphill battle. 🛑
The core obstacle? Quotex publishes no official public developer API.
Until now, developers had to resort to:

  • 🐌 Running resource-draining Puppeteer or Playwright browser instances on expensive servers.
  • ðŸ’Ĩ Parsing minified, undocumented WebSockets that break whenever the front-end updates.
  • âģ Dealing with session token decay and rate-limit IP blocks. Today, we are thrilled to announce that alltradingapi is officially published on npm! 🎉ðŸ“Ķ
npm install alltradingapi
Enter fullscreen mode Exit fullscreen mode

🔗 npm Listing: https://www.npmjs.com/package/alltradingapi

🌐 Official Developer Portal: https://alltradingapi.com

💎 Why We Built This: Engineering Philosophy 🛠ïļâœĻ

When architecting the Node.js SDK for All Trading API, our engineering team set non-negotiable standards for production fintech environments:

  1. ðŸŠķ Zero External Dependencies: Operates exclusively on Node.js built-ins (fetch). Zero dependency tree bloat, zero version conflicts, zero supply-chain risk!
  2. 📘 First-Class TypeScript Types: Ships native .d.ts declaration files with 100% autocomplete for candle payloads, timeframes, and asset models.
  3. ðŸ“Ķ Dual ESM & CommonJS Support: Seamlessly works out-of-the-box whether you use modern import { Client } from "alltradingapi" or standard const { Client } = require("alltradingapi").
  4. 🔄 Institutional Resilience: Integrated automatic retry logic with exponential backoff honoring upstream Retry-After headers on rate limits (HTTP 429).
  5. ⚡ Strict Client-Side Validation: Pre-validates query parameters locally before hitting the wire, saving wasted network round-trips!

6. ðŸŸĒ Node 18+ Native: Designed from the ground up for modern async/await event loops.

ðŸ’ŧ 10-Second Quickstart (TypeScript / JavaScript) 🚀

Installing the package takes less than 2 seconds:

npm install alltradingapi
Enter fullscreen mode Exit fullscreen mode

📈 1. Fetching 1-Minute OTC Candlesticks

Here is how easy it is to retrieve real-time OHLCV candles with custom lookback hours and timezone normalization:

import { Client } from "alltradingapi";
// Automatically picks up ATA_API_KEY from environment, or pass { key: "ap_your_key" }
const ata = new Client();
async function runBot() {
  console.log("⚡ Fetching Quotex market data...");
  // Query 2 hours of 1-minute candles for USD/BRL OTC
  const candles = await ata.candles("BRLUSD_otc", {
    hours: 2,
    timeframe: "1m"
  });
  const latest = candles.at(-1);
  console.log(`📊 Total candles: ${candles.length}`);
  console.log(`ðŸ”Ĩ Latest Close: ${latest?.close} at ${latest?.time_read}`);
  console.log(`⏱ïļ Ticks in candle: ${latest?.ticks}`);
}
runBot();
Enter fullscreen mode Exit fullscreen mode

📋 Standardized JSON Response:

[
  {
    "symbol_id": 332,
    "time": 1794079860,
    "open": 0.17696,
    "close": 0.17689,
    "high": 0.17708,
    "low": 0.17684,
    "ticks": 141,
    "asset": "BRLUSD_otc",
    "asset_name": "USD/BRL (OTC)",
    "time_read": "2026-11-07 16:31 (UTC: -03:00)"
  }
]
Enter fullscreen mode Exit fullscreen mode

💰 2. Monitoring Active Assets & Live Payout Yields ðŸŸĒ

Never execute a trade on sub-optimal payouts! You can query all 30+ currency and crypto pairs in real time:

// Query only assets where the market is currently open
const assets = await ata.assets({ onlyOpen: true });
for (const asset of assets.slice(0, 5)) {
  console.log(`âœĻ ${asset.asset_name}: ${asset.payout}% payout (24h change: ${asset.change_24h}%)`);
}
// Cleanly close resources when done
ata.close();
Enter fullscreen mode Exit fullscreen mode

🛠ïļ Complete Method Reference 📖

Method Endpoint Return Value
ata.candles(asset, opts) /qx_candles 📊 Real-time & historical OHLCV candlestick array
ata.assets(opts) /qx_assets 💰 All assets with payout %, open state, and volume
ata.history(asset, opts) /qx_history 🏛ïļ Extended historical candle archives
ata.saved(asset) /qx_saved ðŸ’ū Saved broker candle snapshots
ata.screenshot(asset) /qx_screenshot ðŸ“ļ Real-time rendered chart screenshot buffer
ata.result(tradeId) /qx_result ðŸŽŊ Verification check for trade outcomes

🌐 Get Started Today! 🚀âœĻ

Stop fighting with fragile scrapers and upgrade your Node.js trading infrastructure to institutional-grade REST feeds! 🏛ïļðŸ“ˆ

Top comments (0)