DOCS CANDLE DATA API

Candle Data API

Live ticks, candles and day history of every pair of six brokers — one key, simple addresses, JSON answers.

Free 1-day trial From $15 a month No monthly request limit
GET · JSON
# latest candle of EURUSD_otc, 1 minute
curl "https://bangladeshitrader.com/chart/Qx.php?pair=EURUSD_otc&timeframe=M1&count=1&key=API-…"
{
  "success": true,
  "pair": "EURUSD_otc",
  "data": [{
    "time": "2026-11-10 16:54:00",
    "open": 1.12973, "high": 1.12983,
    "low": 1.12944,  "close": 1.12944,
    "colour": "red", "payout": 93
  }]
}
6Brokers, one key
6Timeframes from M1 to H4
5,000Candles in one request
∞No monthly request limit

Overview

Our collectors record every pair of Quotex, Binolla, TradoWix, Pocket Broker, IQ Option and Olymp Trade — OTC and live markets — around the clock. With this API your own bot, app, website or Excel sheet reads the same data our charts use.

Live tick (current price)The newest price of one pair, with bid, ask and the exact time in milliseconds (UTC).
Latest candlesThe newest N candles of one pair. The newest candle comes first.
Candles of one day (history)Every candle of one UTC day, newest first.
Live tick streamKeep one connection open and receive every new tick.
WebhooksWe call your server the moment a candle closes.
Pair listsEvery pair with its payout and whether it is open now — no key needed.
Binary options and OTC trading carry a high risk of losing money. The API delivers market data, not trading advice or a promise of profit.

Quick start

1

Log in and open the API page. Start the free 1-day trial or buy a plan.

2

Copy your licence key — it looks like API-XXXX-XXXX-XXXX-XXXX.

3

Add &key=your key to the end of an address and open it in your browser — you will see JSON data.

https://bangladeshitrader.com/chart/Qx.php?timeframe=M1&pair=EURUSD_otc&count=100&key=API-XXXX-XXXX-XXXX-XXXX

Your licence key

Your key is shown on the API page as soon as your trial or plan is active, and you can see it there any time. Keep it secret and never give it to anyone — anyone with your key uses your plan. If it leaks, press Make a new key: the old key stops working at once.

Three ways to send the key

WhereExample
In the address…&key=API-XXXX-XXXX-XXXX-XXXX
X-API-Key headerX-API-Key: API-XXXX-XXXX-XXXX-XXXX
Authorization headerAuthorization: Bearer API-XXXX-XXXX-XXXX-XXXX
A header is safer for apps and servers, because addresses are saved in browser history and server logs.
curl -H "X-API-Key: API-XXXX-XXXX-XXXX-XXXX" "https://bangladeshitrader.com/chart/Qx.php?timeframe=M1&pair=EURUSD_otc&count=100"

When your plan ends, the API answers LICENSE_EXPIRED until you renew. Your key stays the same after renewing.

Plans & prices

Every plan has every address: live ticks, candles, day history, the tick stream and webhooks. Pay with bKash, Nagad, Rocket or card — the key works the moment the payment is confirmed.

Free trial

$0 1 day
  • Every broker, every address
  • 30 requests / minute
  • One trial per account

Monthly · 1 broker

$15 / month
≈ ৳1,875
  • One broker of your choice
  • 120 requests / minute, no monthly limit
  • 30 days, renew any time
Best value

Monthly · 2 brokers

$30 / month
≈ ৳3,750
  • Two brokers of your choice
  • 240 requests / minute, no monthly limit
  • 30 days, renew any time
Pay once

Lifetime · 1 broker

$300 once
≈ ৳37,500
  • One broker of your choice
  • 120 requests / minute, no monthly limit
  • Never expires

Addresses

Every broker has the same three addresses and the same answers — only the start of the address changes. Choose a broker and every address below follows.

Stored days go back to 2026-10-12. In /api/v1 use broker=quotex
GET/chart/Qx_ticks.phpKey needed

