API Documentation
QuantumSignals API Documentation
Welcome to the QuantumSignals API documentation. This documentation covers all public APIs for the QuantumSignals trading signal platform.
Getting Started
New to QuantumSignals? Start here:
Official Python client library for the easiest integration.
Python Client Guide
Get up and running in 5 minutes with our quickstart guide.
Get started
Learn how to authenticate with the API using API keys.
Authentication guide
Complete API endpoint documentation with examples.
API Reference
Services
QuantumSignals is composed of four microservices, each providing specific functionality:
Real-time trading signal delivery via Server-Sent Events (SSE). Signals are continuously broadcast as they become available, allowing clients to maintain a persistent connection and receive updates in real-time.
Key Features: - Real-time signal delivery using SSE - Automatic reconnection support - Low latency signal propagation - Authentication via API key
Key Features: - Real-time signal delivery using SSE - Automatic reconnection support - Low latency signal propagation - Authentication via API key
API Reference
Model catalog and prediction serving. Browse available models and their performance metrics.
Key Features: - Model catalog with metadata - Version management - Performance metrics
Key Features: - Model catalog with metadata - Version management - Performance metrics
API Reference
API key management and authentication. Create, list, and delete API keys for accessing protected endpoints.
Key Features: - OIDC-based user authentication - API key CRUD operations - TTL support for temporary keys
Key Features: - OIDC-based user authentication - API key CRUD operations - TTL support for temporary keys
API Reference
Historical strategy backtesting results. Query and download backtest results in multiple formats.
Key Features: - Backtest metadata retrieval - Results in JSON, CSV, or Parquet - Accuracy metrics and analysis
Key Features: - Backtest metadata retrieval - Results in JSON, CSV, or Parquet - Accuracy metrics and analysis
API Reference
API Versions
Version
v1
Status
Current
Description
Stable production API
Need Help?
Get help from our support team
support@quantumsignals.com
What's Next?
- Quickstart Guide - Get your API key and make your first request
- Authentication - Understand authentication and security
- Complete API Reference - Explore all endpoints in detail
On this page
Quickstart Guide
Get started with the QuantumSignals API in 5 minutes using the official Python client.
Prerequisites
- Python 3.10+
- Access to the QS1 workspace for client installation
Installation
First, install the SignalQ Python client:
Step 1: Authenticate
The easiest way to get started is using the interactive authentication flow:
The
login() method will: 1. Open your browser for OIDC authentication 2. Automatically create or retrieve an API key 3. Configure the client for immediate useAlternative: If you already have an API key, you can skip the login flow:
Step 2: Fetch Available Models
Get the catalog of available trading models:
Step 3: Stream Trading Signals
Stream real-time trading signals using a simple iterator pattern:
The client handles all the complexity of Server-Sent Events (SSE) parsing and connection management.
Step 4: Fetch Backtest Results
Access historical backtest results for model evaluation:
Complete Example
Here's a complete, production-ready example:
Best Practice: Use a context manager to ensure proper cleanup:
Next Steps
- Python Client Documentation - Complete guide to the Python client
- Authentication Guide - Detailed security best practices
- Streaming Service - Advanced SSE usage patterns
- API Reference - Complete endpoint documentation
Advanced: Direct HTTP Integration
For users who cannot use the Python client (e.g., integrating from other languages or custom tooling), here are examples using raw HTTP calls with
httpx.Creating an API Key (httpx)
Getting Models (httpx)
Streaming Signals (httpx)
Getting Backtest Results (httpx)
Note: The Python client is the recommended approach for Python users as it handles authentication, connection management, error handling, and SSE parsing automatically.
Need Help?
- Python Client Docs: Python SDK Guide
- API Reference: https://docs.quantumsignals.com/api/v1/
- Support: support@quantumsignals.com
- GitHub Issues: https://github.com/Quantum-Signals/QS1/issues
On this page
Authentication
QuantumSignals API uses API key authentication for most endpoints. API keys are managed through the Key Server and are passed via the
x-api-key HTTP header.Getting Started with Authentication
Using the Python Client (Recommended)
The easiest way to authenticate is using the official SignalQ Python client:
The
client.login() method: 1. Opens your browser for OIDC authentication via Zitadel 2. Automatically creates or retrieves an API key 3. Configures the client for immediate useFor production environments, use environment variables:
Managing API Keys with Python Client
InstallaManual Authentication Flowtion
For non-Python integrations or custom implementations:
Step 1: Authenticate with OIDC
The Key Server uses OIDC (OpenID Connect) for user authentication. You'll need to obtain an access token from your identity provider (Zitadel).
Step 2: Create an API Key
Once authenticated, create an API key using the Key Server:
Response:
Important: Save the
key value securely - it will only be shown once!Using Your API Key
Include your API key in the
x-api-key header for all authenticated requests:Which Endpoints Require Authentication?
Authenticated Endpoints (require x-api-key)
GET /v1/signals- Streaming signalsGET /v1/models- Model catalogGET /v1/backtest- Backtest metadataGET /v1/backtest/results- Backtest resultsGET /v1/backtest/accuracy - Backtest accuracy metricsGET /v1/most_recent_backtest - Most recent backtest
Public Endpoints (no authentication)
POST /v1/keys - Create API key (requires OIDC token)GET /v1/keys - List your API keys (requires OIDC token)DELETE /v1/keys - Delete an API key (requires OIDC token)
Note: The Key Server endpoints use OIDC token authentication instead of API keys.
Managing API Keys
List Your Keys
Delete a Key
Security Best Practices
- Never commit API keys to version control
- Rotate keys regularly - delete old keys and create new ones
- Use environment variables to store keys in your applications
- Use different keys for different environments (dev, staging, production)
- Set TTL for keys used in temporary scripts or testing
- Monitor key usage through the Key Server
Troubleshooting
401 Unauthorized
- Check that you're including the
x-api-keyheader - Verify the key is correct (no typos, whitespace)
- Confirm the key hasn't been deleted
403 Forbidden
- The key exists but doesn't have permission for this endpoint
- Contact support to upgrade your access level
429 Too Many Requests
- You've exceeded the rate limit
- Consider implementing exponential backoff
On this page
QuantumSignals Python Client
The official Python client library for the QuantumSignals API. This client provides a simple, intuitive interface for authentication, streaming signals, managing API keys, and accessing backtest results.
Installation
The SignalQ client is part of the QS1 workspace. Install with:
Quick Start
Get started in 30 seconds:
Authentication
Interactive Login (Recommended for Development)
The easiest way to authenticate is using the interactive OIDC login flow:
Using an Existing API Key (Recommended for Production)
If you already have an API key, skip the login flow:
Core Features
Model Catalog
Get information about available trading models:
Signal Streaming
Stream real-time trading signals via Server-Sent Events:
Signal Data Model: -
time: int - Unix timestamp - symbol: str - Trading symbol (e.g., "AAPL") - signal: int - Signal value: -1 (sell), 0 (hold), 1 (buy) - model: str - Model identifierBacktest Operations
Access historical backtest results for model evaluation:
Get Most Recent Backtest
Get Most Recent Backtest
Get Backtest Metadata
Get Backtest Results
Result Data Model: -
time: int - Unix timestamp - signal: int - Signal at that time - position: int - Portfolio position - pnl: float - Profit/loss for the period - cumulative_pnl: float - Cumulative profit/lossGet Backtest Accuracy Metrics
API Key Management
Manage your API keys programmatically (requires OIDC authentication):
Best Practices
Use Context Managers
Use Context ManagersProperly close HTTP connections using context managers:
Handle Exceptions
The client provides specific exceptions for error handling:
Production Signal Streaming
For production signal streaming with error recovery:
Complete Example
Here's a complete production-ready example:
Troubleshooting
Port Already in Use
If port 8080 is in use or your system for
client.login() to get OIDC authentication (for key management). you will have to clear the port on your side. Key-based authentication should work at any time!Authentication Timeout
The login flow times out after 5 minutes. Complete authentication before the timeout.
Connection Errors During Streaming
Signal streaming is a long-lived connection. If you encounter disconnections: - Implement retry logic with exponential backoff - Check your network stability - Verify the streaming service is running
API Reference
For detailed REST API documentation and advanced HTTP integration, see: - REST API Quickstart - Streaming Service Documentation - Authentication Guide
On this page
