1.0.3
FCS WebSocket Python v1.0.3
Real-time WebSocket client library for Forex, Cryptocurrency, and Stock market data streaming from FCS API.
What's New in v1.0.3
- Improved connection stability with auto-reconnect
- Added heartbeat mechanism for reliable long-running connections
- Enhanced error handling and logging
- Performance optimizations for high-frequency data streams
Features
- Real-time Market Data - Live OHLCV, Ask/Bid prices via WebSocket
- Multi-Market Support - Forex (EUR/USD, GBP/USD), Crypto (BTC/USD, ETH/USD), Stocks (AAPL, TSLA)
- Zero Dependencies - Uses only Python built-in modules
- Framework Ready - Flask, Django, FastAPI examples included
- Auto-Reconnect - Automatic reconnection on connection drops
- Heartbeat - Built-in keep-alive mechanism
- Smart Bandwidth - Tab visibility detection for bandwidth optimization
Installation
pip install fcsapi-websocket-pythonQuick Start
from fcsapi_websocket import FCSWebSocket
# Initialize and connect
ws = FCSWebSocket(access_key="your_api_key_here")
ws.subscribe(["crypto/btc", "crypto/eth", "forex/eur_usd"])
ws.connect()Examples Included
crypto_example.py- Bitcoin, Ethereum real-time pricesforex_example.py- EUR/USD, GBP/USD live ratesstock_example.py- AAPL, TSLA, GOOGL stock dataflask_crypto_example.py- Flask + Crypto WebSocketflask_forex_example.py- Flask + Forex WebSocketflask_stock_example.py- Flask + Stock WebSocket
Demo Access
Use fcs_socket_demo as API key for testing without signup.
Documentation
Full WebSocket API documentation: https://fcsapi.com/document/socket-api
Requirements
- Python 3.8 or higher
- No external dependencies required
Support
- Website: https://fcsapi.com
- Email: support@fcsapi.com
- GitHub Issues: https://github.com/fcsapi/websocket-python/issues