Live tick (current price)

The newest price of one pair, with bid, ask and the exact time in milliseconds (UTC).

ParameterDescription
pair requiredPair name, e.g. EURUSD_otc.
key requiredYour licence key.
Address
https://bangladeshitrader.com/chart/Qx_ticks.php?pair=EURUSD_otc&key=API-XXXX-XXXX-XXXX-XXXX
Example answer
{
    "success": true,
    "data": {
        "type": "tick",
        "pair": "EURUSD_otc",
        "price": 1.12979,
        "bid": 1.129787,
        "ask": 1.129793,
        "spread": 5.65e-6,
        "timestamp": 1794329750.721,
        "time": "2026-11-10 16:55:50.720"
    }
}
GET/chart/Qx.phpKey needed

Latest candles

The newest N candles of one pair. The newest candle comes first.

ParameterDescription
pair requiredPair name with _otc for OTC, e.g. EURUSD_otc (all pairs: see the pair list).
timeframeM1, M5, M15, M30, H1 or H4. Default: M1.
countHow many candles: 1 – 5000. Default: 500.
key requiredYour licence key.
Address
https://bangladeshitrader.com/chart/Qx.php?timeframe=M1&pair=EURUSD_otc&count=500&key=API-XXXX-XXXX-XXXX-XXXX
Example answer
{
    "Owner_Developer": "Sujan Khan",
    "Telegram": "@Bangladeshi_Trader",
    "Channel": "https://t.me/BangladeshiTrader",
    "Broker": "Quotex",
    "Version": "1.00",
    "Timeframe": "M1",
    "success": true,
    "pair": "EURUSD_otc",
    "count": 1,
    "data": [
        {
            "pair": "EURUSD_otc",
            "time": "2026-11-10 16:54:00",
            "chart_open": false,
            "epoch": 1794329640,
            "open": 1.12973,
            "high": 1.12983,
            "low": 1.12944,
            "close": 1.12944,
            "colour": "red",
            "payout": 93,
            "volume": 0
        }
    ],
    "Execution_time": "0.0021 second"
}
GET/chart/Qxpro.phpKey needed

Candles of one day (history)

Every candle of one UTC day, newest first.

ParameterDescription
pair requiredPair name, e.g. EURUSD_otc.
timeframeM1, M5, M15, M30, H1 or H4.
date requiredYYYY-MM-DD (UTC day). If that day has no data, the answer lists available_dates.
key requiredYour licence key.
Address
https://bangladeshitrader.com/chart/Qxpro.php?timeframe=M1&pair=EURUSD_otc&date=2026-12-02&key=API-XXXX-XXXX-XXXX-XXXX
Example answer
{
    "Owner_Developer": "Sujan Khan",
    "Telegram": "@Bangladeshi_Trader",
    "Channel": "https://t.me/BangladeshiTrader",
    "Broker": "Quotex",
    "Version": "1.00",
    "Timeframe": "M1",
    "success": true,
    "pair": "EURUSD_otc",
    "date": "2026-11-09",
    "count": 1430,
    "data": [
        {
            "pair": "EURUSD_otc",
            "time": "2026-11-09 23:59:00",
            "chart_open": false,
            "epoch": 1794268740,
            "open": 1.12973,
            "high": 1.12983,
            "low": 1.12944,
            "close": 1.12944,
            "colour": "red",
            "payout": 93,
            "volume": 0
        }
    ],
    "Execution_time": "0.0245 second"
}
GETPair listsNo key

Every pair with its payout and whether it is open now — no key needed. Always use the exact name, with _otc for OTC pairs: USDNGN_otc, not USDNGN.

https://bangladeshitrader.com/chart/api/pairs

Candle fields

FieldMeaning
timeStart of the candle, UTC (YYYY-MM-DD HH:MM:SS)
epochThe same time in seconds
open · high · low · closePrices of the candle
colourgreen when close ≥ open, otherwise red
payoutPayout % of the pair at that time
volumeAlways 0 (the brokers do not publish volume)
Candles come newest first. Times are always UTC — Bangladesh time is UTC+6.

