ATR

Documentation

Start here for orientation—then use GET /openapi.json on your deployment as the source of truth. Copy-paste snippets live in the OSS repo under docs/playground/.

Not financial advice · deterministic telemetry only.

Overview

API v1 · MarketState schema_version v1
  • MarketState is JSON with explicit schema_version and cycle_id—poll REST, subscribe via SSE, or call MCP tools on the deployment you are issued.
  • Base URL is per environment; routes stay stable across key rotation. Outbound market-state webhooks are operator-configured, not self-serve API routes.
  • GET /v1/market-state
  • Accept: application/json

Authentication

  • Bearer API keys on protected routes; rotate keys without changing URLs.
  • Some enterprise deployments add JWT verification—follow the OpenAPI security schemes exposed by your environment.
  • Authorization: Bearer <key>
  • 401 · invalid_or_expired_key

MarketState schema

MarketStateV1 · cycle_id · integrity fingerprint
  • Regime, volatility, suppression, risk posture, readiness, freshness, pipeline_status, and integrity fields are explicit—agents consume structs, not prose.
  • See GET /openapi.json for the authoritative model; cognition snapshots align with the same cycle lineage when exposed.
  • "schema_version": "v1"
  • "cycle_id": "…"
  • "integrity": { "fingerprint": "…" }

REST API

GET/v1/market-stateGET/v1/health
  • Canonical MarketState is GET /v1/market-state (Bearer key)—no symbol/interval query parameters on the core route in the open schema.
  • Archive range, replay, cognition, and MCP live alongside the same auth model; errors return structured JSON with stable codes where applicable.
  • curl -H "Authorization: Bearer …"
  • 401 / 403 / 429 as documented in OpenAPI

Webhooks

  • Billing events from your configured payment provider hit a signature-verified ingress route on the API (exact path is deployment-specific—see OpenAPI or your operator). This is operator billing plumbing, not a tenant-facing subscribe callback.
  • Outbound market-state delivery URLs are deployment-specific (operator env). Verify signatures before side effects; design idempotent handlers.
  • Provider signature header
  • Configure outbound URL in ops env when enabled

SDK & OpenAPI

GET/openapi.json
  • Publish OpenAPI to artifact storage or CI; diff breaking changes before rollout.
  • Python SDK maps resources to typed errors and backoff-friendly retries.
  • openapi-generator-cli
  • pytest tests/contract_openapi.py

Agents & automation

  • HTTPS MCP: GET /v1/mcp/manifest and /v1/mcp/tools, POST /v1/mcp/invoke—the same contracts as REST.
  • SSE: GET /v1/subscribe/market-state-cycle and /v1/subscribe/agent-events (Bearer, text/event-stream). Prefer polling first if corporate proxies block streams.
  • POST /v1/mcp/invoke { tool, arguments }
  • See docs/playground in the OSS repo