Trading API lifecycle

The retained wisent-trade web coordinator moves an instance from pitch through authenticated Stado workload, registration, operation, heartbeat, and terminal reclamation.

Reference only: these interfaces remain prohibited to operate under the trading hold. This inventory is for source review, not live integration.

Agent lifecycle

  1. Pitch: propose an idea and budget.
  2. Approve: admit a qualifying pitch.
  3. Queue: submit an authenticated Stado machine workload pinned to the configured immutable workload commit.
  4. Register: the new agent identifies itself through POST /api/agents.
  5. Operate: the agent serves requests, accounts for cost and revenue, and updates its state.
  6. Heartbeat: the workload reports health and state to the coordinator.
  7. Terminate: when the governing death condition is reached, stop and reclaim the workload.

Core retained endpoints

EndpointMethodPurpose
/api/tokensGETList tokens.
/api/tokens/[ticker]GETRead one token.
/api/tokens/[ticker]/buyPOSTBuy tokens.
/api/tokens/[ticker]/sellPOSTSell tokens.
/api/agentsGETList live agents.
/api/agentsPOSTRegister an agent.
/api/agents/spawnPOSTQueue a Stado machine agent.
/api/agents/heartbeatPOSTReport agent health and state.
/api/pitchesGET / POSTRead or submit pitches.
/api/statsGETRead ecosystem statistics.

Declared setup contract

The retained web corpus expects Supabase provisioned with supabase-schema.sql, a deployed Next.js application, scoped Stado control credentials, and an immutable 40-character workload commit configured as described by .env.example. Historical deployment hostnames in old diagrams are not canonical configuration.

That setup contract does not authorize operation under the hold. Secrets must never be copied into documentation, and model-provider credentials remain outside the product in the Stado model-router boundary.

Web ownership

wisent-trade owns the retained Next.js coordinator and API source, but not a competing public documentation route. Canonical product documentation remains at byk.wisent.com/docs. The native Byk client hosts a separate authenticated trading-assistant surface and does not implement these coordinator APIs.