Error codes

When something is wrong the answer has success: false, a code and an error message.

codeHTTPMeaning
LICENSE_REQUIRED401No key was sent — add &key=… to the address
LICENSE_INVALID401The key is mistyped or does not exist
LICENSE_EXPIRED403Your plan has ended — renew it on the API page
LICENSE_REVOKED403The key was replaced by a new one or stopped
BROKER_NOT_IN_PLAN403Your plan does not include this broker
IP_NOT_ALLOWED403Your key is limited to other IP addresses
RATE_LIMITED429Too many requests this minute — wait (Retry-After header) and cache results
No candle data404Wrong pair name (remember _otc) or the market has no data
Example answer
{
    "Owner_Developer": "Sujan Khan",
    "Telegram": "@Bangladeshi_Trader",
    "Channel": "https://t.me/BangladeshiTrader",
    "Broker": "Quotex",
    "Version": "1.00",
    "success": false,
    "error": "Your API plan has ended. Renew it on bangladeshitrader.com/developer.php",
    "code": "LICENSE_EXPIRED",
    "contact": "@Bangladeshi_Trader",
    "data": []
}

Code examples

import requests   # pip install requests
KEY = "API-XXXX-XXXX-XXXX-XXXX"
r = requests.get("https://bangladeshitrader.com/chart/Qx.php",
                 params={"timeframe": "M1", "pair": "EURUSD_otc", "count": 100, "key": KEY},
                 timeout=15)
data = r.json()
if data["success"]:
    for c in data["data"]:                      # newest candle first
        print(c["time"], c["open"], c["high"], c["low"], c["close"], c["colour"])
else:
    print(data["code"], data["error"])

Other brokers: change /chart/Qx.php to the address shown above for that broker.

Websites & web apps

Building on Netlify, Vercel, GitHub Pages or similar? Four rules keep your key safe and your app fast:

1

Always use the full pair name with _otc for OTC pairs, e.g. USDNGN_otc.

2

Do not use free CORS proxies (corsproxy.io, allorigins and the like). Our API can be called straight from a browser; proxies block requests, ask for their own keys and hand your key to a third party.

3

Never put your key in a public page's code — anyone can read the page source. Call the API from your own server or function and keep the key in an environment variable.

4

Scanning many pairs? Ask for 2–3 pairs at a time and cache the results for a few seconds.

Netlify example — netlify/functions/candles.js

exports.handler = async (event) => {
  const { pair, timeframe = "M1", count = "100" } = event.queryStringParameters || {};
  if (!/^[A-Za-z0-9_]{3,20}$/.test(pair || "")) return { statusCode: 400, body: "bad pair" };
  const url = `https://bangladeshitrader.com/chart/Qx.php?timeframe=${encodeURIComponent(timeframe)}&pair=${encodeURIComponent(pair)}&count=${encodeURIComponent(count)}`;
  const r = await fetch(url, { headers: { "X-API-Key": process.env.BDT_API_KEY } });
  return { statusCode: r.status, headers: { "Content-Type": "application/json", "Cache-Control": "public, max-age=5" }, body: await r.text() };
};

In Netlify → Site settings → Environment variables add BDT_API_KEY = your key. Your page then calls:

fetch("/.netlify/functions/candles?pair=USDNGN_otc&timeframe=M1&count=100")

Live tick stream

Instead of asking again and again, keep one connection open and receive every new tick of up to 20 pairs as it happens (Server-Sent Events). One connection lasts up to 5 minutes, then connect again. Up to 2 open streams per account.

