Join PocketOption with Six's affiliate link: Six PocketOption Affiliate link
Join PocketOption with Chipas affiliate link: Chipas PocketOption Affiliate link
A comprehensive, modern async Python API for PocketOption trading platform with advanced features including persistent connections, monitoring, and extensive testing frameworks.
- Complete SSID Format Support: Works with full authentication strings from browser (format:
42["auth",{"session":"...","isDemo":1,"uid":...,"platform":1}]) - Persistent Connections: Automatic keep-alive with 20-second ping intervals (like the original API)
- Auto-Reconnection: Intelligent reconnection with multiple region fallback
- Connection Pooling: Optimized connection management for better performance
- Real-time Monitoring: Connection health, performance metrics, and error tracking
- Diagnostics Reports: Comprehensive health assessments with recommendations
- Performance Analytics: Response times, throughput analysis, and bottleneck detection
- Alert System: Automatic alerts for connection issues and performance problems
- Load Testing: Concurrent client simulation and stress testing
- Integration Testing: End-to-end validation of all components
- Performance Benchmarks: Automated performance analysis and optimization
- Advanced Test Suites: Edge cases, error scenarios, and long-running stability tests
- Message Batching: Efficient message queuing and processing
- Concurrent Operations: Parallel API calls for better throughput
- Caching System: Intelligent caching with TTL for frequently accessed data
- Rate Limiting: Built-in protection against API rate limits
- Graceful Degradation: Continues operation despite individual failures
- Automatic Recovery: Self-healing connections and operations
- Comprehensive Logging: Detailed error tracking and debugging information
- Exception Management: Type-specific error handling and recovery strategies
# Clone the repository
git clone <repository-url>
cd PocketOptionAPI
# Install dependencies
pip install -r requirements.txt
# For development
pip install -r requirements-dev.txtTo use the API with real data, you need to extract your session ID from the browser:
- Open PocketOption in your browser
- Open Developer Tools (F12)
- Go to Network tab
- Filter by WebSocket (WS)
- Look for authentication message starting with
42["auth" - Right click and copy the complete message including the
42["auth",{...}]format
Example SSID format:
42["auth",{"session":"abcd1234efgh5678","isDemo":1,"uid":12345,"platform":1}]
# If you are unable to find it, try running the automatic SSID scraper under the
^ To be reimplemented soon ^tools folder.