Skip to main content

Python client for Quantum Signals APIs (streaming, inference, key management, backtest)

Project description

Quantum Signals Client

Python client library for Quantum Signals APIs.

Overview

This package provides a Python client for interacting with Quantum Signals services:

  • Streaming: SSE-based signal streaming
  • Inference: Model catalog and prediction endpoints
  • Key Management: API key CRUD operations
  • Backtest: Backtest results and metadata

Configuration

The client reads configuration from environment variables:

# Required:
export QUANTUMSIGNALS_API_KEY=foobar
# Optional, defaults to production URL:
export QUANTUMSIGNALS_BASE_URL=http://localhost:8000

The API key can also be set explicitly:

from quantumsignals.client import Client
client = Client(api_key="foobar")
client.set_api_key("foobar")

Usage

Init

from quantumsignals.client import Client
client = Client()

Fetching Available Models

models = client.get_model_catalog()

Streaming Signals

# Stream real-time signals via SSE
for signal in client.stream_signals():
    print(f"{signal.time} | {signal.symbol}: {signal.signal}")

Backtest Operations

# Get backtest metadata
metadata = client.get_backtest_metadata(
    model_family="Pythia",
    symbol="AAPL"
)

# Get historical predictions (JSON, CSV, or Parquet)
results = client.get_historical_predictions(
    model_family="Pythia-aB24X",
    symbol="NVDA",
    format="json",
    page=1,
    page_size=100
)

# Get daily backtest summaries
daily = client.get_daily_backtests(
    model_family="Pythia-aB24X",
    symbol="NVDA",
    format="json"
)

Context Manager Usage

# Properly close HTTP connections
with Client() as client:
    models = client.get_model_catalog()
    # Client automatically closes on exit

Development

This is a workspace package in the QS1 monorepo. See the main repository README for development setup.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantumsignals_client-0.3.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantumsignals_client-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file quantumsignals_client-0.3.0.tar.gz.

File metadata

File hashes

Hashes for quantumsignals_client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 493fc9ffbba4297558809fe4696c3e7116bbed374483a068727056fe3e4080f9
MD5 100fe5f7c79b55d57dace59dbd74f0cc
BLAKE2b-256 a86d954453a0031f70f319faaffe4c04c10ff6a49d2d1d461e11ae30a4f3d85f

See more details on using hashes here.

File details

Details for the file quantumsignals_client-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quantumsignals_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5bab51f66ccb32f2398f0b4fd3e2285144ee01cc6af3e39e763c76d36f246c
MD5 46d63e08f82d50f06268eeac3bd63f25
BLAKE2b-256 7ab55b224dd1a17690922b7c8bcd1f358655b8a7276454833caab9d1aa0eb63f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page