โก Pocket Option 24/7 OTC REST API, Reverse-Engineered Binary Stream Gateway & AI Signal Engine
๐ High-throughput Pocket Option Python Async REST API & Proprietary Reverse-Engineered Binary Protocol Engine. 24/7 OTC live prices, closed M1 candle history & auto-trading bridge.
๐ Table of Contents
- ๐ System Overview & Highlights
- ๐ Live API Interactive Swagger Documentation
- ๐ค Official Telegram Bots & Live Demos
- ๐๏ธ Architectural Design & Protocol Mechanics
- ๐ฆ Complete Project Directory Structure
- โก Fast Installation & 1-Click Deployment
- โ๏ธ Configuration Parameters (.env & JSON)
- ๐ป Code Examples & Integration Snippets
- [๐ก Available REST Endpoints & Binary Protocol Stream Feeds](#-available-rest-endpoints--binary protocol stream-feeds)
- ๐ฏ Signal Engine, Indicators & Winrate Filter
- ๐ก๏ธ Self-Healing, Cloudflare Bypass & Anti-Ban Architecture
- ๐ Commercial Source Code Purchase & Licensing
- ๐ฌ Direct Contact & Community
๐ System Overview & Highlights
Pocket Option 24/7 OTC REST API, Reverse-Engineered Binary Stream Gateway & AI Signal Engine is a state-of-the-art, enterprise-grade Python FastAPI Proprietary Reverse-Engineered Binary Protocol & High-Frequency Ingestion Node engineered specifically for Pocket Option. Built for algorithmic traders, prop trading firms, signal providers, and quantitative developers requiring 24/7 ultra-low latency execution and non-repainting market data streams.
- ๐ 24/7 OTC Market Coverage: Uninterrupted weekend and night feeds.
- ๐ Rolling 8-Day History: Non-repainting closed candle storage.
- ๐ฏ TradingView Integration: Direct Pine Script webhook execution.
โ ๏ธ Institutional Architecture Notice:
Broker internal streams utilize dynamic binary Protobuf encodings, non-standard TLS session fingerprints, and strict anti-scraping safeguards. Direct client connections are rejected or throttled. Our systems operate on a proprietary reverse-engineered binary protocol ingestion gateway that directly reconstructs raw broker packets into institutional sub-millisecond market feeds. For enterprise license access, private endpoints, or custom bot deployment: contact @YouKnowWho_am on Telegram.
๐ Live API Interactive Swagger Documentation
Experience the live production API server, test interactive Swagger requests, and inspect real-time schemas directly in your browser:
๐ https://api1.api.cbtradersbd.com/docs
๐ค Official Telegram Bots & Live Demos
You can immediately test our algorithms and automated account systems on Telegram:
๐๏ธ Architectural Design & Protocol Mechanics
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CB TRADERS BD GATEWAY โ
โ https://api1.api.cbtradersbd.com/docs โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ โ
REST API Requests Decrypted Raw Binary Protocol Pipeline (WSS)
โ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ โโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ
โ FastAPI Async Web Server โ โ High-Speed Binary Protocol Stream Pool โ
โ - Endpoint Validation โ โ - Binary Frame Parsing โ
โ - JSON Schema Serializer โ โ - Heartbeat Keep-Alive โ
โ - Token Authentication โ โ - Auto-Reconnect Daemon โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ โโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ
โ Core Engine Layer โ
โ - Session Manager & Cloudflare Clearance Handler โ
โ - Non-Repaint M1/M5 Historical Candle Persistence โ
โ - AI Multi-Indicator Signal Strategy Pipeline โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ
โ Pocket Option Live Platform โ
โ (Real Markets & 24/7 OTC) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฆ Complete Project Directory Structure
This repository features an expansive, clean, and production-ready modular architecture:
โโโ config/
โ โโโ default.json # Server host, port & connection pool configuration
โ โโโ strategies.json # Technical indicators, RSI thresholds & Martingale setups
โโโ docs/
โ โโโ API_REFERENCE.md # Exhaustive endpoint reference and request/response payloads
โ โโโ DEPLOYMENT_GUIDE.md # Step-by-step VPS Linux (Ubuntu/Debian) & Docker setup
โโโ examples/
โ โโโ 01_quickstart.py # 1-Click connection and live price check
โ โโโ 02_stream_candles.py # Real-time Binary Protocol Stream tick and candlestick listener
โ โโโ 03_auto_trade_signals.py # Automated execution based on AI indicator signals
โ โโโ 04_telegram_alerts.py # Formatting and broadcasting signals to Telegram channels
โ โโโ 05_historical_export.py # Exporting multi-day M1/M5 datasets to CSV and SQLite
โโโ src/
โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ auth.py # Cloudflare session token & cookie rotation manager
โ โ โโโ client.py # High-throughput asynchronous HTTP/REST client
โ โ โโโ engine.py # Master order processing & market event pipeline
โ โ โโโ binary protocol stream.py # Resilient Reverse-Engineered Binary Protocol frame parser
โ โโโ models/
โ โ โโโ __init__.py
โ โ โโโ candle.py # Pydantic OHLCV candle validation schemas
โ โ โโโ order.py # Binary options trade order payload models
โ โ โโโ payout.py # Live asset payout percentage schema
โ โโโ services/
โ โ โโโ __init__.py
โ โ โโโ database.py # SQLite/PostgreSQL persistence for 8-day rolling candles
โ โ โโโ telegram_bot.py # Async Telegram broadcast & notification engine
โ โโโ strategies/
โ โ โโโ __init__.py
โ โ โโโ martingale.py # Dynamic stake sizing & risk mitigation calculator
โ โ โโโ price_action.py # Support/Resistance, Pinbar & Engulfing pattern scanner
โ โ โโโ rsi_bb.py # RSI (14) + Bollinger Bands (20, 2) breakout analyzer
โ โโโ utils/
โ โโโ __init__.py
โ โโโ helpers.py # Timezone converters, timestamp formatters & math tools
โ โโโ logger.py # Colored asynchronous console & file logger
โโโ scripts/
โ โโโ install.sh # Automated Linux dependency installer
โ โโโ start_api.bat # 1-Click Windows production launcher
โโโ .env.example # Environment variables template
โโโ .gitignore # Standard Python git exclusions
โโโ Dockerfile # Multi-stage optimized Docker build
โโโ docker-compose.yml # Complete containerized service stack
โโโ requirements.txt # Locked production dependencies
โโโ README.md # In-depth system documentation
โก Fast Installation & 1-Click Deployment
Option A: Local Python Environment
# 1. Clone the repository
git clone https://github.com/cbtradersbd/pocket-option-api.git
cd pocket-option-api
# 2. Create and activate virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate
# 3. Install required production dependencies
pip install -r requirements.txt
# 4. Configure your environment
cp .env.example .env
# 5. Launch the FastAPI server
python -m uvicorn src.core.engine:app --host 0.0.0.0 --port 8000 --reload
Option B: Docker Containerization
docker-compose up -d --build
โ๏ธ Configuration Parameters (.env & JSON)
# .env Configuration File
API_BASE_URL=https://api1.api.cbtradersbd.com
API_KEY=cb_traders_bd_license_unlocked
BROKER=pocket option
DEFAULT_TIMEFRAME=1m
RETENTION_DAYS=8
TIMEZONE_OFFSET=UTC+6
LOG_LEVEL=INFO
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=@your_channel
๐ป Code Examples & Integration Snippets
1. Fetch Live Price & Continuous 24/7 OTC Feed
from src.core.client import BrokerApiClient
from src.utils.logger import logger
client = BrokerApiClient(base_url="https://api1.api.cbtradersbd.com/docs")
price_data = client.get_live_price("EURUSD_otc")
logger.info(f"Live Tick: {price_data}")
2. Stream Real-Time Candlesticks via Binary Protocol Stream
import asyncio
from src.core.binary protocol stream import ResilientBinary Protocol StreamClient
from src.utils.logger import logger
async def on_candle(candle):
logger.info(f"Closed M1 Candle: Time={candle.time}, Open={candle.open}, High={candle.high}, Low={candle.low}, Close={candle.close}")
async def main():
ws = ResilientBinary Protocol StreamClient(pair="EURUSD_otc")
await ws.connect_and_listen(callback=on_candle)
if __name__ == "__main__":
asyncio.run(main())
๐ก Available REST Endpoints & Binary Protocol Stream Feeds
| Endpoint |
Method |
Purpose |
Response Format |
/docs |
GET |
Interactive Swagger API Explorer |
HTML / UI |
/api/pocketoption/live-price |
GET |
Current bid/ask and tick stream |
JSON |
/api/pocketoption/candles |
GET |
Historical closed OHLCV candle records |
JSON Array |
/api/pocketoption/payouts |
GET |
Live payout percentage monitor for all pairs |
JSON Object |
/api/pocketoption/signals |
POST |
Execute automated strategy webhook trigger |
JSON Result |
/ws/pocketoption/stream |
WSS |
Ultra-low latency binary Decrypted Sub-Millisecond Binary Feed |
Binary / JSON |
๐ฏ Signal Engine, Indicators & Winrate Filter
- Non-Repainting Guarantee: Signals are calculated strictly on closed candles ($T-1$). Running ticks are never used for candle finalization.
- Triple Confirmation Filter:
- RSI Divergence: 14-period Relative Strength Index overbought ($>70$) and oversold ($<30$) boundary detection.
- Bollinger Band Squeeze: 20-period moving average with 2.0 standard deviation breakout validation.
- Trend Matrix: Exponential Moving Average (EMA 50 / EMA 200) trend directional filter.
- Integrated Martingale Calculator: Auto-calculates step 1 & step 2 recovery stakes based on live asset payout rates.
๐ก๏ธ Self-Healing, Cloudflare Bypass & Anti-Ban Architecture
- Zero-Drop Resilience: Automatically reconnects upon network interruptions with exponential backoff.
- Token Clearance Handler: Bypasses Cloudflare Turnstile and session expirations seamlessly in the background.
- Downtime Gap Recovery: Detects offline intervals and automatically queries past candles to backfill missing database records.
๐ Commercial Source Code Purchase & Licensing
Looking for the 100% full, unlocked source code with complete ownership, personal API keys, or custom bot development?
Full Commercial Package Includes:
- ๐ฆ 100% Full Unlocked Source Code (
app.py, Reverse-Engineered Binary Protocols, database engine, AI signal bots).
- ๐ 1-Click Automated Launchers for Windows, Linux VPS, and Docker.
- โก Unlimited Deployments on unlimited servers with zero restrictions.
- ๐ ๏ธ 24/7 1-on-1 Developer Setup Assistance & Support.
- ๐ Lifetime Code Updates & Strategy Enhancements.
๐ณ Accepted Payment Methods:
- USDT (TRC20 / BEP20)
- Binance Pay (UID / Pay ID)
- Bitcoin / Ethereum / Crypto
- Local Mobile Banking & Wire Transfers
๐ฌ Direct Contact & Community
๐ CB Traders BD Ecosystem : Explore All Broker APIs & Bots
Cross-platform algorithmic trading tools, real-time Decrypted Sub-Millisecond Binary Feeds, and AI signal engines:
โ Frequently Asked Questions (FAQ)
1. How do I get started and connect to the live API endpoints?
Explore interactive Swagger documentation, test live endpoints, and inspect schemas directly at https://api1.api.cbtradersbd.com/docs. Clone this repository, install dependencies with pip install -r requirements.txt, and configure credentials in .env.
2. Are 24/7 OTC asset pairs supported for continuous trading?
Yes! Our systems provide continuous round-the-clock streaming for OTC asset pairs alongside standard financial currency pairs with real-time candlestick feeds and low-latency execution.
3. Can I automate binary options trades directly from TradingView alerts?
Yes! Our TradingView webhook bridges convert Pine Script alert webhooks into instant automated trade executions with customizable risk management, martingale, and stop-loss rules.
4. How do the copy trading bridge and signal engines work?
The copy trading bridge mirrors trades from master accounts to target accounts with zero latency. The signal engines utilize non-repaint technical indicators and volatility filters to dispatch high-accuracy alerts to Telegram or webhook endpoints.
๐ท๏ธ Search & Discovery Keywords
quotex-api โข pocket-option-api โข iq-option-api โข binolla-api โข binary-options-bot โข algorithmic-trading โข tradingview-webhook-bridge โข 247-otc-market-data โข fastapi-binary-stream โข copy-trading-bot โข automated-trading-python โข live-payout-monitor
โญ Star This Project
If this toolkit assisted your algorithmic trading research or bot deployment, please give it a Star on GitHub to support active open-source development and help other traders find it!