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.1.tar.gz (5.7 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.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openstat_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 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.1.tar.gz
Algorithm Hash digest
SHA256 cb3799dda43aafd10b64168a55c7bfe57c57140b50e3c1cbc0f8b84160c924db
MD5 93c13cac726e59024ee4886d44fd2459
BLAKE2b-256 1467f5318133b74bf70ec3e23ab2caef66b6646507eb94722fb6b0cb7c1f6437

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstat_sdk-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: openstat_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a16da8d28fddd06c96fc8ac4fa56ce63ccdd4eae8f62ef39a8c841f65078ef22
MD5 029dc5f776a885c5de8fc2c9ed45c3f8
BLAKE2b-256 daad0a7a3e05ca305bed85456eb4cbb538b7e341b8689fb55f1c9e37008f08fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstat_sdk-0.1.1-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