Veyronn Documentation

Application API

Railway BFF endpoints used by the hosted Veyronn application.

The hosted API is an application backend, not a versioned public trading API. Requests normally use the Vercel origin so /api/* is proxied to Railway.

Health and reads

| Method | Path | Purpose | | --- | --- | --- | | GET | /api/health | BFF and database health | | GET | /api/indexer/health | Indexer cursor and worker state | | GET | /api/indexer/events?limit= | Recent canonical protocol events | | GET | /api/indexer/trades?limit=&marketId= | Indexed trade history | | GET | /api/indexer/account-history?owner= | Wallet activity | | GET | /api/indexer/candles?marketId=&interval=&from=&to= | Persisted OHLC candles | | GET | /api/veyronn/account?owner= | Margin account summary | | GET | /api/veyronn/portfolio?owner= | Positions, conditionals, strategies, and activity | | GET | /api/veyronn/protocol | Protocol and market state | | GET | /api/veyronn/prices | Latest accepted observations | | GET | /api/veyronn/prices/stream | Server-sent live price events | | GET | /api/veyronn/oracle-report?marketId= | Fresh report payload for a transaction builder |

Builders and intent routes

| Method | Path | Purpose | | --- | --- | --- | | POST | /api/veyronn/open-position | Validate, report-wrap, and simulate an open | | POST | /api/veyronn/position-action | Build a reduce, close, or related position action | | POST | /api/veyronn/execute-strategy | Build a multi-report strategy execution | | POST | /api/veyronn/intent/parse | Normalize natural language into a structured draft | | POST | /api/veyronn/delegated-intents | Verify and enqueue an EIP-712 delegated intent | | GET | /api/veyronn/delegated-intents?owner= | Read the wallet's queued and executed intents | | POST | /api/keeper/execute-conditional | Authenticated operator-triggered conditional check |

Historical bootstrap

GET /api/pyth/benchmarks is a server-side adapter for Pyth historical data. Provider keys remain on the server and responses are normalized before reaching chart code.

Error behavior

Routes return non-2xx status for invalid fields, unsupported markets, unavailable provider data, failed simulation, authorization failure, or service dependency failure. Clients should display the returned message and never assume a failed builder generated safe transaction data.