Skip to content

1.0.3

Choose a tag to compare

@fcs-developer fcs-developer released this 24 Dec 12:11
· 5 commits to master since this release

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-python

Quick 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 prices
  • forex_example.py - EUR/USD, GBP/USD live rates
  • stock_example.py - AAPL, TSLA, GOOGL stock data
  • flask_crypto_example.py - Flask + Crypto WebSocket
  • flask_forex_example.py - Flask + Forex WebSocket
  • flask_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