https://bangladeshitrader.com/api/v1/stream/ticks?broker=quotex&pairs=EURUSD_otc,GBPUSD_otc&key=API-XXXX-XXXX-XXXX-XXXX
import json, requests   # pip install requests
url = "https://bangladeshitrader.com/api/v1/stream/ticks"
params = {"broker": "quotex", "pairs": "EURUSD_otc,GBPUSD_otc"}
headers = {"X-API-Key": "API-XXXX-XXXX-XXXX-XXXX"}
while True:                      # reconnect when the 5 minutes are over
    with requests.get(url, params=params, headers=headers, stream=True, timeout=330) as r:
        event = None
        for line in r.iter_lines(decode_unicode=True):
            if line.startswith("event: "): event = line[7:]
            elif line.startswith("data: ") and event == "tick":
                t = json.loads(line[6:])
                print(t["symbol"], t["price"], t["time"])
What arrives
event: tick
data: {"symbol":"EURUSD_otc","available":true,"price":1.12656,"bid":1.126557,"ask":1.126563,"time":"2026-11-10T10:00:08.884Z","epoch_ms":1794304808884,"fresh":true}

Use broker=binolla, tradowix, pocket_broker, iqoption or olymptrade for the other brokers (when that broker is in your plan).

Webhooks

Add a webhook on the API page: your server's address, a broker, up to 10 pairs and a timeframe. Every time a candle of those pairs closes, we send it to your server with POST, usually within a minute. Answer with any 2xx status; after 20 failures in a row the webhook is paused.

Example answer
POST /your-webhook  HTTP/1.1
Content-Type: application/json
X-BDT-Event: candle.closed
X-BDT-Timestamp: 1794304860
X-BDT-Signature: sha256=5d1f…

{
    "event": "candle.closed",
    "id": "evt_3f9a51c2b7d04e18",
    "created_at": "2026-11-10T10:01:02Z",
    "data": {
        "broker": "quotex",
        "pair": "EURUSD_otc",
        "tf": "M1",
        "candle": {
            "time": "2026-11-10T10:00:00Z",
            "epoch": 1794304800,
            "open": 1.12655,
            "high": 1.12702,
            "low": 1.12631,
            "close": 1.12684,
            "payout": 92,
            "closed": true
        }
    }
}

Check the signature

The signature is HMAC-SHA256 of timestamp + "." + the raw body, made with your webhook's signing secret (shown on the API page). Reject a call when it does not match or when the timestamp is more than 5 minutes old.

<?php
$secret = 'YOUR_SIGNING_SECRET';
$body = file_get_contents('php://input');
$ts   = $_SERVER['HTTP_X_BDT_TIMESTAMP'] ?? '';
$sig  = $_SERVER['HTTP_X_BDT_SIGNATURE'] ?? '';
$good = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!hash_equals($good, $sig) || abs(time() - (int)$ts) > 300) { http_response_code(401); exit; }
$event = json_decode($body, true);
if ($event['event'] === 'candle.closed') {
    $c = $event['data']['candle'];
    // your logic, e.g. save $c['close'] for $event['data']['pair']
}
http_response_code(200);

Plan & usage

For your own dashboards: your plan, when it ends, and your requests per day — with the same key.

AddressWhat you get
https://bangladeshitrader.com/api/v1/accountPlan, brokers, end date, speed limit, today's and this month's requests
https://bangladeshitrader.com/api/v1/usage?days=30Requests and errors per day and per address
https://bangladeshitrader.com/api/v1/webhooksYour webhooks and how their last delivery went
https://bangladeshitrader.com/api/v1/statusWhether each broker's feed is working (no key)

More endpoints (pairs, payouts, candles in M2/M3/M10, multi-day history, several ticks at once) are listed in the OpenAPI file.

Questions

Is the API part of my analysis credits?

No. The API is a separate product with its own plans and payments. Credits and the API never affect each other.

What happens when my plan ends?

Your key answers LICENSE_EXPIRED until you renew. Your key and webhooks stay saved, so everything works again the moment you renew.

Can I change brokers?

Yes. Buy the plan with the brokers you want; buying the same brokers again adds 30 days to your current plan.

Something does not work?

Check the status address first, then contact support with the address you called and the answer you got.

Ready to build?

Start the free 1-day trial — every broker, every address, no payment needed.