Unicorn Docs
Get StartedMarketsVaultDevelopersOperations

Developers

API and Indexer

Route map, indexed-vs-mock behavior, and persistence model.

Routes
Modes
Schema

Route map

The API exposes markets, chart, trades, vault, portfolio, indices, and simulation endpoints via Hono routers under /api.

Data modes

When RPC and DB are configured, responses are indexed/chain-backed. Otherwise endpoints fall back to mock data while preserving endpoint shape for frontend continuity.

Persistence schema

Postgres tables include markets, trades, candles, positions, vault snapshots, vault transactions, and indexer_state. Trade uniqueness is enforced by tx hash + log index.