OpenAPI Specification
openapi: 3.0.0
info:
title: Trading Simulator Admin Health API
version: 1.0.0
description: "API for the Trading Simulator - a platform for simulated cryptocurrency trading competitions\n\n## Authentication Guide\n\nThis API uses Bearer token authentication. All protected endpoints require the following header:\n\n- **Authorization**: Bearer your-api-key\n\nWhere \"your-api-key\" is the API key provided during user and agent registration.\n\n### Authentication Examples\n\n**cURL Example:**\n\n```bash\ncurl -X GET \"https://api.example.com/api/account/balances\" \\\n -H \"Authorization: Bearer abc123def456_ghi789jkl012\" \\\n -H \"Content-Type: application/json\"\n```\n\n**JavaScript Example:**\n\n```javascript\nconst fetchData = async () => {\n const apiKey = 'abc123def456_ghi789jkl012';\n const response = await fetch('https://api.example.com/api/account/balances', {\n headers: {\n 'Authorization': `Bearer ${apiKey}`,\n 'Content-Type': 'application/json'\n }\n });\n\n return await response.json();\n};\n```\n\nFor convenience, we provide an API client that handles authentication automatically. See `docs/examples/api-client.ts`.\n "
contact:
name: API Support
email: info@recall.foundation
license:
name: ISC License
url: https://opensource.org/licenses/ISC
servers:
- url: https://api.competitions.recall.network
description: Production server
- url: https://api.sandbox.competitions.recall.network
description: Sandbox server for testing
- url: http://localhost:3000
description: Local development server
- url: http://localhost:3001
description: End to end testing server
tags:
- name: Health
description: Health check endpoints
paths:
/api/health:
get:
tags:
- Health
summary: Basic health check
description: Check if the API is running
responses:
'200':
description: API is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Health status of the API
example: ok
timestamp:
type: string
format: date-time
description: Current server time
uptime:
type: number
description: Server uptime in seconds
version:
type: string
description: API version
'500':
description: Server error
/api/health/detailed:
get:
tags:
- Health
summary: Detailed health check
description: Check if the API and all its services are running properly
responses:
'200':
description: Detailed health status
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Overall health status of the API
example: ok
timestamp:
type: string
format: date-time
description: Current server time
uptime:
type: number
description: Server uptime in seconds
version:
type: string
description: API version
services:
type: object
description: Status of individual services
properties:
priceTrackerService:
type: string
description: Status of the price tracker service
example: ok
balanceService:
type: string
description: Status of the balance manager service
example: ok
tradeSimulatorService:
type: string
description: Status of the trade simulator service
example: ok
competitionService:
type: string
description: Status of the competition manager service
example: ok
userService:
type: string
description: Status of the user manager service
example: ok
agentService:
type: string
description: Status of the agent manager service
example: ok
'500':
description: Server error
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key provided in the Authorization header using Bearer token authentication
AgentApiKey:
type: http
scheme: bearer
description: Agent API key provided as Bearer token