{"swagger":"2.0","x-id":["reitit.swagger/default"],"info":{"title":"Formula Crash API","description":"API for Formula Crash Game Integration with Brand Partners","version":"1.0.0","contact":{"name":"Formula Crash Support","email":"support@formulacrash.com"},"license":{"name":"MIT"}},"tags":[{"name":"WebSocket","description":"Real-time WebSocket communication"},{"name":"Authentication","description":"Player authentication and session management"},{"name":"Game","description":"Game operations, stats, leaderboard, and provably fair"},{"name":"Status","description":"Health checks and admin broadcast"},{"name":"Transfer Wallet","description":"External wallet integration endpoints"},{"name":"Vyking","description":"Vyking aggregator Management API (X-API-KEY)"},{"name":"Pages","description":"Static HTML test and admin pages"}],"paths":{"/ws":{"get":{"responses":{"default":{"description":""}},"tags":["WebSocket"],"summary":"Open WebSocket game connection","description":"Upgrade to WebSocket for round events, bets, and heartbeats. Query: operator (slug)."}},"/auth/login":{"post":{"responses":{"default":{"description":""}},"tags":["Authentication"],"summary":"Login with username and password"}},"/auth/register":{"post":{"responses":{"default":{"description":""}},"tags":["Authentication"],"summary":"Register a new player account"}},"/auth/oauth/{provider}":{"get":{"responses":{"default":{"description":""}},"tags":["Authentication"],"summary":"Start OAuth login (provider URL)"}},"/auth/oauth/{provider}/callback":{"get":{"responses":{"default":{"description":""}},"tags":["Authentication"],"summary":"OAuth provider callback"}},"/auth/logout":{"post":{"responses":{"default":{"description":""}},"tags":["Authentication"],"summary":"Logout and invalidate session"}},"/status":{"get":{"responses":{"default":{"description":""}},"tags":["Status"],"summary":"Health (the load balancer's check): 200 when the database answers and, on the server running the game, the engine ticks; 503 otherwise or while draining for a deploy"}},"/users":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"User stats overview"}},"/payments":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Payment / bets stats overview"}},"/game":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Current game state / stats"}},"/leaderboard/{type}":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Leaderboard by type","description":"Query: limit, operator (slug). Types e.g. top-winners."}},"/stats":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Aggregate DB game stats"}},"/":{"get":{"responses":{"default":{"description":""}},"tags":["Pages"],"summary":"Admin / landing page"}},"/comparison-table":{"get":{"responses":{"default":{"description":""}},"tags":["Pages"],"summary":"Comparison table page"}},"/operator-admin":{"get":{"responses":{"default":{"description":""}},"tags":["Pages"],"summary":"Operator admin UI"}},"/api/pf/current":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Current round provably-fair public seeds"}},"/api/pf/reveal/{roundId}":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Reveal PF seeds for a finished round"}},"/api/pf/verify/{roundId}":{"get":{"responses":{"default":{"description":""}},"tags":["Game"],"summary":"Re-derive a finished round's crash point from its revealed seeds"}},"/vyking/games":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Game list for import (Management API)"}},"/vyking/game/start/real":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Start a real-money session; returns the launch URL"}},"/vyking/game/start/fun":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Start a play-money session; returns the launch URL"}},"/vyking/freespin/assign":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}},"/vyking/freespin/cancel":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}},"/vyking/freespin/schema":{"get":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"},"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}},"/vyking/freechip/assign":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}},"/vyking/freechip/cancel":{"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}},"/vyking/freechip/schema":{"get":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"},"post":{"responses":{"default":{"description":""}},"tags":["Vyking"],"summary":"Not supported (501)"}}}}