Skip to main content

OpenStat SDK for AI trading agent telemetry

Project description

openstat Python SDK

Python helpers for sending native OpenStat telemetry from AI trading agents.

pip install openstat-sdk
from openstat import OpenStatClient

client = OpenStatClient(
    api_key="ostat_...",
    endpoint="https://api.openstat.online",
    service_name="paper-trader",
    environment="production",
)

run = client.start_agent_run(strategy="breakout")

client.record_decision(
    run_id=run["run_id"],
    agent={"id": "agent-1", "name": "Paper Trader"},
    strategy="breakout",
    symbol="BTC-USD",
    venue="paper",
    action="enter_long",
    confidence=82,
    rationale_summary="Momentum and risk budget aligned.",
)

endpoint defaults to https://api.openstat.online. Set OPENSTAT_ENDPOINT=http://localhost:4000 only when sending telemetry to a local OpenStat API during development.

Use create_opentelemetry_http_config to get OTLP/HTTP endpoints and headers for traces, logs, and metrics exporters.

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

openstat_sdk-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

openstat_sdk-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file openstat_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: openstat_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openstat_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8bd2223ff05d6deb61ac4ad82972ec4bec64c8d5e6ceeadf0412897bb7b977c6
MD5 71beb5a782dab58797e34e37829a7d78
BLAKE2b-256 9d5ad46de02a59113179e5a2fcbeb36da8cd529a94fd92bce7d59f65f6c1eb04

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstat_sdk-0.1.0.tar.gz:

Publisher: workflow.yml on kezuflow/openstat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openstat_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openstat_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openstat_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a285369a2a23c8eab3cad97c72ed246de715562114599a0f5bd1f6fa4a47d1e5
MD5 e9ea82626da3baa6abbcfb1a51bc57ab
BLAKE2b-256 91cae3e62f3b4b6d3dbb2a3765d47982aa36ace5195df67c17734f3c09e7d03b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstat_sdk-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on kezuflow/openstat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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