Base URL
Authentication
Routes are guarded by a singleauth middleware that accepts either:
- Agent / server-to-server —
Authorization: Bearer $AGENT_SECRET(the shared secret) - End user —
Authorization: Bearer <privy-jwt>(verified against the Privy app)
/portfolio, /tokens, /events) are public; the rest require a bearer token.
Endpoints
The server self-calls
/execute and /sponsor/close over localhost using AGENT_SECRET, so the same secret powers both the agent and internal server-to-server flows.
