Releases: fcsapi/websocket-python
Releases · fcsapi/websocket-python
4.0.0
FCS WebSocket Python v4.0.0
First Release - Python WebSocket client for real-time Forex, Crypto, and Stock market data from FCS API.
What's New
Initial release with complete WebSocket implementation:
- Real-time Streaming - Live OHLCV and Ask/Bid price updates (1-5 second updates)
- Multi-Market Support - Forex (FX:EURUSD), Crypto (BINANCE:BTCUSDT), Stocks (NASDAQ:AAPL)
- Decorator-Based API - Simple event handling with Python decorators
- Auto-Reconnect - Automatic reconnection with configurable retry limit
- Background Threading - Non-blocking mode for concurrent operations
- Zero Dependencies - Pure Python implementation using built-in websocket
- Easy Integration - Simple method calls with clean API
Installation
pip install fcsapi-websocketQuick Start
from fcs_client_lib import FCSClient
client = FCSClient('YOUR_API_KEY')
@client.on_message
def handle_message(data):
if data.get('type') == 'price':
symbol = data.get('symbol')
price = data['prices'].get('c')
print(f'{symbol}: ${price}')
client.connect()
client.join('BINANCE:BTCUSDT', '1D')
client.run_forever()Background Mode (Non-blocking)
client.connect()
client.run_forever(blocking=False) # Runs in background thread
# Your code continues here...Examples Included
simple_example.py- Basic price streamingforex_example.py- Forex pairs with spread calculationcrypto_example.py- Bitcoin, Ethereum real-time pricesbackground_example.py- Non-blocking background modestock_example.py- Stock prices (AAPL, TSLA, GOOGL)
Supported Markets
- Forex: FX:EURUSD, FX:GBPUSD, FX:USDJPY
- Crypto: BINANCE:BTCUSDT, BINANCE:ETHUSDT
- Stocks: NASDAQ:AAPL, NYSE:TSLA
Timeframes
1m, 5m, 15m, 30m, 1h, 4h, 1D, 1W, 1M
Demo Access
Test without signup: fcs_socket_demo
Requirements
- Python 3.8 or higher
- No external dependencies
Documentation
- Full docs: https://fcsapi.com/document/stock-api#websocket
- PyPI package: https://pypi.org/project/fcsapi-websocket/
- GitHub: https://github.com/fcsapi/websocket-python
- Support: support@fcsapi.com
Get API Key
Sign up for free at https://fcsapi.com
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