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 SignalQ client uses API key authentication. Obtain your API key from your administrator or the QuantumSignals dashboard:
For production use, load the API key from environment variables:
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.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://www.quantumsignals.ai/documentation#api-tab
- 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:
For production environments, use environment variables:
Obtain your API key from your administrator or the QuantumSignals dashboard.
Manual Authentication Flow
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
Key Management Endpoints (require OIDC token)
These endpoints use OIDC token authentication (via
Authorization: Bearer header) for managing API keys:POST /v1/keys - Create API keyGET /v1/keys - List your API keysDELETE /v1/keys - Delete an API key
Note: These endpoints are typically accessed by administrators via the REST API directly, not through the Python client.
Managing API Keys (REST API)
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
The SignalQ client uses API key authentication. Obtain your API key from your administrator or the QuantumSignals dashboard.
For production use, load the API key from environment variables:
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
Best Practices
Use Context Managers
Properly 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
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
