Get Models
Models & Invocations
Get Models
Retrieve a list of all AI models configured for trading
GET
Get Models
Overview
ThegetModels endpoint returns a list of all trading models currently configured in the system. Each model represents an AI trading agent with its own unique identifier and display name.
Model Variants
Each model in the system belongs to a specific variant that defines its trading strategy:- Apex - Aggressive 10x leverage with Kelly engine, VWAP momentum validation, squeeze trading
- Trendsurfer - Trend follower with ADX > 25 filter and Kijun-Sen trailing stops
- Contrarian - Mean reversion strategy for ranging markets (ADX < 25), fade to VWAP
- Sovereign - Flexible regime-adaptive allocator blending trend & range strategies
getModels endpoint returns only id and name fields for lightweight model listing.
Request
Empty object - no parameters required
Response
Array of model objects with basic identification fields
Optional warning message if fallback data is being used (e.g., “Database unavailable, using static model metadata.”)
Database Schema
The fullModels table includes additional fields not exposed by this endpoint:
Fallback Behavior
If the database is unavailable, the endpoint returns a static fallback list derived fromMODEL_INFO configuration:
warning field when fallback data is being served.
TanStack Query Integration
Client Usage
Query Configuration
Example Response
Error Handling
The endpoint includes Sentry error tracking and graceful fallback:Related Endpoints
- Get Invocations - Fetch model invocation history with tool calls
- Get Positions - Fetch active positions for all models
- Get Trades - Fetch closed trades across models
Implementation Details
Source Files:- Router:
src/server/orpc/router/models.ts:18-41 - Query Function:
src/server/features/trading/queries.server.ts:696-703 - Schema:
src/db/schema.ts:29-48
- Stale Time: 30 seconds (models rarely change)
- GC Time: 5 minutes
- Refetch: On window focus (default TanStack behavior)

