REST
API Reference
Local terminal endpoints for chat, search, assets, market aggregates, and health scores.
POST
/api/chatChat (RAG)
Stream an assistant reply. Injects retrieved RWA context. Falls back to mock RAG when no API key is set.
Example request
curl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "Compare OUSG and BUIDL yields" }
]
}'Response shape
{
// text/plain stream of assistant tokens
// Header X-RobinCore-Mode: mock-rag | openrouter
}GET
/api/searchSearch
Cross-entity search across assets, issuers, news, and regulations.
Example request
curl "http://localhost:3000/api/search?q=ondo&limit=10"
Response shape
{
"query": "ondo",
"count": 3,
"results": [
{
"kind": "asset",
"score": 100,
"id": "ast-ousg",
"slug": "ousg",
"title": "OUSG — Ondo Short-Term U.S. Government Bond Fund",
"subtitle": "Treasury",
"href": "/assets/ousg"
}
]
}GET
/api/assetsAssets
List all seed assets, or fetch one by slug/ticker.
Example request
curl "http://localhost:3000/api/assets" curl "http://localhost:3000/api/assets?slug=buidl"
Response shape
{
"count": 14,
"assets": [ /* Asset[] */ ]
}
// or single:
{
"asset": {
"slug": "buidl",
"ticker": "BUIDL",
"yield": 5.05,
"scores": { "overall": 96, "...": "..." }
}
}GET
/api/marketMarket snapshot
Aggregate TVL, average yield/health, breakdowns by type and chain, top assets.
Example request
curl "http://localhost:3000/api/market"
Response shape
{
"updatedAt": "2026-07-11T00:00:00.000Z",
"summary": {
"assetCount": 14,
"issuerCount": 8,
"totalTvl": 5200000000,
"totalTvlLabel": "$5.2B",
"avgYield": 5.12,
"avgHealth": 84.2
},
"byType": { "Treasury": { "count": 5, "tvl": 1 }, "...": "..." },
"byChain": { "ethereum": { "count": 10, "tvl": 1 } },
"topAssets": [ /* ... */ ]
}GET
/api/scoresHealth scores
Stored seed scores plus recomputed health dimensions for an asset slug.
Example request
curl "http://localhost:3000/api/scores?slug=ousg"
Response shape
{
"slug": "ousg",
"ticker": "OUSG",
"stored": { "overall": 89, "risk": 88, "...": "..." },
"computed": { "overall": 88, "risk": 90, "...": "..." },
"band": "Strong",
"updatedAt": "2026-07-11T00:00:00.000Z"
}