{"openapi":"3.0.3","info":{"title":"World Street API","description":"The complete public API of the World Street platform, served by the API Gateway — the sole entry point. Endpoints are grouped by owning service (rwa, …) at their public /v1/<service>/... paths and are directly executable here. Every response uses the standard `{ success, data | error }` envelope.\n\n**Currently unreachable services (docs omitted):** rwa, trade, world-street-vault, ai, chess, crosschain, earn, payment, ramping, market-square","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Gateway health","tags":["meta"],"responses":{"200":{"description":"Gateway is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/{service}/{path}":{"get":{"summary":"Proxy to a registered service (all methods, not just GET)","description":"Requests to /v1/<service>/* are forwarded to the owning microservice with the prefix stripped. Registered services appear in the docs dropdown. Unknown prefixes return 404; an unreachable service returns 502. The gateway forwards approved protocol headers such as Authorization and Idempotency-Key; each owning service verifies bearer tokens and resolves authorization context from its own database. Client-supplied identity or role headers are never forwarded.","tags":["routing"],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string"},"example":"rwa"},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Unknown service prefix (NOT_FOUND envelope)"},"429":{"description":"Rate limit exceeded (TOO_MANY_REQUESTS envelope)"},"502":{"description":"Downstream service unreachable (SERVICE_UNAVAILABLE envelope)"}}}},"/v1/arkjet/":{"get":{"tags":["arkjet"],"operationId":"service_info","responses":{"200":{"description":"Arkjet service identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ServiceInfo"}}}}}}},"/v1/arkjet/bets":{"post":{"tags":["arkjet"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_CreateBetRequest"}}},"required":true},"responses":{"200":{"description":"Bet accepted or idempotently recovered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BetView"}}}}}}},"/v1/arkjet/bets/balance":{"get":{"tags":["arkjet"],"operationId":"balance","responses":{"200":{"description":"Authenticated player's Arkjet balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BalanceView"}}}}}}},"/v1/arkjet/bets/current":{"get":{"tags":["arkjet"],"operationId":"current","responses":{"200":{"description":"Authenticated player's active bets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BetList"}}}}}}},"/v1/arkjet/bets/history":{"get":{"tags":["arkjet"],"operationId":"history","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"Authenticated player's bet history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BetList"}}}}}}},"/v1/arkjet/bets/{bet_id}":{"delete":{"tags":["arkjet"],"operationId":"cancel","parameters":[{"name":"bet_id","in":"path","description":"Bet UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Bet cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BetView"}}}}}}},"/v1/arkjet/bets/{bet_id}/cashout":{"post":{"tags":["arkjet"],"operationId":"cashout","parameters":[{"name":"bet_id","in":"path","description":"Bet UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authoritative cashout accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BetView"}}}}}}},"/v1/arkjet/capabilities":{"get":{"tags":["arkjet"],"operationId":"capabilities","responses":{"200":{"description":"Enabled Arkjet capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_Capabilities"}}}}}}},"/v1/arkjet/chat":{"get":{"tags":["arkjet"],"operationId":"feed","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"Recent Arkjet chat and presence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChatFeed"}}}}}}},"/v1/arkjet/chat/messages":{"post":{"tags":["arkjet"],"operationId":"create_message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_CreateMessageRequest"}}},"required":true},"responses":{"200":{"description":"Chat message accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChatMessage"}}}}}}},"/v1/arkjet/chat/messages/{message_id}/like":{"put":{"tags":["arkjet"],"operationId":"like_message","parameters":[{"name":"message_id","in":"path","description":"Chat message UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message liked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LikeResult"}}}}}},"delete":{"tags":["arkjet"],"operationId":"unlike_message","parameters":[{"name":"message_id","in":"path","description":"Chat message UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message unliked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LikeResult"}}}}}}},"/v1/arkjet/chat/presence":{"post":{"tags":["arkjet"],"operationId":"heartbeat","responses":{"200":{"description":"Presence refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_Presence"}}}}}}},"/v1/arkjet/chicken/autoplay":{"post":{"tags":["arkjet"],"operationId":"autoplay","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenAutoplayRequest"}}},"required":true},"responses":{"200":{"description":"One idempotent Chicken session played to the requested cashout step","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}}}}}}},"/v1/arkjet/chicken/proofs/verify":{"post":{"tags":["arkjet"],"operationId":"verify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenProof"}}},"required":true},"responses":{"200":{"description":"Independent Chicken proof verification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenVerificationResult"}}}}}}},"/v1/arkjet/chicken/proofs/{session_id}":{"get":{"tags":["arkjet"],"operationId":"proof","parameters":[{"name":"session_id","in":"path","description":"Settled Chicken session UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public revealed Chicken fairness proof","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenProof"}}}}}}},"/v1/arkjet/chicken/rules":{"get":{"tags":["arkjet"],"operationId":"rules","responses":{"200":{"description":"Chicken fairness, RTP, ladders, and liability rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenRules"}}}}}}},"/v1/arkjet/chicken/sessions":{"post":{"tags":["arkjet"],"operationId":"start","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_StartChickenRequest"}}},"required":true},"responses":{"200":{"description":"Chicken session started or idempotently recovered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}}}}}}},"/v1/arkjet/chicken/sessions/active":{"get":{"tags":["arkjet"],"operationId":"active","responses":{"200":{"description":"Authenticated player's active Chicken session","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}]}}}}}}},"/v1/arkjet/chicken/sessions/history":{"get":{"tags":["arkjet"],"operationId":"history","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64","minimum":0}}],"responses":{"200":{"description":"Authenticated player's paginated Chicken history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenHistory"}}}}}}},"/v1/arkjet/chicken/sessions/{session_id}/cashout":{"post":{"tags":["arkjet"],"operationId":"cashout","parameters":[{"name":"session_id","in":"path","description":"Chicken session UUID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenActionRequest"}}},"required":true},"responses":{"200":{"description":"Active Chicken session cashed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}}}}}}},"/v1/arkjet/chicken/sessions/{session_id}/steps":{"post":{"tags":["arkjet"],"operationId":"step","parameters":[{"name":"session_id","in":"path","description":"Chicken session UUID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenActionRequest"}}},"required":true},"responses":{"200":{"description":"Exactly one Chicken step resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}}}}}}},"/v1/arkjet/fairness/commitments/current":{"get":{"tags":["arkjet"],"operationId":"current_commitment","responses":{"200":{"description":"Current pre-round commitment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_CurrentCommitment"}}}},"404":{"description":"No round is currently committed"}}}},"/v1/arkjet/fairness/proofs/{round_id}":{"get":{"tags":["arkjet"],"operationId":"proof","parameters":[{"name":"round_id","in":"path","description":"Arkjet round UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revealed round proof","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_FairnessProof"}}}},"404":{"description":"Round proof is unknown or not yet revealed"}}}},"/v1/arkjet/fairness/rules":{"get":{"tags":["arkjet"],"operationId":"rules","responses":{"200":{"description":"Versioned Arkjet fairness rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_FairnessRules"}}}}}}},"/v1/arkjet/fairness/verify":{"post":{"tags":["arkjet"],"operationId":"verify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_FairnessProof"}}},"required":true},"responses":{"200":{"description":"Independent proof verification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_VerificationResult"}}}}}}},"/v1/arkjet/funding/config":{"get":{"tags":["arkjet"],"operationId":"config","responses":{"200":{"description":"Arkjet wallet funding configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_FundingConfigView"}}}}}}},"/v1/arkjet/funding/deposits/confirm":{"post":{"tags":["arkjet"],"operationId":"confirm_deposit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ConfirmDepositRequest"}}},"required":true},"responses":{"200":{"description":"Confirmed USDC transfer credited to Arkjet NGN balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_DepositView"}}}}}}},"/v1/arkjet/funding/withdrawals":{"post":{"tags":["arkjet"],"operationId":"create_withdrawal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_CreateWithdrawalRequest"}}},"required":true},"responses":{"200":{"description":"Arkjet NGN balance reserved for a USDC wallet payout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_WithdrawalView"}}}}}}},"/v1/arkjet/health":{"get":{"tags":["arkjet"],"operationId":"health_check","responses":{"200":{"description":"Arkjet process is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_HealthStatus"}}}}}}},"/v1/arkjet/ready":{"get":{"tags":["arkjet"],"operationId":"readiness_check","responses":{"200":{"description":"Arkjet dependencies are ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReadinessStatus"}}}},"503":{"description":"Arkjet database is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReadinessStatus"}}}}}}},"/v1/arkjet/risk/chicken-reserve":{"get":{"tags":["arkjet"],"operationId":"chicken_reserve","responses":{"200":{"description":"Isolated Chicken operator reserve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReserveView"}}}}}}},"/v1/arkjet/risk/chicken-reserve/allocations":{"post":{"tags":["arkjet"],"operationId":"allocate_chicken_reserve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LedgerCreditRequest"}}},"required":true},"responses":{"200":{"description":"Move unreserved Arkjet funds into the Chicken reserve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReserveView"}}}}}}},"/v1/arkjet/risk/chicken-reserve/recalls":{"post":{"tags":["arkjet"],"operationId":"recall_chicken_reserve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LedgerCreditRequest"}}},"required":true},"responses":{"200":{"description":"Return unexposed Chicken funds to the Arkjet reserve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReserveView"}}}}}}},"/v1/arkjet/risk/players/{player_id}/credits":{"post":{"tags":["arkjet"],"operationId":"credit_player","parameters":[{"name":"player_id","in":"path","description":"Authenticated Privy player ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LedgerCreditRequest"}}},"required":true},"responses":{"200":{"description":"Idempotent player ledger credit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_BalanceView"}}}}}}},"/v1/arkjet/risk/reserve":{"get":{"tags":["arkjet"],"operationId":"reserve","responses":{"200":{"description":"Authoritative operator reserve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReserveView"}}}}}}},"/v1/arkjet/risk/reserve/credits":{"post":{"tags":["arkjet"],"operationId":"credit_reserve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_LedgerCreditRequest"}}},"required":true},"responses":{"200":{"description":"Idempotent operator reserve credit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_ReserveView"}}}}}}},"/v1/arkjet/risk/rules":{"get":{"tags":["arkjet"],"operationId":"rules","responses":{"200":{"description":"Arkjet liquidity and solvency contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_RiskRules"}}}}}}},"/v1/arkjet/rounds/current":{"get":{"tags":["arkjet"],"operationId":"current","responses":{"200":{"description":"Current Arkjet round","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_RoundView"}}}},"404":{"description":"No Arkjet round is active"}}}},"/v1/arkjet/rounds/history":{"get":{"tags":["arkjet"],"operationId":"history","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"beforeSequence","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64","minimum":0}}],"responses":{"200":{"description":"Completed Arkjet rounds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_RoundHistory"}}}}}}},"/v1/arkjet/rounds/{round_id}":{"get":{"tags":["arkjet"],"operationId":"get","parameters":[{"name":"round_id","in":"path","description":"Arkjet round UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Arkjet round","content":{"application/json":{"schema":{"$ref":"#/components/schemas/arkjet_RoundView"}}}},"404":{"description":"Arkjet round not found"}}}},"/v1/perp/health":{"get":{"summary":"Service health","tags":["perp"],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_HealthResponse"}}}}}}},"/v1/perp/waitlist":{"post":{"summary":"Join the perp marketing waitlist","description":"Records an email for pre-launch marketing. Idempotent per email: a repeat signup returns 200 with `alreadyJoined: true` instead of an error. New signups fire `perp.waitlist.joined`.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_JoinWaitlistRequest"}}}},"responses":{"200":{"description":"Email was already on the waitlist (idempotent repeat)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WaitlistJoinResponse"}}}},"201":{"description":"Email added to the waitlist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WaitlistJoinResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Waitlist datastore unavailable (retryable)"}}},"get":{"summary":"List waitlist signups (ADMIN — emails are PII)","description":"Operator-only listing of collected emails, newest first. Requires the WAITLIST_ADMIN_KEY as a bearer token (use Authorize). Returns 404 when no admin key is configured on the service.","tags":["perp"],"security":[{"perp_waitlistAdminKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip (paging)."}],"responses":{"200":{"description":"One page of signups plus the total count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WaitlistListResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"401":{"description":"Missing or wrong admin bearer key (UNAUTHORIZED)"},"404":{"description":"Listing disabled — no WAITLIST_ADMIN_KEY configured"},"502":{"description":"Waitlist datastore unavailable (retryable)"}}}},"/v1/perp/waitlist/{email}":{"delete":{"summary":"Remove an email from the waitlist (ADMIN)","description":"Operator-only removal (test data, unsubscribe requests). URL-encode the address (trader%40example.com). Requires the WAITLIST_ADMIN_KEY as a bearer token.","tags":["perp"],"security":[{"perp_waitlistAdminKey":[]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","format":"email"},"example":"trader@example.com","description":"The email to remove (normalized server-side)."}],"responses":{"200":{"description":"Email removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WaitlistDeleteResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"401":{"description":"Missing or wrong admin bearer key (UNAUTHORIZED)"},"404":{"description":"Email not on the waitlist, or no WAITLIST_ADMIN_KEY configured"},"502":{"description":"Waitlist datastore unavailable (retryable)"}}}},"/v1/perp/ark/wallet/{address}":{"get":{"summary":"Get-or-create the perp wallet for an address","description":"Perp has no auth system of its own — the wallet address IS the identity. Every prepare/submit call needs the internal walletId this returns.","tags":["perp"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The wallet row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WalletResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"}}}},"/v1/perp/ark/assets":{"get":{"summary":"List active tradable assets","tags":["perp"],"responses":{"200":{"description":"Cached asset metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_AssetListResponse"}}}}}}},"/v1/perp/ark/prices":{"get":{"summary":"Live mid prices for every asset","tags":["perp"],"responses":{"200":{"description":"{ [symbol]: midPriceString }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkPricesResponse"}}}},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/market-contexts":{"get":{"summary":"Live market stats for every active asset (mark, 24h change basis, funding, volume, open interest)","description":"One upstream market-data call, joined to the active asset cache by assetIndex — the trading UI's market list data source.","tags":["perp"],"responses":{"200":{"description":"Array of per-asset market stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_MarketContextListResponse"}}}},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/funding-history/{symbol}":{"get":{"summary":"Market-wide funding-rate history for one asset","description":"Not a wallet's own funding payments — the raw per-sample funding rate the venue published for this market. Drives the trading UI's Funding chart. endTime unset means \"through now\".","tags":["perp"],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string"}},{"name":"startTime","in":"query","required":true,"schema":{"type":"integer"}},{"name":"endTime","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Array of funding samples, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_FundingHistoryResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/candles/{symbol}":{"get":{"summary":"OHLCV candles for one asset","description":"Verified live against the venue's own candle snapshot — t is the OPEN time, T is the close time; v is total volume in the base asset, never USD. Drives the trading UI's chart. endTime unset means \"through now\".","tags":["perp"],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string"}},{"name":"interval","in":"query","required":true,"schema":{"type":"string","enum":["1m","3m","5m","15m","30m","1h","2h","4h","8h","12h","1d","3d","1w","1M"]}},{"name":"startTime","in":"query","required":true,"schema":{"type":"integer"}},{"name":"endTime","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Array of candles, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_CandlesResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/account-state/{address}":{"get":{"summary":"A wallet's live margin/balance state","tags":["perp"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Live margin summary, withdrawable balance, and open positions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_AccountStateResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/arbitrum-balance/{address}":{"get":{"summary":"A wallet's live Arbitrum USDC balance","description":"Reads the destination chain directly rather than the Dextopus-webhook-driven treasury ledger — the frontend polls this to confirm a Base deposit actually landed, since a webhook can be missed, delayed, or (in local development) unreachable.","tags":["perp"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Live balance, decimal string","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArbitrumBalanceResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Arbitrum RPC unavailable (retryable)"}}}},"/v1/perp/ark/wallets/{walletId}/positions":{"get":{"summary":"A wallet's open positions with live valuation","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Open positions with mark price and unrealized PnL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkPositionListResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"}}}},"/v1/perp/ark/wallets/{walletId}/orders":{"get":{"summary":"A wallet's orders","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Orders, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkOrderListResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"}}}},"/v1/perp/ark/wallets/{walletId}/positions/closed":{"get":{"summary":"A wallet's closed positions — trading history","description":"Closed positions only, newest closed first — open positions are never included (see /ark/wallets/{walletId}/positions for those). No live valuation: everything about a closed position is already final.","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Closed positions, newest closed first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkClosedPositionListResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"}}}},"/v1/perp/ark/orders/prepare":{"post":{"summary":"Prepare an order (entry, optionally batched with TP/SL) for the client to sign","description":"Validates the request and available margin, and returns an unsigned action for the CLIENT to sign with its own embedded wallet — this backend holds no signing key of any kind (see src/signing/README.md). `reduceOnly: true` is set on both the take-profit and stop-loss legs. Throws with `details.reason: \"insufficient_margin\"` if the balance is short — bridge via /ark/bridge/prepare first and retry. Not yet the live trading path — see the service README's rebuild status note.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PlaceOrderRequest"}}}},"responses":{"200":{"description":"Unsigned action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedOrderResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/orders/submit":{"post":{"summary":"Submit a client-signed order action","description":"Recovers the real signer from the signature and rejects a mismatch with the claimed wallet before relaying the order onward. `prepared` is echoed back verbatim from /ark/orders/prepare.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitOrderRequest"}}}},"responses":{"201":{"description":"Order(s) submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PlaceOrderResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/leverage/prepare":{"post":{"summary":"Prepare a leverage/margin-mode update for the client to sign","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareLeverageRequest"}}}},"responses":{"200":{"description":"Unsigned action for the client to sign, or { alreadySet: true } if unchanged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedLeverageResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/leverage/submit":{"post":{"summary":"Submit a client-signed leverage update","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitLeverageRequest"}}}},"responses":{"200":{"description":"Leverage updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_UpdatedResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/orders/cancel/prepare":{"post":{"summary":"Prepare cancelling a resting order for the client to sign","description":"The order must already carry an externalOrderId (set once it has been acknowledged as resting or filled) — an order still in flight has nothing to cancel by id yet.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareCancelOrderRequest"}}}},"responses":{"200":{"description":"Unsigned cancel action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedCancelResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/orders/cancel/submit":{"post":{"summary":"Submit a client-signed cancel action","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitCancelOrderRequest"}}}},"responses":{"200":{"description":"Order cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkOrderResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/positions/close/prepare":{"post":{"summary":"Prepare manually closing an open position for the client to sign","description":"Builds a single reduce-only IOC order in the opposite direction, sized to the position (or a smaller partial-close size). Does NOT check margin — closing frees margin, it never consumes it.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareClosePositionRequest"}}}},"responses":{"200":{"description":"Unsigned reduce-only order action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedClosePositionResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/positions/close/submit":{"post":{"summary":"Submit a client-signed manual close","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitClosePositionRequest"}}}},"responses":{"201":{"description":"Close order submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ClosePositionResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/orders/trigger/prepare":{"post":{"summary":"Prepare a standalone TP or SL trigger order for the client to sign","description":"Adds a new take-profit or stop-loss to an already-open position, or replaces one: there is no in-place \"modify\" action, so replacing an existing trigger is the caller's job — cancel the old one via /ark/orders/cancel first, then call this for the new one.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareTriggerOrderRequest"}}}},"responses":{"200":{"description":"Unsigned reduce-only trigger order action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedTriggerOrderResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/orders/trigger/submit":{"post":{"summary":"Submit a client-signed TP/SL trigger order","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitTriggerOrderRequest"}}}},"responses":{"201":{"description":"Trigger order submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ArkOrderResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/bridge/prepare":{"post":{"summary":"Prepare an Arbitrum -> trading balance bridge deposit","description":"The bridge deposit is a real EVM transaction — the one action in this flow that needs gas. Returns unsigned calldata (sized to the wallet's full Arbitrum USDC balance) for the client to send itself via its own sponsored-EVM flow (EIP-7702 + Alchemy); this backend never submits it. Returns `{ needed: false }` if the trading balance already covers the amount.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareBridgeRequest"}}}},"responses":{"200":{"description":"Unsigned calldata for the client to send, or { needed: false }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedBridgeResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/bridge/confirm":{"post":{"summary":"Record a broadcast bridge deposit and start confirmation polling","description":"Called once the client has already sent the sponsored transfer itself and knows its tx hash. Records the deposit and polls the trading balance until it is credited.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ConfirmBridgeRequest"}}}},"responses":{"202":{"description":"Deposit recorded and queued for confirmation polling","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_BridgeResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/withdrawals/prepare":{"post":{"summary":"Prepare a trading-balance -> Arbitrum withdrawal for the client to sign","description":"Checks the wallet's free withdrawable balance and returns an unsigned withdraw3 action. This is an off-chain signed message, not an EVM transaction — no gas involved.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareWithdrawalRequest"}}}},"responses":{"200":{"description":"Unsigned withdraw3 action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedWithdrawalResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/withdrawals/submit":{"post":{"summary":"Submit a client-signed withdrawal","description":"Recovers the real signer and verifies the destination is the wallet's own address (this platform never routes a withdrawal anywhere else) before relaying it onward and queueing confirmation polling.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitWithdrawalRequest"}}}},"responses":{"202":{"description":"Withdrawal accepted and queued for confirmation polling","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_WithdrawalResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/wallets/{walletId}/withdrawals/pending":{"get":{"summary":"A withdrawal that landed on Arbitrum but never finished forwarding to Base","description":"Lets the client resume a withdrawal's last hop after a page reload or a poll timeout — see WithdrawalService.getPendingWithdrawal. data is null when there is nothing to resume.","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The most recent unresolved withdrawal, or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PendingWithdrawalResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/wallets/{walletId}/builder-fee":{"get":{"summary":"A wallet's builder-fee approval status","description":"The max builder fee (tenths of a basis point) the wallet has already approved for the platform treasury, and whether it covers what orders currently attach — see PERPS_BUILDER_FEE_TENTHS_BPS. approved: false means every order this wallet places carries no builder fee at all (an order that attaches an unapproved fee is rejected outright, so TradingService omits it rather than risk that).","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Builder-fee approval status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_BuilderFeeStatusResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/builder-fee/prepare":{"post":{"summary":"Prepare a builder-fee approval for the client to sign","description":"Returns an unsigned approveBuilderFee action granting the platform treasury a fee up to the protocol cap (0.1% on perps) — a one-time, user-signed EIP-712 action, the same family as withdraw3. Off-chain signed message, not an EVM transaction — no gas involved.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareBuilderFeeApprovalRequest"}}}},"responses":{"200":{"description":"Unsigned approveBuilderFee action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedBuilderFeeApprovalResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Builder fee collection is not configured, or service unavailable"}}}},"/v1/perp/ark/builder-fee/submit":{"post":{"summary":"Submit a client-signed builder-fee approval","description":"Recovers the real signer and verifies the approved builder is the platform treasury (never routes an approval anywhere else) before relaying it onward.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitBuilderFeeApprovalRequest"}}}},"responses":{"202":{"description":"Builder-fee approval accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_BuilderFeeApprovalResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/wallets/{walletId}/abstraction-mode":{"get":{"summary":"A wallet's account-abstraction mode","description":"The wallet's current mode (disabled/unifiedAccount/portfolioMargin) and whether that mode is eligible to collect builder fees — the venue requires disabled (Manual/Standard) mode for that.","tags":["perp"],"parameters":[{"name":"walletId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Account-abstraction mode status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_AbstractionModeStatusResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/abstraction-mode/prepare":{"post":{"summary":"Prepare an account-abstraction-mode change for the client to sign","description":"Returns an unsigned userSetAbstraction action — a user-signed EIP-712 action, the same family as approveBuilderFee/withdraw3. Off-chain signed message, not an EVM transaction — no gas involved.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PrepareAbstractionModeRequest"}}}},"responses":{"200":{"description":"Unsigned userSetAbstraction action for the client to sign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_PreparedAbstractionModeResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/abstraction-mode/submit":{"post":{"summary":"Submit a client-signed account-abstraction-mode change","description":"Recovers the real signer and verifies it matches the wallet requesting the change before relaying it onward.","tags":["perp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_SubmitAbstractionModeRequest"}}}},"responses":{"202":{"description":"Account-abstraction-mode change accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_AbstractionModeChangeResponse"}}}},"400":{"$ref":"#/components/responses/perp_BadRequest"},"502":{"description":"Service unavailable (retryable)"}}}},"/v1/perp/ark/admin/rewards":{"get":{"summary":"Accrued builder-fee revenue (ADMIN)","description":"The treasury's accrued Hyperliquid builder-fee revenue — unclaimed, already-claimed, and total. Hyperliquid accrues this in its own referral-program state, separately from the treasury's spendable clearinghouseState balance; unclaimedRewards only becomes spendable once claimed via POST /ark/admin/rewards/claim. Requires the PERPS_ADMIN_KEY as a bearer token (use Authorize). Returns 404 when no admin key is configured on the service.","tags":["perp"],"security":[{"perp_perpsAdminKey":[]}],"responses":{"200":{"description":"Accrued reward totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_RewardsStatusResponse"}}}},"401":{"description":"Missing or wrong admin bearer key (UNAUTHORIZED)"},"404":{"description":"Disabled — no PERPS_ADMIN_KEY configured"},"502":{"description":"Service unavailable, OR reward tracking not configured (no PERPS_TREASURY_ADDRESS)"}}}},"/v1/perp/ark/admin/rewards/claim":{"post":{"summary":"Claim all accrued builder-fee revenue (ADMIN)","description":"Signs and submits Hyperliquid's claimRewards action with the treasury's OWN key (PERPS_TREASURY_PRIVATE_KEY) — the one exception to this service never holding a signing key, since a claim is the platform claiming its own revenue, not a user action. Claims WHATEVER has accrued (no partial-amount claims); returns the fresh post-claim status. Requires the PERPS_ADMIN_KEY as a bearer token. Returns 404 when no admin key is configured.","tags":["perp"],"security":[{"perp_perpsAdminKey":[]}],"responses":{"200":{"description":"Post-claim reward totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_RewardsStatusResponse"}}}},"401":{"description":"Missing or wrong admin bearer key (UNAUTHORIZED)"},"404":{"description":"Disabled — no PERPS_ADMIN_KEY configured"},"502":{"description":"Service unavailable, OR claiming not configured (no PERPS_TREASURY_ADDRESS / PERPS_TREASURY_PRIVATE_KEY)"}}}},"/v1/gas-sponsor/capabilities":{"get":{"tags":["gas-sponsor"],"operationId":"get_capabilities","responses":{"200":{"description":"Current scaffold capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gas-sponsor_CapabilitiesResponse"}}}}}}},"/v1/gas-sponsor/health":{"get":{"tags":["gas-sponsor"],"operationId":"health_check","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gas-sponsor_HealthStatus"}}}}}}},"/v1/gas-sponsor/solana/sponsor":{"post":{"tags":["gas-sponsor"],"operationId":"sponsor_solana","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/gas-sponsor_SolanaSponsorRequest"}}},"required":true},"responses":{"200":{"description":"Signs a Solana transaction with the configured sponsor wallet as fee payer; submits immediately when every other required signature is already present, otherwise returns a partially signed transaction for the client to finish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gas-sponsor_SolanaSponsorResponse"}}}}}}},"/v1/kash/health":{"get":{"summary":"Service health","tags":["kash"],"responses":{"200":{"description":"Service is healthy"}}}},"/v1/kash/desk":{"get":{"summary":"On-chain desk snapshot: chain id, contract addresses, price, pause state, reserve","description":"The single integration surface for on-chain buying/selling — the frontend never talks to the chain. 503 until KASH_SALE_ADDRESS/KASH_REDEEM_ADDRESS are configured.","tags":["kash"],"responses":{"200":{"description":"Desk info"},"503":{"description":"Desk not configured"}}}},"/v1/kash/desk/buy/quote":{"get":{"summary":"Price a buy: usdcAmount (decimal string) → KASH+ out (decimal + exact wei)","tags":["kash"],"parameters":[{"name":"usdcAmount","in":"query","required":true,"schema":{"type":"string"},"example":"70"}],"responses":{"200":{"description":"Quote"}}}},"/v1/kash/desk/sell/quote":{"get":{"summary":"Price a sell: kashAmount (decimal string) → USDC out, reserve and coverage","tags":["kash"],"parameters":[{"name":"kashAmount","in":"query","required":true,"schema":{"type":"string"},"example":"10"}],"responses":{"200":{"description":"Quote"}}}},"/v1/kash/desk/buy/prepare":{"post":{"summary":"Step 1 of a buy: the EIP-712 USDC-permit payload the wallet signs","description":"Returns typedData for eth_signTypedData_v4 (USDC domain \"USD Coin\"/\"2\", built server-side) plus the deadline and a quote. Sign it, then POST /desk/buy/tx. 409 while the sale desk is paused.","tags":["kash"],"responses":{"200":{"description":"Typed data to sign"},"409":{"description":"Desk paused"}}}},"/v1/kash/desk/buy/tx":{"post":{"summary":"Step 2 of a buy: the encoded { chainId, to, data } transaction the wallet submits","description":"Pass back the deadline from prepare and the 65-byte signature. minKashOutWei defaults to the live quote.","tags":["kash"],"responses":{"200":{"description":"Unsigned transaction"}}}},"/v1/kash/desk/sell/prepare":{"post":{"summary":"Step 1 of a sell: the EIP-712 KASH+-permit payload the wallet signs","description":"Returns typedData for eth_signTypedData_v4 — note the KASH+ permit domain is \"Kash\"/\"1\" (not the display name), built server-side so clients cannot get it wrong. 409 while the redeem desk is paused or the reserve cannot cover the payout.","tags":["kash"],"responses":{"200":{"description":"Typed data to sign"},"409":{"description":"Paused or reserve uncovered"}}}},"/v1/kash/desk/sell/tx":{"post":{"summary":"Step 2 of a sell: the encoded { chainId, to, data } transaction the wallet submits","tags":["kash"],"responses":{"200":{"description":"Unsigned transaction"}}}},"/v1/kash/purchases":{"post":{"externalDocs":{"description":"Settle the payment first: send usdcAmount of USDC from the buyer wallet to chain.paymentAddress (from GET /status), wait for the receipt, then POST that tx hash here. Verification requires from == wallet, so the buyer must sign the transfer themselves.","url":"https://basescan.org"},"summary":"Buy KSH with mock USDC (unlocks activity earning)","description":"Mints KSH at the current oracle price and credits the treasury with the USDC. Holding the resulting balance is what unlocks — and multiplies — activity earning.","tags":["kash"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_PurchaseRequest"}}}},"responses":{"201":{"description":"KSH purchased","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_PurchaseResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"},"409":{"description":"Sale allocation exhausted (CONFLICT)"},"502":{"description":"Price oracle unavailable or stale (retryable)"}}},"get":{"summary":"List purchases (optionally for one wallet)","tags":["kash"],"parameters":[{"name":"wallet","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200,"default":50}}],"responses":{"200":{"description":"Purchases, newest first"}}}},"/v1/kash/purchases/quote":{"get":{"summary":"Preview KSH received for a USDC amount","tags":["kash"],"parameters":[{"name":"amount","in":"query","required":true,"schema":{"type":"string"},"example":"10"}],"responses":{"200":{"description":"Quote (no state change)"},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/activities/quote":{"get":{"summary":"Preview: a $X activity earns Y points ⇒ Z KSH at the current price","tags":["kash"],"parameters":[{"name":"amount","in":"query","required":true,"schema":{"type":"string"},"example":"100","description":"USD notional to preview."}],"responses":{"200":{"description":"Points, marginal breakdown, reward USD, KSH at current price"},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/subscriptions/tiers":{"get":{"summary":"Subscription catalogue (tier, monthly price)","tags":["kash"],"responses":{"200":{"description":"Tiers, ascending; tier 1 is the free default"}}}},"/v1/kash/subscriptions/{wallet}":{"get":{"summary":"A wallet's subscription: effective tier, expiry, active flag","tags":["kash"],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"Subscription status (tier 1 when none or lapsed)"},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/subscriptions":{"post":{"summary":"Buy or extend a subscription tier","description":"The tier CAPS which volume-tier rate the wallet can earn at, so upgrading only pays off for a wallet whose volume already reaches past its cap. Tiers lapse at period end rather than auto-renewing. In real-USDC mode `paymentTxHash` must be a verified on-chain transfer to the treasury.","tags":["kash"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_SubscribeRequest"}}}},"responses":{"201":{"description":"Subscription active"},"400":{"$ref":"#/components/responses/kash_BadRequest"},"409":{"description":"An active higher tier is already in place (CONFLICT)"}}}},"/v1/kash/activities":{"post":{"summary":"Simulate a monetized activity (DEMO mode only)","description":"Accrues Kash + for a buy/sell/trade of the given USD notional exactly as a real broker event would. Returns 201 when a reward was applied and 200 with a `reason` when a guard blocked it (e.g. `locked` — the wallet holds no KSH). Disabled (404) when KASH_DEMO_MODE is false.","tags":["kash"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ActivityRequest"}}}},"responses":{"200":{"description":"No reward — see `reason`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_AccrualResponse"}}}},"201":{"description":"Reward accrued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_AccrualResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"},"401":{"description":"Operator bearer key required (real-money modes)"},"404":{"description":"Demo mode disabled"}}}},"/v1/kash/accounts/{wallet}":{"get":{"summary":"A wallet's Kash + standing: balance, tier, convertibility, progress","tags":["kash"],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"Account profile (zeros for unknown wallets)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_AccountResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/accounts/{wallet}/ledger":{"get":{"summary":"A wallet's purchase/reward/conversion ledger (newest first)","tags":["kash"],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Ledger entries"},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/settlements/claim":{"post":{"summary":"Settle this wallet's points into KSH now","description":"Converts the caller's accrued points to KSH at the current price and mints them. Unlike POST /settlements/run — which prices an entire settlement period at one instant and needs the operator key — this claims only the named wallet, so it carries no admin key. The tradeoff is that the holder chooses the moment they are priced at. No on-chain event proves who is claiming, so `signature` must recover to `wallet` over the message `World Street — claim Kash settlement\\nwallet: <wallet, lowercased>\\nts: <timestamp>`, signed within 5 minutes of `timestamp`.","tags":["kash"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet","signature","timestamp"],"properties":{"wallet":{"type":"string","example":"0x1111111111111111111111111111111111111111"},"signature":{"type":"string","description":"65-byte personal_sign signature over the claim message","example":"0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab"},"timestamp":{"type":"integer","description":"Unix ms the message was signed at — must be within 5 minutes of now"}}}}}},"responses":{"201":{"description":"Settlement report — wallets, KSH minted, mint tx"},"400":{"$ref":"#/components/responses/kash_BadRequest"},"401":{"description":"Signature missing, expired, or does not match wallet"}}}},"/v1/kash/settlements/current":{"get":{"summary":"The live period: points accrued so far and what they would pay","description":"The settlement period currently accruing (KASH_SETTLEMENT_PERIOD_SECONDS, ~30 days by default). Its KSH figure is INDICATIVE — points are only priced at the settlement instant, so this moves with the oracle until then.","tags":["kash"],"responses":{"200":{"description":"Settlement-period summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_SettlementResponse"}}}}}}},"/v1/kash/settlements/{weekKey}":{"get":{"summary":"A specific settlement period, by the full ISO timestamp of its start","tags":["kash"],"parameters":[{"name":"weekKey","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"example":"2026-08-01T00:00:00.000Z"}],"responses":{"200":{"description":"Settlement-period summary — zeros for a period that never accrued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_SettlementResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/rail/debits":{"post":{"summary":"Settle a KASH payment for a sibling service (rail key + permit)","description":"The rail Market Square settles stream tickets, ARK Store orders and verification renewals through — none of which the calling service can settle itself, because it holds no balances. Requires TWO things and neither is sufficient alone: the rail key proves the CALLER is a trusted service, and the EIP-2612 permit proves the WALLET HOLDER agreed to this spend. A backend able to move a balance on its key alone would be custodial, which this platform is not (ADR-0005). A debit BURNS, because the KashController exposes mint/mintBatch/burn and no transfer — so in-app spends are a supply sink. Idempotent on idempotencyKey: a replay returns the ORIGINAL outcome, failures included, and never charges twice.","tags":["kash"],"security":[{"kash_railKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet","amountKash","reason","idempotencyKey"],"properties":{"wallet":{"type":"string","example":"0xabc..."},"amountKash":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Decimal string, never a number — floats do not hold money."},"reason":{"type":"string","example":"ticket_purchase"},"idempotencyKey":{"type":"string","description":"The caller's own reference for this ONE movement. Must be unique per payment and stable across their retries."},"refType":{"type":"string","example":"ticket"},"refId":{"type":"string"},"permit":{"type":"object","description":"The holder's EIP-2612 consent, signed off-chain and gasless for them. Required in ethers mode for any wallet but the operator's own.","properties":{"deadline":{"type":"integer"},"v":{"type":"integer"},"r":{"type":"string"},"s":{"type":"string"}}}}}}}},"responses":{"201":{"description":"The settled debit"},"400":{"description":"VALIDATION_ERROR — malformed amount, or a zero payment"},"401":{"description":"Rail bearer key required"},"404":{"description":"KASH_RAIL_API_KEY unset — the rail is not enabled here"}}}},"/v1/kash/rail/debits/{idempotencyKey}":{"get":{"summary":"Look up a debit the caller is unsure about (rail key)","description":"Reconciliation for an in-doubt movement. Answers `{ found: false }` for an unknown key rather than 404, so a caller can tell \"this debit never landed\" (fail the order) apart from \"the route is not deployed\" (retry later). A bare 404 conflates the two, and the caller's next move is opposite in each case.","tags":["kash"],"security":[{"kash_railKey":[]}],"parameters":[{"name":"idempotencyKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The debit, or { found: false }"},"401":{"description":"Rail bearer key required"},"404":{"description":"KASH_RAIL_API_KEY unset"}}}},"/v1/kash/rail/refunds":{"post":{"summary":"Give a confirmed debit back (rail key)","description":"MINTS, because the debit burned — the pair nets to zero against supply, which is what keeps the sink honest. Only a confirmed debit can be refunded: refunding a failed one would mint tokens that were never burned. Idempotent — refunding twice returns the same row rather than minting again.","tags":["kash"],"security":[{"kash_railKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["railRef"],"properties":{"railRef":{"type":"string"}}}}}},"responses":{"200":{"description":"The refunded debit"},"400":{"description":"Unknown debit, or one that is not confirmed"},"401":{"description":"Rail bearer key required"},"404":{"description":"KASH_RAIL_API_KEY unset"}}}},"/v1/kash/settlements/run":{"post":{"summary":"Settle a period NOW (operator key)","description":"Runs the SAME settleWeek the worker runs — identical pricing, caps and idempotency — against the period that is still accruing, instead of waiting for the settlement period to end. Points become real KSH immediately, which is what makes the product demonstrable. Safe to call repeatedly: settlement is keyed on (week, wallet), so points accrued after a run simply settle on the next one.","tags":["kash"],"security":[{"kash_adminKey":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"weekKey":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Full ISO timestamp of the settlement period's start. Omit for the live period.","example":"2026-08-01T00:00:00.000Z"}}}}}},"responses":{"201":{"description":"Settlement report — wallets, KSH minted, mint tx"},"400":{"$ref":"#/components/responses/kash_BadRequest"},"401":{"description":"Missing or wrong operator bearer key"},"404":{"description":"KASH_TEST_ADMIN_KEY is not configured on this environment"}}}},"/v1/kash/admin/wallets/{wallet}/reset-subscription":{"post":{"summary":"[TEST ONLY] Return a wallet to the free tier","description":"The subscription desk refuses downgrades while a higher tier is live, so without this a tier ladder can only be walked upward, once. Returns 404 unless KASH_TEST_ADMIN_KEY is set. REMOVED BEFORE PRODUCTION.","tags":["kash"],"security":[{"kash_adminKey":[]}],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"201":{"description":"Subscription cleared; the wallet is back on tier 1"},"401":{"description":"Missing or wrong admin bearer key"},"404":{"description":"KASH_TEST_ADMIN_KEY is not configured on this environment"}}}},"/v1/kash/admin/wallets/{wallet}":{"delete":{"summary":"[TEST ONLY] Wipe a wallet back to a true zero","description":"Deletes points, settlements, balance, purchases, conversions, ledger, processed event ids and subscription, AND rewinds the wallet contribution to the global supply and treasury counters — so a re-run starts from zero rather than a state that merely looks empty. Returns 404 unless KASH_TEST_ADMIN_KEY is set. REMOVED BEFORE PRODUCTION.","tags":["kash"],"security":[{"kash_adminKey":[]}],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"Row counts deleted per table"},"401":{"description":"Missing or wrong admin bearer key"},"404":{"description":"KASH_TEST_ADMIN_KEY is not configured on this environment"}}}},"/v1/kash/status":{"get":{"summary":"Full engine status: price, treasury, supply, tiers, epoch budgets","description":"The single source for every live parameter — render from this, never hardcode.","tags":["kash"],"responses":{"200":{"description":"Engine status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_StatusResponse"}}}}}}},"/v1/kash/treasury":{"get":{"summary":"Alias of /status (kept for compatibility)","tags":["kash"],"responses":{"200":{"description":"Engine status"}}}},"/v1/kash/treasury/coverage":{"get":{"summary":"Treasury solvency: USDC held vs. redeemable liability","description":"Worst case where every circulating KSH is redeemed at the current redemption price. Below 100% the desk is fractionally reserved — the number ops must watch.","tags":["kash"],"responses":{"200":{"description":"Coverage report"}}}},"/v1/kash/usernames/{username}/available":{"get":{"summary":"Whether a username is valid and free","description":"Usernames are 3–20 characters, lower-case letters, digits and underscores, starting with a letter; some names are reserved. The username is the wallet’s referral code.","tags":["kash"],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"},"example":"ada_lovelace"}],"responses":{"200":{"description":"Availability verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_UsernameAvailabilityResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/profiles/{wallet}":{"get":{"summary":"A wallet's public profile: its username, if set","tags":["kash"],"parameters":[{"name":"wallet","in":"path","required":true,"schema":{"type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"Profile (username null when none is set)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ProfileResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"}}}},"/v1/kash/profiles/me/username":{"put":{"summary":"Set the caller's username (once); it becomes their referral code","description":"The wallet comes from the verified Privy identity token, never from the body. 409 when the wallet already has a username or the name is taken; 502 (SERVICE_UNAVAILABLE) when identity verification is not configured.","tags":["kash"],"security":[{"kash_privyIdentity":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username"],"properties":{"username":{"type":"string","example":"ada_lovelace"}}}}}},"responses":{"200":{"description":"The profile as stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ProfileResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"},"401":{"$ref":"#/components/responses/kash_Unauthorized"},"409":{"$ref":"#/components/responses/kash_Conflict"}}}},"/v1/kash/referrals/claim":{"post":{"summary":"Record that the caller arrived through a referral code","description":"First claim wins and is permanent; a wallet cannot refer itself. The referral COUNTS for the referrer only once the caller has deposited (any rail), which the worker verifies on chain.","tags":["kash"],"security":[{"kash_privyIdentity":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"The referrer’s username","example":"ada_lovelace"}}}}}},"responses":{"200":{"description":"The attribution as recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ReferralClaimResponse"}}}},"400":{"$ref":"#/components/responses/kash_BadRequest"},"401":{"$ref":"#/components/responses/kash_Unauthorized"},"404":{"description":"Unknown referral code"},"409":{"$ref":"#/components/responses/kash_Conflict"}}}},"/v1/kash/referrals/me":{"get":{"summary":"The caller's referral standing: username, referred (deposited) count, pending","tags":["kash"],"security":[{"kash_privyIdentity":[]}],"responses":{"200":{"description":"Referral stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ReferralStatsResponse"}}}},"401":{"$ref":"#/components/responses/kash_Unauthorized"}}}},"/v1/prediction/combos/eligibility/check":{"post":{"tags":["prediction"],"operationId":"check_eligibility","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboEligibilityRequest"}}},"required":true},"responses":{"200":{"description":"Local Combo leg eligibility preflight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboEligibilityResult"}}}},"400":{"description":"Combo must contain 2 to 50 unique decimal leg position IDs"},"503":{"description":"Polymarket Combo RFQ catalog is unavailable"}}}},"/v1/prediction/combos/eligible-markets":{"get":{"tags":["prediction"],"operationId":"eligible_markets","parameters":[{"name":"limit","in":"query","description":"Number of markets to return. Defaults to 50 and is capped at 100.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"cursor","in":"query","description":"Opaque cursor returned by the previous page.","required":false,"schema":{"type":"string"}},{"name":"exclude","in":"query","description":"Comma-separated condition IDs to omit from the result.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Markets currently accepted by Polymarket Combo RFQ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_EligibleMarketsPage"}}}},"400":{"description":"Invalid pagination or exclusion parameters"},"503":{"description":"Polymarket Combo RFQ catalog is unavailable"}}}},"/v1/prediction/combos/quotes":{"post":{"tags":["prediction"],"operationId":"create_quote","parameters":[{"name":"idempotency-key","in":"header","description":"Unique key for this quote request","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-address","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-passphrase","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_CreateComboQuoteRequest"}}},"required":true},"responses":{"200":{"description":"Executable BUY or SELL Combo quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboQuoteView"}}}},"400":{"description":"Invalid legs, amount, share size, or exact RFQ payload"},"401":{"description":"Privy or Polymarket account authentication missing"},"409":{"description":"Idempotency conflict"},"503":{"description":"Combo RFQ execution is unavailable or not configured"}}}},"/v1/prediction/combos/quotes/{quote_id}":{"get":{"tags":["prediction"],"operationId":"get_quote","parameters":[{"name":"quote_id","in":"path","description":"Local durable quote ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Last persisted quote and execution state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboQuoteView"}}}},"401":{"description":"Privy authentication missing or invalid"},"404":{"description":"Quote not found for the authenticated wallet"}}}},"/v1/prediction/combos/quotes/{quote_id}/accept":{"post":{"tags":["prediction"],"operationId":"accept_quote","parameters":[{"name":"quote_id","in":"path","description":"Local durable quote ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-polymarket-account-address","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-passphrase","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_AcceptComboQuoteRequest"}}},"required":true},"responses":{"200":{"description":"Latest state after idempotent quote acceptance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboQuoteView"}}}},"400":{"description":"Invalid signed Exchange v3 order"},"401":{"description":"Authentication missing or invalid"},"404":{"description":"Quote not found for the authenticated wallet"},"409":{"description":"Quote expired, changed, or is not acceptable"}}}},"/v1/prediction/combos/quotes/{quote_id}/sync":{"post":{"tags":["prediction"],"operationId":"sync_quote","parameters":[{"name":"quote_id","in":"path","description":"Local durable quote ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"x-polymarket-account-address","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-passphrase","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-polymarket-account-signature","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Durable provider execution status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboQuoteView"}}}},"401":{"description":"Authentication missing or invalid"},"404":{"description":"Quote not found for the authenticated wallet"},"409":{"description":"Quote was never accepted or has no provider RFQ"}}}},"/v1/prediction/health":{"get":{"tags":["prediction"],"summary":"Liveness probe. Reports process uptime without touching dependencies.","operationId":"health_check","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_HealthStatus"}}}}}}},"/v1/prediction/limitless/capabilities":{"get":{"tags":["prediction"],"operationId":"capabilities","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessCapabilities"}}}}}}},"/v1/prediction/limitless/packs":{"get":{"tags":["prediction"],"operationId":"packs","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessPack"}}}}},"503":{"description":""}}}},"/v1/prediction/limitless/packs/search":{"get":{"tags":["prediction"],"operationId":"search_packs","parameters":[{"name":"query","in":"query","description":"Case-insensitive provider search text.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessPack"}}}}},"400":{"description":""},"503":{"description":""}}}},"/v1/prediction/limitless/packs/{pack_id}":{"get":{"tags":["prediction"],"operationId":"pack","parameters":[{"name":"pack_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessPack"}}}},"400":{"description":""},"404":{"description":""},"503":{"description":""}}}},"/v1/prediction/limitless/parlay/create":{"post":{"tags":["prediction"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessCreateRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessCreateResponse"}}}},"400":{"description":""},"401":{"description":""},"403":{"description":""},"503":{"description":""}}}},"/v1/prediction/limitless/parlay/markets":{"get":{"tags":["prediction"],"operationId":"markets","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessParlayEvent"}}}}},"503":{"description":""}}}},"/v1/prediction/limitless/parlay/quote":{"post":{"tags":["prediction"],"operationId":"quote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessQuoteRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_LimitlessQuote"}}}},"400":{"description":""},"503":{"description":""}}}},"/v1/prediction/markets":{"get":{"tags":["prediction"],"operationId":"list_markets","parameters":[{"name":"limit","in":"query","description":"Number of markets to return. Defaults to 50 and is capped at 100.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Zero-based provider offset.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"closed","in":"query","description":"Fetch resolved/closed markets instead of currently open markets.","required":false,"schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_MarketSort"}},{"name":"tagId","in":"query","description":"Optional Polymarket tag identifier.","required":false,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"Normalized open or closed Polymarket markets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_MarketPage"}}}},"400":{"description":"Invalid pagination or sort parameters"},"503":{"description":"Polymarket market data is unavailable"}}}},"/v1/prediction/markets/events":{"get":{"tags":["prediction"],"operationId":"list_market_events","parameters":[{"name":"category","in":"query","description":"Polymarket discovery category.","required":false,"schema":{"$ref":"#/components/schemas/prediction_DiscoveryCategory"}},{"name":"limit","in":"query","description":"Number of events to return. Defaults to 12 and is capped at 20.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"cursor","in":"query","description":"Opaque cursor returned by the previous page.","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_MarketSort"}}],"responses":{"200":{"description":"Cursor-paginated Polymarket discovery events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_DiscoveryEventsPage"}}}},"400":{"description":"Invalid category, sort, or pagination parameters"},"503":{"description":"Polymarket market data is unavailable"}}}},"/v1/prediction/markets/events/{event_id}":{"get":{"tags":["prediction"],"operationId":"market_event","parameters":[{"name":"event_id","in":"path","description":"Numeric Polymarket Gamma event ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tradeable Polymarket discovery event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_DiscoveryEvent"}}}},"400":{"description":"Invalid event ID"},"404":{"description":"Event is unavailable or no longer tradeable"},"503":{"description":"Polymarket market data is unavailable"}}}},"/v1/prediction/ready":{"get":{"tags":["prediction"],"summary":"Dependency readiness probe. A process may remain live while it is removed\nfrom service discovery until Postgres and the configured broker recover.","operationId":"readiness_check","responses":{"200":{"description":"Service dependencies are ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ReadinessStatus"}}}},"503":{"description":"A required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ReadinessStatus"}}}}}}},"/v1/prediction/singles/tickets":{"post":{"tags":["prediction"],"operationId":"create_ticket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_CreateSinglesTicketRequest"}}},"required":true},"responses":{"200":{"description":"Durable Singles ticket receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SinglesTicketView"}}}},"400":{"description":"Invalid ticket or child order results"},"401":{"description":"Privy authentication missing or invalid"},"409":{"description":"Booking code conflict"}}}},"/v1/prediction/singles/tickets/{booking_code}":{"get":{"tags":["prediction"],"operationId":"get_ticket","parameters":[{"name":"booking_code","in":"path","description":"Six-character booking code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Persisted Singles ticket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SinglesTicketView"}}}},"401":{"description":"Privy authentication missing or invalid"},"404":{"description":"Ticket not found for the authenticated wallet"}}}},"/v1/prediction/sports/combo-events":{"get":{"tags":["prediction"],"operationId":"combo_events","parameters":[{"name":"sport","in":"query","description":"Broad Combo sport. Defaults to soccer.","required":false,"schema":{"$ref":"#/components/schemas/prediction_ComboSport"}},{"name":"league","in":"query","description":"League chip slug, such as `epl`, `laliga`, or `ucl`.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Optional fixture/team title search.","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque market cursor returned by the previous page.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Executable market-row batch size. Defaults to 12 and is capped at 100.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Combo-eligible sports fixtures and betting lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboEventsPage"}}}},"400":{"description":"Invalid sport, league, search, or pagination parameters"},"503":{"description":"Polymarket sports data is unavailable"}}}},"/v1/prediction/sports/combo-events/{event_id}":{"get":{"tags":["prediction"],"operationId":"combo_event","parameters":[{"name":"event_id","in":"path","description":"Numeric Polymarket Gamma event ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Combo-eligible event with all tradeable lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboEvent"}}}},"400":{"description":"Invalid event ID"},"404":{"description":"Event is unavailable or no longer tradeable"},"503":{"description":"Polymarket sports data is unavailable"}}}},"/v1/prediction/sports/combo-filters":{"get":{"tags":["prediction"],"operationId":"combo_filters","parameters":[{"name":"sport","in":"query","description":"Broad Combo sport. Defaults to soccer.","required":false,"schema":{"$ref":"#/components/schemas/prediction_ComboSport"}}],"responses":{"200":{"description":"Polymarket Combo sport and league filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_ComboFilters"}}}},"503":{"description":"Polymarket sports metadata is unavailable"}}}},"/v1/prediction/sports/events":{"get":{"tags":["prediction"],"operationId":"sports_events","parameters":[{"name":"sport","in":"query","description":"Normal sport navigation. Defaults to football.","required":false,"schema":{"$ref":"#/components/schemas/prediction_NormalSport"}},{"name":"league","in":"query","description":"Provider-backed league route slug. Defaults to the first league for the selected sport.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Optional fixture/team title search.","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque market cursor returned by the previous page.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Fixture page size. Defaults to 12 and is capped at 20.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Normal sports fixtures and tradeable moneyline, spread, and total markets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsEventsPage"}}}},"400":{"description":"Invalid league, search, or pagination parameters"},"503":{"description":"Polymarket sports data is unavailable"}}}},"/v1/prediction/sports/events/{event_id}":{"get":{"tags":["prediction"],"operationId":"sports_event","parameters":[{"name":"event_id","in":"path","description":"Numeric Polymarket Gamma event ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Normal sports event with all standard tradeable lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsEvent"}}}},"400":{"description":"Invalid event ID"},"404":{"description":"Event is unavailable or no longer tradeable"},"503":{"description":"Polymarket sports data is unavailable"}}}},"/v1/prediction/sports/filters":{"get":{"tags":["prediction"],"operationId":"sports_filters","parameters":[{"name":"sport","in":"query","description":"Normal sport navigation. Defaults to football.","required":false,"schema":{"$ref":"#/components/schemas/prediction_NormalSport"}},{"name":"league","in":"query","description":"Optional provider-backed league route slug.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Normal sports navigation filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsFilters"}}}}}}},"/v1/prediction/sports/teams":{"get":{"tags":["prediction"],"operationId":"combo_teams","parameters":[{"name":"names","in":"query","description":"Pipe-separated team names from the currently visible fixtures.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Team artwork for visible sports fixtures","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboTeam"}}}}},"400":{"description":"Invalid team names"},"503":{"description":"Polymarket team metadata is unavailable"}}}},"/v1/prediction/sportsbook/activity":{"get":{"tags":["prediction"],"operationId":"activity","parameters":[{"name":"states","in":"query","description":"Comma-separated lifecycle states, for example accepted,settled.","required":false,"schema":{"type":"string"}},{"name":"results","in":"query","description":"Comma-separated results: won,lost,canceled.","required":false,"schema":{"type":"string"}},{"name":"isRedeemed","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Authenticated wallet activity across Azuro Base clients","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookActivityPage"}}}},"400":{"description":"Activity filters or pagination are invalid"},"401":{"description":"Privy authentication is missing or invalid"},"503":{"description":"Wallet sportsbook activity is unavailable"}}}},"/v1/prediction/sportsbook/calculations":{"post":{"tags":["prediction"],"operationId":"calculate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_CalculateBetRequest"}}},"required":true},"responses":{"200":{"description":"Current stake and payout constraints for selections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_BetCalculation"}}}},"400":{"description":"Selections are invalid or unavailable"},"503":{"description":"Bet calculation is unavailable"}}}},"/v1/prediction/sportsbook/capabilities":{"get":{"tags":["prediction"],"operationId":"capabilities","responses":{"200":{"description":"Supported Azuro Base sportsbook features","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookCapabilities"}}}}}}},"/v1/prediction/sportsbook/conditions/refresh":{"post":{"tags":["prediction"],"operationId":"refresh_conditions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_RefreshConditionsRequest"}}},"required":true},"responses":{"200":{"description":"Current states and odds for selected conditions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookMarket"}}}}},"400":{"description":"Invalid condition IDs"},"503":{"description":"Condition refresh is unavailable"}}}},"/v1/prediction/sportsbook/events":{"get":{"tags":["prediction"],"operationId":"events","parameters":[{"name":"sport","in":"query","description":"Azuro sport slug, for example football, basketball, or tennis.","required":true,"schema":{"type":"string"}},{"name":"eventKind","in":"query","description":"Restrict fixtures to sports, esports, or provider-backed virtual matches.","required":false,"schema":{"$ref":"#/components/schemas/prediction_SportsbookEventKind"}},{"name":"state","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_SportsbookGameState"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"league","in":"query","required":false,"schema":{"type":"string"}},{"name":"topLeagueOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_SportsbookSort"}},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_SortDirection"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Paginated provider-neutral sportsbook fixtures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookEventsPage"}}}},"400":{"description":"Invalid event filters"},"503":{"description":"Sportsbook fixtures are unavailable"}}}},"/v1/prediction/sportsbook/events/markets":{"post":{"tags":["prediction"],"operationId":"event_markets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_EventMarketsRequest"}}},"required":true},"responses":{"200":{"description":"Visible markets for a batch of fixtures","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookMarket"}}}}},"400":{"description":"Invalid game IDs"},"503":{"description":"Fixture markets are unavailable"}}}},"/v1/prediction/sportsbook/events/{game_id}":{"get":{"tags":["prediction"],"operationId":"event_details","parameters":[{"name":"game_id","in":"path","description":"Azuro numeric game ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fixture with all visible markets and outcomes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookEventDetails"}}}},"400":{"description":"Invalid game ID"},"404":{"description":"Fixture not found"},"503":{"description":"Fixture details are unavailable"}}}},"/v1/prediction/sportsbook/favorites":{"get":{"tags":["prediction"],"operationId":"favorites","responses":{"200":{"description":"Authenticated wallet country and league favorites","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/prediction_FavoriteView"}}}}},"401":{"description":"Privy authentication is missing or invalid"}}},"post":{"tags":["prediction"],"operationId":"create_favorite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_CreateFavoriteRequest"}}},"required":true},"responses":{"200":{"description":"Created or existing canonical favorite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_FavoriteView"}}}},"400":{"description":"Invalid favorite target"},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Sport, country, or league was not found"}}}},"/v1/prediction/sportsbook/favorites/{favorite_id}":{"delete":{"tags":["prediction"],"operationId":"delete_favorite","parameters":[{"name":"favorite_id","in":"path","description":"Favorite ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Favorite deletion result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_DeleteFavoriteResult"}}}},"401":{"description":"Privy authentication is missing or invalid"}}}},"/v1/prediction/sportsbook/freebets":{"get":{"tags":["prediction"],"operationId":"freebets","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_FreebetListStatus"}}],"responses":{"200":{"description":"Azuro Base free bets for the authenticated wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_AvailableFreebets"}}}},"401":{"description":"Privy authentication is missing or invalid"},"503":{"description":"Free bets or the platform affiliate are unavailable"}}}},"/v1/prediction/sportsbook/freebets/available":{"post":{"tags":["prediction"],"operationId":"available_freebets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_AvailableFreebetsRequest"}}},"required":true},"responses":{"200":{"description":"Available Azuro Base free bets for the authenticated wallet and selections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_AvailableFreebets"}}}},"400":{"description":"Selections are invalid"},"401":{"description":"Privy authentication is missing or invalid"},"503":{"description":"Free bets or the platform affiliate are unavailable"}}}},"/v1/prediction/sportsbook/gas-info":{"get":{"tags":["prediction"],"operationId":"gas_info","responses":{"200":{"description":"Azuro token, relayer, and sponsorship metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_GasInfo"}}}},"503":{"description":"Gas metadata is unavailable"}}}},"/v1/prediction/sportsbook/navigation":{"get":{"tags":["prediction"],"operationId":"navigation","responses":{"200":{"description":"Azuro sports, countries, leagues, and active counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_Navigation"}}}},"503":{"description":"Sportsbook navigation is unavailable"}}}},"/v1/prediction/sportsbook/orders":{"get":{"tags":["prediction"],"operationId":"order_history","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/prediction_SportsbookOrderStatus"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Wallet sportsbook history with stable keyset pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookOrderHistoryPage"}}}},"400":{"description":"Pagination cursor or limit is invalid"},"401":{"description":"Privy authentication is missing or invalid"}}}},"/v1/prediction/sportsbook/orders/booking/{booking_code}":{"get":{"tags":["prediction"],"operationId":"get_order_by_booking_code","parameters":[{"name":"booking_code","in":"path","description":"Eight-character booking code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Latest durable sportsbook order state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookOrderView"}}}},"400":{"description":"Booking code is invalid"},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Order not found for this wallet"}}}},"/v1/prediction/sportsbook/orders/prepare":{"post":{"tags":["prediction"],"operationId":"prepare_order","parameters":[{"name":"idempotency-key","in":"header","description":"Unique key for this order attempt","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_PrepareOrderRequest"}}},"required":true},"responses":{"200":{"description":"Durable Base order and EIP-712 payload ready for Privy signing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_PreparedOrderView"}}}},"400":{"description":"Selection, stake, or odds are invalid"},"401":{"description":"Privy authentication is missing or invalid"},"409":{"description":"Idempotency conflict"},"503":{"description":"Azuro execution or the platform affiliate is unavailable"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}":{"get":{"tags":["prediction"],"operationId":"get_order","parameters":[{"name":"ticket_id","in":"path","description":"Local durable sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Latest durable sportsbook order state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookOrderView"}}}},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Order not found for this wallet"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/cashout":{"get":{"tags":["prediction"],"operationId":"get_cashout","parameters":[{"name":"ticket_id","in":"path","description":"Local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Latest durable cashout state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookCashoutView"}}}},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Cashout not found for this wallet"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/cashout/prepare":{"post":{"tags":["prediction"],"operationId":"prepare_cashout","parameters":[{"name":"ticket_id","in":"path","description":"Accepted local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Cashout quote, NFT approval calls, and EIP-712 payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_PreparedCashoutView"}}}},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Order not found for this wallet"},"409":{"description":"Order or one of its selections is not cashout eligible"},"503":{"description":"Azuro cashout API is unavailable on Base"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/cashout/submit":{"post":{"tags":["prediction"],"operationId":"submit_cashout","parameters":[{"name":"ticket_id","in":"path","description":"Accepted local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SubmitCashoutRequest"}}},"required":true},"responses":{"200":{"description":"Cashout signature persisted and queued for Azuro","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookCashoutView"}}}},"400":{"description":"Signature is malformed"},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Cashout quote not found for this wallet"},"409":{"description":"Cashout quote expired or was already signed differently"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/redemption":{"get":{"tags":["prediction"],"operationId":"get_redemption","parameters":[{"name":"ticket_id","in":"path","description":"Local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Durable redemption status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookRedemptionView"}}}},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Redemption not found for this wallet"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/redemption/prepare":{"post":{"tags":["prediction"],"operationId":"prepare_redemption","parameters":[{"name":"ticket_id","in":"path","description":"Redeemable local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Base LP or PayMaster payout transaction ready for the authenticated wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_PreparedRedemptionView"}}}},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Order not found for this wallet"},"409":{"description":"Order is not redeemable or was already redeemed"},"503":{"description":"Free-bet redemption identity is still synchronizing"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/redemption/submit":{"post":{"tags":["prediction"],"operationId":"submit_redemption","parameters":[{"name":"ticket_id","in":"path","description":"Redeemable local sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SubmitRedemptionRequest"}}},"required":true},"responses":{"200":{"description":"Transaction recorded for graph-backed confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookRedemptionView"}}}},"400":{"description":"Transaction hash is malformed"},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Redemption was not prepared for this wallet"},"409":{"description":"Redemption is no longer submittable"}}}},"/v1/prediction/sportsbook/orders/{ticket_id}/submit":{"post":{"tags":["prediction"],"operationId":"submit_order","parameters":[{"name":"ticket_id","in":"path","description":"Local durable sportsbook ticket ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SubmitOrderRequest"}}},"required":true},"responses":{"200":{"description":"Signature persisted and order queued for Azuro","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookOrderView"}}}},"400":{"description":"Signature is malformed"},"401":{"description":"Privy authentication is missing or invalid"},"404":{"description":"Order not found for this wallet"},"409":{"description":"Order expired or was already signed differently"}}}},"/v1/prediction/sportsbook/realtime":{"get":{"tags":["prediction"],"operationId":"realtime_stream","parameters":[{"name":"conditionIds","in":"query","description":"Comma-separated Azuro condition IDs.","required":false,"schema":{"type":"string"}},{"name":"gameIds","in":"query","description":"Comma-separated Azuro game IDs for scores, clocks, timelines, and statistics.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Azuro condition and match-statistics event stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookRealtimeEvent"}}}},"400":{"description":"Invalid subscription"}}}},"/v1/prediction/sportsbook/realtime/status":{"get":{"tags":["prediction"],"operationId":"realtime_status","responses":{"200":{"description":"Realtime transport status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookRealtimeStatus"}}}}}}},"/v1/prediction/sportsbook/search":{"get":{"tags":["prediction"],"operationId":"search","parameters":[{"name":"query","in":"query","description":"Text matched against event titles, leagues, and countries.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"perPage","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Paginated Azuro events matching a title, league, or country","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SportsbookSearchPage"}}}},"400":{"description":"Invalid search query"},"503":{"description":"Sportsbook search is unavailable"}}}},"/v1/prediction/sportsbook/suggested-combos":{"get":{"tags":["prediction"],"operationId":"suggested_combos","responses":{"200":{"description":"Azuro predefined combo selections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/prediction_SuggestedCombos"}}}},"503":{"description":"Suggested combos are unavailable"}}}},"/v1/paymaster/health":{"get":{"summary":"Dependency health","responses":{"200":{"description":"Healthy"}},"tags":["paymaster"]}},"/v1/paymaster/health/ready":{"get":{"summary":"Dependency readiness","responses":{"200":{"description":"Ready"},"503":{"description":"Dependency unavailable"}},"tags":["paymaster"]}},"/v1/paymaster/capabilities":{"get":{"summary":"List configured EVM chain capabilities and redundancy tiers","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"responses":{"200":{"description":"Chain capability list"}},"tags":["paymaster"]}},"/v1/paymaster/wallets/challenges":{"post":{"summary":"Create a wallet-control challenge","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chainId","sender"],"properties":{"chainId":{"type":"string","example":"1"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}}},"responses":{"201":{"description":"Challenge created"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"tags":["paymaster"]}},"/v1/paymaster/grants":{"post":{"summary":"Verify wallet proof and grant one exact UserOperation intent","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"responses":{"201":{"description":"Grant created"},"403":{"description":"Proof or policy rejected"}},"tags":["paymaster"]}},"/v1/paymaster/rpc/{chainId}":{"post":{"summary":"ERC-7677 JSON-RPC endpoint","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"parameters":[{"name":"chainId","in":"path","required":true,"schema":{"type":"string"}}],"description":"Supports only pm_getPaymasterStubData and pm_getPaymasterData. context.grantId is required; final data also requires context.sponsorshipId.","responses":{"200":{"description":"JSON-RPC result or method error"},"400":{"description":"Invalid JSON-RPC envelope"}},"tags":["paymaster"]}},"/v1/paymaster/submissions":{"post":{"summary":"Submit a user-signed operation through its pinned bundler","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"responses":{"202":{"description":"Accepted for reconciliation"},"409":{"description":"Sponsorship mismatch"}},"tags":["paymaster"]}},"/v1/paymaster/submissions/{id}":{"get":{"summary":"Get and refresh sponsorship/submission status","security":[{"paymaster_privyToken":[]},{"paymaster_bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Lifecycle status"},"404":{"description":"Not found"}},"tags":["paymaster"]}},"/v1/prediction-market/markets":{"get":{"summary":"List markets","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["Open","Closed","Resolved","Invalid"]}}],"responses":{"200":{"description":"Markets with live prices/reserves/volume"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/mine":{"get":{"summary":"A creator's own markets (to resolve them)","description":"Lists the markets created by the given wallet, matched on the on-chain creator.","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The wallet's created markets"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}":{"get":{"summary":"Market detail","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Market"},"404":{"description":"Not found"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/prices":{"get":{"summary":"YES price history (for charts)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Price points (priceYes in 1e6)"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/trades":{"get":{"summary":"Recent trades for a market","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Trade feed"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/chart":{"get":{"summary":"Time-bucketed YES/NO price series for a chart","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"interval","in":"query","schema":{"type":"string","enum":["1m","5m","15m","1h","4h","1d"],"default":"1h"}}],"responses":{"200":{"description":"[{ t, yes, no }] — prices in 1e6"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/metadata":{"post":{"summary":"Attach off-chain metadata (question, category) to a market","description":"Keyless — records metadata for an on-chain market, signs nothing. Called after the market is created on-chain from the user wallet. Honors an optional Idempotency-Key header (a retry replays the first response).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable client key; a retry replays the first response. 409 on reuse with a different body.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"category":{"type":"string"},"imageUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Metadata attached"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/image":{"post":{"summary":"Upload a market image (hosted on Cloudinary)","description":"Uploads a base64 image data URL, hosts it, and attaches the resulting URL to the market metadata. Returns the hosted imageUrl. 503 when image hosting is not configured. Honors an optional Idempotency-Key header so a retry does not re-upload.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable client key; a retry replays the first response instead of re-uploading. 409 on reuse with a different body.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64 image data URL, e.g. \"data:image/png;base64,…\" (≤ 5 MiB)."}}}}}},"responses":{"200":{"description":"Hosted image URL"}},"tags":["prediction-market"]}},"/v1/prediction-market/categories":{"get":{"summary":"Distinct market categories","responses":{"200":{"description":"string[]"}},"tags":["prediction-market"]}},"/v1/prediction-market/positions":{"get":{"summary":"A wallet's positions across markets","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Positions (YES/NO shares, cost)"}},"tags":["prediction-market"]}},"/v1/prediction-market/positions/{id}":{"get":{"summary":"A wallet's position in one market","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"wallet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Position"}},"tags":["prediction-market"]}},"/v1/prediction-market/lp":{"get":{"summary":"A wallet's LP positions","parameters":[{"name":"wallet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"LP positions"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/holders":{"get":{"summary":"Top holders of a market side (Yes/No leaderboard)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"side","in":"query","schema":{"type":"string","enum":["yes","no"],"default":"yes"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Largest positions first"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/activity":{"get":{"summary":"Activity feed (trades, LP, redeems, resolution), newest first","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"\"<block>:<log>\" from the previous page"},{"name":"limit","in":"query","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"{ items, nextCursor }"}},"tags":["prediction-market"]}},"/v1/prediction-market/markets/{id}/quote":{"get":{"summary":"Size-aware CPMM quote (preview a trade before signing)","description":"Computes shares/avg-price/impact with the same math the contract uses. amount is USDC (buy) or shares (sell) in 1e6 base units.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"side","in":"query","schema":{"type":"string","enum":["yes","no"],"default":"yes"}},{"name":"kind","in":"query","schema":{"type":"string","enum":["buy","sell"],"default":"buy"}},{"name":"amount","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Quote"},"404":{"description":"Not found"}},"tags":["prediction-market"]}},"/v1/prediction-market/groups":{"get":{"summary":"List multi-outcome EVENTS (candidate-style grouped markets)","parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["Open","Closed","Resolved"]}}],"responses":{"200":{"description":"Events with aggregated outcomes"}},"tags":["prediction-market"]},"post":{"summary":"Create a multi-outcome event (off-chain metadata)","description":"Keyless — records event metadata; each outcome is a real on-chain binary market attached as a member.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slug","title"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"rules":{"type":"string"},"resolutionSource":{"type":"string"},"imageUrl":{"type":"string"},"closeTime":{"type":"integer"}}}}}},"responses":{"201":{"description":"Created event"}},"tags":["prediction-market"]}},"/v1/prediction-market/groups/{id}":{"get":{"summary":"Event detail with per-outcome prices, volumes, normalized %","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"id or slug"}],"responses":{"200":{"description":"Event"},"404":{"description":"Not found"}},"tags":["prediction-market"]}},"/v1/prediction-market/groups/{id}/members":{"post":{"summary":"Attach an on-chain market to an event as a labelled outcome","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["marketId","label"],"properties":{"marketId":{"type":"string"},"label":{"type":"string"},"imageUrl":{"type":"string"},"sortOrder":{"type":"integer"}}}}}},"responses":{"201":{"description":"Member attached"}},"tags":["prediction-market"]}},"/v1/prediction-market/comments":{"get":{"summary":"List comments for an event or a market","parameters":[{"name":"groupId","in":"query","schema":{"type":"string"}},{"name":"marketId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Comments, newest first"}},"tags":["prediction-market"]},"post":{"summary":"Post a comment (wallet-signature verified)","description":"The client signs a deterministic message (scope+body+timestamp) with the embedded wallet; the API recovers the signer and rejects if it does not match `wallet`. No server key, non-custodial.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scope","scopeId","body","wallet","signature","timestamp"],"properties":{"scope":{"type":"string","enum":["group","market"]},"scopeId":{"type":"string"},"body":{"type":"string"},"wallet":{"type":"string"},"signature":{"type":"string"},"timestamp":{"type":"integer"},"parentId":{"type":"string"}}}}}},"responses":{"201":{"description":"Comment id"},"403":{"description":"Bad signature"}},"tags":["prediction-market"]}},"/v1/prediction-market/comments/{id}/like":{"post":{"summary":"Like a comment (signature-verified)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ commentId, likeCount }"}},"tags":["prediction-market"]}},"/v1/prediction-market/health":{"get":{"summary":"Health probe","responses":{"200":{"description":"OK"}},"tags":["prediction-market"]}},"/v1/user-management/health":{"get":{"summary":"Service health","responses":{"200":{"description":"Healthy"}},"tags":["user-management"]}},"/v1/user-management/docs":{"get":{"summary":"Interactive Swagger UI","responses":{"200":{"description":"HTML UI"}},"tags":["user-management"]}},"/v1/user-management/admin/users":{"get":{"summary":"List a cursor-paginated page of Privy users","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Privy user page"}},"tags":["user-management"]}},"/v1/user-management/admin/users/stats":{"get":{"summary":"Count Privy users by contact and sign-in capability","description":"Returns a cached snapshot refreshed from all Privy users in the background. Categories overlap: one user can be counted in email, wallet, and social sign-in totals.","security":[{"user-management_AdminApiKey":[]}],"responses":{"200":{"description":"Current user counts","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","required":["totalUsers","reachableByEmail","withWallet","withSocialSignIn"],"properties":{"totalUsers":{"type":"integer","minimum":0},"reachableByEmail":{"type":"integer","minimum":0},"withWallet":{"type":"integer","minimum":0},"withSocialSignIn":{"type":"integer","minimum":0}}}}}}}}},"tags":["user-management"]}},"/v1/user-management/admin/users/{id}":{"get":{"summary":"Get one Privy user","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Privy user"}},"tags":["user-management"]},"delete":{"summary":"Permanently delete one Privy user","security":[{"user-management_AdminApiKey":[]}],"description":"Requires x-confirm-user-deletion to exactly equal the path user ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"x-confirm-user-deletion","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}},"tags":["user-management"]}},"/v1/user-management/admin/users/{id}/email":{"post":{"summary":"Send an email to one Privy user","security":[{"user-management_AdminApiKey":[]}],"description":"Uses the first linked Privy email and submits through the configured email provider.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subject","html"],"properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"senderId":{"type":"string","format":"uuid","description":"Approved sender profile. Omit to use the configured default."},"sender":{"type":"object","description":"Inline sender details. Use instead of senderId; the domain must be approved.","required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":100},"replyTo":{"type":"string","format":"email"}}}}}}}},"responses":{"202":{"description":"Accepted by the configured email provider"}},"tags":["user-management"]}},"/v1/user-management/admin/email-senders":{"get":{"summary":"List approved email sender profiles","security":[{"user-management_AdminApiKey":[]}],"responses":{"200":{"description":"Approved senders, default first"}},"tags":["user-management"]},"post":{"summary":"Add an approved email sender profile","description":"The email domain must be included in EMAIL_ALLOWED_SENDER_DOMAINS and authenticated with the configured provider.","security":[{"user-management_AdminApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":100},"replyTo":{"type":"string","format":"email"}}}}}},"responses":{"201":{"description":"Sender added"},"400":{"description":"Invalid input or unapproved domain"},"409":{"description":"Sender email already exists"}},"tags":["user-management"]}},"/v1/user-management/admin/email-senders/{id}":{"delete":{"summary":"Remove a non-default sender profile","description":"Existing campaigns retain their sender snapshot. The configured default sender cannot be removed.","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Sender removed"},"404":{"description":"Sender not found"},"409":{"description":"Default sender cannot be removed"}},"tags":["user-management"]}},"/v1/user-management/admin/campaigns":{"get":{"summary":"List campaigns","security":[{"user-management_AdminApiKey":[]}],"responses":{"200":{"description":"Campaigns"}},"tags":["user-management"]},"post":{"summary":"Create a draft campaign","security":[{"user-management_AdminApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","subject","html"],"properties":{"name":{"type":"string"},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"senderId":{"type":"string","format":"uuid","description":"Approved sender profile. Omit to use the configured default."},"sender":{"type":"object","description":"Inline sender details. Use instead of senderId; the domain must be approved.","required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":100},"replyTo":{"type":"string","format":"email"}}}}}}}},"responses":{"201":{"description":"Draft created"}},"tags":["user-management"]}},"/v1/user-management/admin/campaigns/{id}":{"get":{"summary":"Get one campaign","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Campaign"},"404":{"description":"Campaign not found"}},"tags":["user-management"]},"delete":{"summary":"Delete a draft campaign","description":"Permanently deletes a campaign only while its status is draft. Campaigns in every other status are retained for audit history.","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Draft deleted"},"404":{"description":"Campaign not found"},"409":{"description":"Campaign is no longer a draft"}},"tags":["user-management"]}},"/v1/user-management/admin/campaigns/{id}/send":{"post":{"summary":"Queue a campaign for all unique Privy email users","security":[{"user-management_AdminApiKey":[]}],"description":"Requires an explicit audience. Use audience=selected with 1-1000 Privy user IDs, or audience=all without userIds. Provider suppressions are honored.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","oneOf":[{"type":"object","additionalProperties":false,"required":["confirm","audience","userIds"],"properties":{"confirm":{"type":"boolean","const":true},"audience":{"type":"string","const":"selected"},"userIds":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"string","pattern":"^did:privy:"}}}},{"type":"object","additionalProperties":false,"required":["confirm","audience"],"properties":{"confirm":{"type":"boolean","const":true},"audience":{"type":"string","const":"all"}}}]}}}},"responses":{"202":{"description":"Campaign queued for asynchronous processing"}},"tags":["user-management"]}},"/v1/user-management/admin/campaigns/{id}/recipients":{"get":{"summary":"List and filter the durable recipient ledger","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","submitting","accepted","processed","delivered","deferred","bounced","dropped","api_failed","skipped"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Recipient ledger page"}},"tags":["user-management"]}},"/v1/user-management/admin/campaigns/{id}/retry":{"post":{"summary":"Safely retry recipients not accepted by the email provider","description":"Only pending and api_failed are allowed. Accepted, processed, delivered, deferred, bounced, and dropped recipients cannot be resent by this endpoint.","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["confirm","statuses"],"properties":{"confirm":{"type":"boolean","const":true},"statuses":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["pending","api_failed"]}}}}}}},"responses":{"202":{"description":"Matching recipients queued"},"409":{"description":"Unsafe legacy campaign, wrong state, or no matching recipients"}},"tags":["user-management"]}},"/v1/user-management/webhooks/sendgrid/events":{"post":{"summary":"Signed SendGrid Event Webhook receiver","description":"Public endpoint authenticated with SendGrid ECDSA signature headers.","responses":{"200":{"description":"Events recorded or already deduplicated"},"401":{"description":"Invalid signature or stale timestamp"},"503":{"description":"Webhook public key is not configured"}},"tags":["user-management"]}},"/v1/user-management/webhooks/mailgun/events":{"post":{"summary":"Signed Mailgun Event Webhook receiver","description":"Public endpoint authenticated with the Mailgun HMAC-SHA256 signature embedded in its raw JSON body.","responses":{"200":{"description":"Event recorded or already deduplicated"},"401":{"description":"Invalid signature, body, or stale timestamp"},"503":{"description":"Webhook signing key is not configured"}},"tags":["user-management"]}},"/v1/user-management/admin/queues/":{"get":{"summary":"Read-only Bull Board for campaign and dead-letter queues","description":"Browser UI protected by separate HTTP Basic credentials. Campaign-level execution only; use the recipient ledger for delivery status.","security":[{"user-management_basicAuth":[]}],"responses":{"200":{"description":"Bull Board HTML"},"401":{"description":"Basic authentication required"}},"tags":["user-management"]}},"/v1/user-management/link":{"post":{"summary":"Migration contract: link the caller’s Decane account to their Privy account and re-key the ledgers (ADR-0009)","description":"Reached as POST /v1/migration/link. Authorization carries the Decane access token, x-legacy-authorization the Privy access token, privy-id-token (optional) the Privy identity token. Both tokens are verified by their own provider; wallets are resolved server-side (Decane getAddresses; Privy EMBEDDED wallets only). Idempotent: a repeated call returns the stored link and re-runs any ledger re-key still pending or failed.","security":[{"user-management_DecaneBearer":[]}],"parameters":[{"name":"x-legacy-authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer <privy access token>"},{"name":"privy-id-token","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"{ linked: true, legacy: { evm, solana }, current: { evm, solana }, rekey: { <ledger>: done|pending|failed|none }, linkedAt }"},"401":{"description":"UNAUTHORIZED — either token fails to verify"},"409":{"description":"LEGACY_ALREADY_LINKED | SAME_WALLET"}},"tags":["user-management"]}},"/v1/user-management/status":{"get":{"summary":"Migration contract: what the platform knows about the caller’s old wallet","description":"Reached as GET /v1/migration/status. { linked, legacy: { evm, solana } | null, hasLegacyFunds, legacyFundsUsd, pendingOnramps, rekey }. legacy is null and linked false for an account that never linked.","security":[{"user-management_DecaneBearer":[]}],"responses":{"200":{"description":"StatusResult"},"401":{"description":"UNAUTHORIZED"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/stats":{"get":{"summary":"Migration progress: mapped/unmapped counts, wallet links, outbox backlog","security":[{"user-management_AdminApiKey":[]}],"responses":{"200":{"description":"IdentityStats"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/unmapped":{"get":{"summary":"Privy users with no Decane mapping yet (keyset paged by privyDid)","security":[{"user-management_AdminApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"{ items, nextCursor }"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/mappings":{"post":{"summary":"Record a manual mapping after investigating a collision","security":[{"user-management_AdminApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["privyDid","decaneUserId"],"properties":{"privyDid":{"type":"string","pattern":"^did:privy:"},"decaneUserId":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Mapping recorded and announced"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/seed-from-privy":{"post":{"summary":"Seed unmapped rows (DID, email, provider subject) from the Privy management API","security":[{"user-management_AdminApiKey":[]}],"responses":{"202":{"description":"{ seeded }"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/backfill":{"post":{"summary":"Deterministic Privy → Decane backfill (dry-run unless commit=true)","security":[{"user-management_AdminApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"boolean"}}}}}},"responses":{"200":{"description":"BackfillReport (collisions listed, never merged)"}},"tags":["user-management"]}},"/v1/user-management/admin/identity/publish-pending":{"post":{"summary":"Run one identity outbox pass now","security":[{"user-management_AdminApiKey":[]}],"responses":{"200":{"description":"{ mappings, wallets }"}},"tags":["user-management"]}}},"components":{"schemas":{"HealthResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","example":"api"},"uptimeSeconds":{"type":"integer"}}}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string","example":"NOT_FOUND"},"message":{"type":"string"},"details":{}}}}},"arkjet_BalanceView":{"type":"object","required":["playerId","currency","available","locked","pendingWithdrawal","total"],"properties":{"available":{"type":"string"},"currency":{"type":"string"},"locked":{"type":"string"},"pendingWithdrawal":{"type":"string"},"playerId":{"type":"string"},"total":{"type":"string"}}},"arkjet_BetList":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_BetView"}}}},"arkjet_BetStatus":{"type":"string","enum":["ACCEPTED","CASHED_OUT","LOST","CANCELLED"]},"arkjet_BetView":{"type":"object","required":["betId","roundId","panelId","currency","amount","maximumCashoutMultiplier","maximumPayout","reservedNetLiability","status","idempotencyKey","acceptedAt"],"properties":{"acceptedAt":{"type":"string"},"amount":{"type":"string"},"automaticCashoutMultiplier":{"type":["string","null"]},"betId":{"type":"string"},"cashoutMultiplier":{"type":["string","null"]},"currency":{"type":"string"},"idempotencyKey":{"type":"string"},"maximumCashoutMultiplier":{"type":"string"},"maximumPayout":{"type":"string"},"panelId":{"type":"string"},"payout":{"type":["string","null"]},"reservedNetLiability":{"type":"string"},"roundId":{"type":"string"},"settledAt":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/arkjet_BetStatus"}}},"arkjet_Capabilities":{"type":"object","required":["fairnessEnabled","roundEngineEnabled","wageringEnabled","settlementEnabled","chickenEnabled","riskModelVersion","algorithmVersions"],"properties":{"algorithmVersions":{"type":"array","items":{"type":"string"}},"chickenEnabled":{"type":"boolean"},"fairnessEnabled":{"type":"boolean"},"riskModelVersion":{"type":"string"},"roundEngineEnabled":{"type":"boolean"},"settlementEnabled":{"type":"boolean"},"wageringEnabled":{"type":"boolean"}}},"arkjet_ChatFeed":{"type":"object","required":["items","onlineCount"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_ChatMessage"}},"onlineCount":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ChatMessage":{"type":"object","required":["id","authorName","avatarSeed","text","createdAt","likeCount","viewerLiked","isOwn"],"properties":{"authorName":{"type":"string"},"avatarSeed":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"isOwn":{"type":"boolean"},"likeCount":{"type":"integer","format":"int64","minimum":0},"text":{"type":"string"},"viewerLiked":{"type":"boolean"}}},"arkjet_ChickenActionRequest":{"type":"object","required":["idempotencyKey","expectedVersion"],"properties":{"expectedVersion":{"type":"integer","format":"int64","minimum":0},"idempotencyKey":{"type":"string"}}},"arkjet_ChickenAutoplayRequest":{"type":"object","required":["amount","currency","difficulty","clientSeed","cashoutStep","idempotencyKey"],"properties":{"amount":{"type":"string"},"cashoutStep":{"type":"integer","format":"int32","minimum":0},"clientSeed":{"type":"string"},"currency":{"type":"string"},"difficulty":{"$ref":"#/components/schemas/arkjet_ChickenDifficulty"},"idempotencyKey":{"type":"string"}}},"arkjet_ChickenDifficulty":{"type":"string","enum":["easy","medium","hard"]},"arkjet_ChickenDifficultyRules":{"type":"object","required":["difficulty","payoutMultipliersHundredths"],"properties":{"difficulty":{"$ref":"#/components/schemas/arkjet_ChickenDifficulty"},"payoutMultipliersHundredths":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}}}},"arkjet_ChickenHistory":{"type":"object","required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_ChickenSessionView"}},"total":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ChickenLiquidityProof":{"type":"object","required":["maximumPayableStep","admissionReserveMinor","admissionReservedLiabilityMinor","reserveRiskBasisPoints","roundLiabilityCapMinor","maxPayoutPerBetMinor"],"properties":{"admissionReserveMinor":{"type":"integer","format":"int64","minimum":0},"admissionReservedLiabilityMinor":{"type":"integer","format":"int64","minimum":0},"crashStep":{"type":["integer","null"],"format":"int32","minimum":0},"maxPayoutPerBetMinor":{"type":"integer","format":"int64","minimum":0},"maximumPayableStep":{"type":"integer","format":"int32","minimum":0},"reserveRiskBasisPoints":{"type":"integer","format":"int32","minimum":0},"roundLiabilityCapMinor":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ChickenProof":{"type":"object","required":["algorithmVersion","sessionId","difficulty","rtpBasisPoints","stakeMinor","maximumStep","serverSeed","serverSeedCommitment","clientSeed","successfulSteps","attemptedSteps","terminalStatus","terminalPayoutMinor"],"properties":{"algorithmVersion":{"type":"string"},"attemptedSteps":{"type":"integer","format":"int32","minimum":0},"clientSeed":{"type":"string"},"difficulty":{"$ref":"#/components/schemas/arkjet_ChickenDifficulty"},"liquidity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/arkjet_ChickenLiquidityProof"}]},"maximumStep":{"type":"integer","format":"int32","minimum":0},"rtpBasisPoints":{"type":"integer","format":"int32","minimum":0},"serverSeed":{"type":"string"},"serverSeedCommitment":{"type":"string"},"sessionId":{"type":"string"},"stakeMinor":{"type":"integer","format":"int64","minimum":0},"successfulSteps":{"type":"integer","format":"int32","minimum":0},"terminalPayoutMinor":{"type":"integer","format":"int64","minimum":0},"terminalStatus":{"$ref":"#/components/schemas/arkjet_ChickenSessionStatus"}}},"arkjet_ChickenRules":{"type":"object","required":["algorithmVersion","hashAlgorithm","commitmentDomain","stepDomain","rtpBasisPoints","rtpPercent","houseEdgeBasisPoints","houseEdgePercent","reserveRiskBasisPoints","reserveRiskPercent","maximumSteps","multiplierModel","winningCondition","liabilityPolicy","difficulties"],"properties":{"algorithmVersion":{"type":"string"},"commitmentDomain":{"type":"string"},"difficulties":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_ChickenDifficultyRules"}},"hashAlgorithm":{"type":"string"},"houseEdgeBasisPoints":{"type":"integer","format":"int32","minimum":0},"houseEdgePercent":{"type":"string"},"liabilityPolicy":{"type":"string"},"maximumSteps":{"type":"integer","format":"int32","minimum":0},"multiplierModel":{"type":"string"},"reserveRiskBasisPoints":{"type":"integer","format":"int32","minimum":0},"reserveRiskPercent":{"type":"string"},"rtpBasisPoints":{"type":"integer","format":"int32","minimum":0},"rtpPercent":{"type":"string"},"stepDomain":{"type":"string"},"winningCondition":{"type":"string"}}},"arkjet_ChickenSessionStatus":{"type":"string","enum":["active","cashed_out","lost"]},"arkjet_ChickenSessionView":{"type":"object","required":["sessionId","status","difficulty","currency","amount","maximumStep","maximumPayableStep","currentStep","attemptedSteps","currentMultiplier","potentialPayout","maximumPayout","reservedNetLiability","serverSeedCommitment","clientSeed","algorithmVersion","rtpBasisPoints","version","steps","startedAt"],"properties":{"algorithmVersion":{"type":"string"},"amount":{"type":"string"},"attemptedSteps":{"type":"integer","format":"int32","minimum":0},"clientSeed":{"type":"string"},"currency":{"type":"string"},"currentMultiplier":{"type":"string"},"currentStep":{"type":"integer","format":"int32","minimum":0},"difficulty":{"$ref":"#/components/schemas/arkjet_ChickenDifficulty"},"liquidityCrashStep":{"type":["integer","null"],"format":"int32","minimum":0},"maximumPayableStep":{"type":"integer","format":"int32","minimum":0},"maximumPayout":{"type":"string"},"maximumStep":{"type":"integer","format":"int32","minimum":0},"payout":{"type":["string","null"]},"potentialPayout":{"type":"string"},"reservedNetLiability":{"type":"string"},"rtpBasisPoints":{"type":"integer","format":"int32","minimum":0},"serverSeed":{"type":["string","null"]},"serverSeedCommitment":{"type":"string"},"sessionId":{"type":"string"},"settledAt":{"type":["string","null"]},"startedAt":{"type":"string"},"status":{"$ref":"#/components/schemas/arkjet_ChickenSessionStatus"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_ChickenStepView"}},"version":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ChickenStepOutcomeReason":{"type":"string","enum":["random","liquidity"]},"arkjet_ChickenStepView":{"type":"object","required":["step","multiplierHundredths","multiplier","won","randomWon","outcomeReason","resultHash","randomValueHex"],"properties":{"multiplier":{"type":"string"},"multiplierHundredths":{"type":"integer","format":"int32","minimum":0},"outcomeReason":{"$ref":"#/components/schemas/arkjet_ChickenStepOutcomeReason"},"randomValueHex":{"type":"string"},"randomWon":{"type":"boolean"},"resultHash":{"type":"string"},"step":{"type":"integer","format":"int32","minimum":0},"won":{"type":"boolean"}}},"arkjet_ChickenVerificationResult":{"type":"object","required":["valid","commitmentValid","pathValid","payoutValid","liquidityPolicyValid","calculatedSteps"],"properties":{"calculatedSteps":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_ChickenStepView"}},"commitmentValid":{"type":"boolean"},"liquidityPolicyValid":{"type":"boolean"},"pathValid":{"type":"boolean"},"payoutValid":{"type":"boolean"},"valid":{"type":"boolean"}}},"arkjet_ClientSeedSelectionRules":{"type":"object","required":["requiredSeeds","seedBits","playerSelection","fallbackDerivation","fallbackDomainSeparator"],"properties":{"fallbackDerivation":{"type":"string"},"fallbackDomainSeparator":{"type":"string"},"playerSelection":{"type":"string"},"requiredSeeds":{"type":"integer","format":"int32","minimum":0},"seedBits":{"type":"integer","format":"int32","minimum":0}}},"arkjet_ClientSeedSource":{"type":"string","enum":["player","server_fallback"]},"arkjet_CommitmentRules":{"type":"object","required":["hashAlgorithm","serverSeedBits","domainSeparator","bindsRoundId"],"properties":{"bindsRoundId":{"type":"boolean"},"domainSeparator":{"type":"string"},"hashAlgorithm":{"type":"string"},"serverSeedBits":{"type":"integer","format":"int32","minimum":0}}},"arkjet_ConfirmDepositRequest":{"type":"object","required":["txHash"],"properties":{"txHash":{"type":"string"}}},"arkjet_CrashReason":{"type":"string","enum":["RANDOM","LIQUIDITY"]},"arkjet_CreateBetRequest":{"type":"object","required":["roundId","panelId","amount","currency","idempotencyKey"],"properties":{"amount":{"type":"string"},"autoCashoutMultiplier":{"type":["string","null"]},"clientSeed":{"type":["string","null"]},"currency":{"type":"string"},"idempotencyKey":{"type":"string"},"panelId":{"type":"string"},"roundId":{"type":"string"}}},"arkjet_CreateMessageRequest":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"arkjet_CreateWithdrawalRequest":{"type":"object","required":["amount","idempotencyKey"],"properties":{"amount":{"type":"string"},"idempotencyKey":{"type":"string"}}},"arkjet_CurrentCommitment":{"type":"object","required":["roundId","algorithmVersion","serverSeedCommitment","committedAt","bettingClosesAt"],"properties":{"algorithmVersion":{"type":"string"},"bettingClosesAt":{"type":"string"},"committedAt":{"type":"string"},"roundId":{"type":"string"},"serverSeedCommitment":{"type":"string"}}},"arkjet_DepositView":{"type":"object","required":["depositId","txHash","amountUsdc","creditedAmount","currency","status","creditedAt"],"properties":{"amountUsdc":{"type":"string"},"creditedAmount":{"type":"string"},"creditedAt":{"type":"string"},"currency":{"type":"string"},"depositId":{"type":"string"},"status":{"type":"string"},"txHash":{"type":"string"}}},"arkjet_FairnessProof":{"type":"object","required":["roundId","algorithmVersion","serverSeedCommitment","serverSeed","clientSeeds","resultHash","randomValueHex","multiplier"],"properties":{"algorithmVersion":{"type":"string"},"clientSeeds":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_SelectedClientSeed"}},"crashReason":{"type":["string","null"]},"effectiveMultiplier":{"type":["string","null"]},"liquidityCapMultiplier":{"type":["string","null"]},"liquidityModelVersion":{"type":["string","null"]},"liquiditySnapshotCommitment":{"type":["string","null"]},"liquiditySnapshots":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_LiquiditySnapshot"}},"metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/arkjet_ProofMetadata"}]},"multiplier":{"type":"string"},"randomValueHex":{"type":"string"},"resultHash":{"type":"string"},"roundId":{"type":"string"},"serverSeed":{"type":"string"},"serverSeedCommitment":{"type":"string"}}},"arkjet_FairnessRules":{"type":"object","required":["algorithmVersion","rtpBasisPoints","rtpPercent","formula","formulaOutput","playedCrashFormula","liquidityModelVersion","liquidityProof","commitment","result","rounding","clientSeedSelection"],"properties":{"algorithmVersion":{"type":"string"},"clientSeedSelection":{"$ref":"#/components/schemas/arkjet_ClientSeedSelectionRules"},"commitment":{"$ref":"#/components/schemas/arkjet_CommitmentRules"},"formula":{"type":"string"},"formulaOutput":{"type":"string"},"liquidityModelVersion":{"type":"string"},"liquidityProof":{"$ref":"#/components/schemas/arkjet_LiquidityProofRules"},"playedCrashFormula":{"type":"string"},"result":{"$ref":"#/components/schemas/arkjet_ResultRules"},"rounding":{"$ref":"#/components/schemas/arkjet_RoundingRules"},"rtpBasisPoints":{"type":"integer","format":"int32","minimum":0},"rtpPercent":{"type":"string"}}},"arkjet_FundingConfigView":{"type":"object","required":["chainId","tokenSymbol","tokenAddress","tokenDecimals","depositAddress","requiredConfirmations","currency","currencyDecimalPlaces","ngnMinorPerUsdc","withdrawalFeeBps","withdrawalsEnabled","simulatedWithdrawals"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"currency":{"type":"string"},"currencyDecimalPlaces":{"type":"integer","format":"int32","minimum":0},"depositAddress":{"type":"string"},"ngnMinorPerUsdc":{"type":"string"},"requiredConfirmations":{"type":"integer","format":"int64","minimum":0},"simulatedWithdrawals":{"type":"boolean"},"tokenAddress":{"type":"string"},"tokenDecimals":{"type":"integer","format":"int32","minimum":0},"tokenSymbol":{"type":"string"},"withdrawalFeeBps":{"type":"integer","format":"int32","minimum":0},"withdrawalsEnabled":{"type":"boolean"}}},"arkjet_HealthStatus":{"type":"object","required":["status","service","uptimeSeconds"],"properties":{"service":{"type":"string"},"status":{"type":"string"},"uptimeSeconds":{"type":"integer","format":"int64","minimum":0}}},"arkjet_LedgerCreditRequest":{"type":"object","required":["amount","currency","idempotencyKey"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"idempotencyKey":{"type":"string"}}},"arkjet_LikeResult":{"type":"object","required":["messageId","liked","likeCount"],"properties":{"likeCount":{"type":"integer","format":"int64","minimum":0},"liked":{"type":"boolean"},"messageId":{"type":"string"}}},"arkjet_LiquidityProofRules":{"type":"object","required":["requiredForAlgorithm","hashAlgorithm","domainSeparator","commitmentTiming","canonicalEncoding"],"properties":{"canonicalEncoding":{"type":"string"},"commitmentTiming":{"type":"string"},"domainSeparator":{"type":"string"},"hashAlgorithm":{"type":"string"},"requiredForAlgorithm":{"type":"string"}}},"arkjet_LiquiditySnapshot":{"type":"object","required":["sequence","trigger","stakeMinor","payoutMinor","releasedLiabilityMinor","reserveBalanceMinor","reservedLiabilityMinor","activeStakeMinor","activeBetCount","reserveVersion","snapshotHash"],"properties":{"activeBetCount":{"type":"integer","format":"int64","minimum":0},"activeStakeMinor":{"type":"string"},"configuredRoundLiabilityCapMinor":{"type":["string","null"]},"liquidityCapMultiplier":{"type":["string","null"]},"payoutMinor":{"type":"string"},"previousHash":{"type":["string","null"]},"protectedReserveFloorMinor":{"type":["string","null"]},"releasedLiabilityMinor":{"type":"string"},"reserveBalanceMinor":{"type":"string"},"reserveRiskBasisPoints":{"type":["integer","null"],"format":"int32","minimum":0},"reserveVersion":{"type":"integer","format":"int64","minimum":0},"reservedLiabilityMinor":{"type":"string"},"roundRiskBudgetMinor":{"type":["string","null"]},"sequence":{"type":"integer","format":"int64","minimum":0},"snapshotHash":{"type":"string"},"stakeMinor":{"type":"string"},"trigger":{"$ref":"#/components/schemas/arkjet_LiquiditySnapshotTrigger"},"triggerBetId":{"type":["string","null"]}}},"arkjet_LiquiditySnapshotTrigger":{"type":"string","enum":["round_lock","cashout"]},"arkjet_Presence":{"type":"object","required":["onlineCount"],"properties":{"onlineCount":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ProofMetadata":{"type":"object","required":["committedAt","revealedAt"],"properties":{"committedAt":{"type":"string"},"revealedAt":{"type":"string"}}},"arkjet_ReadinessStatus":{"type":"object","required":["status","service","database"],"properties":{"database":{"type":"boolean"},"service":{"type":"string"},"status":{"type":"string"}}},"arkjet_ReserveView":{"type":"object","required":["currency","balance","reservedLiability","availableLiquidity","version"],"properties":{"availableLiquidity":{"type":"string"},"balance":{"type":"string"},"currency":{"type":"string"},"reservedLiability":{"type":"string"},"version":{"type":"integer","format":"int64","minimum":0}}},"arkjet_ResultRules":{"type":"object","required":["hashAlgorithm","entropyBits","domainSeparator","cashoutWinningCondition","minimumCashoutMultiplier","lowResultDistribution"],"properties":{"cashoutWinningCondition":{"type":"string"},"domainSeparator":{"type":"string"},"entropyBits":{"type":"integer","format":"int32","minimum":0},"hashAlgorithm":{"type":"string"},"lowResultDistribution":{"type":"string"},"minimumCashoutMultiplier":{"type":"string"}}},"arkjet_RiskRules":{"type":"object","required":["modelVersion","currency","currencyDecimalPlaces","minimumBet","minimumBetMinor","minimumCashoutMultiplier","maximumCashoutMultiplier","reserveRiskBasisPoints","reserveRiskPercent","reserveModel","moneyRepresentation","feePolicy","availableFundsFormula","solvencyInvariant","liquidityCapFormula","liquidityCapPolicy","betLiabilityFormula","betAdmissionFormula","cashoutPolicy","outcomeFormula","shortfallPolicy"],"properties":{"availableFundsFormula":{"type":"string"},"betAdmissionFormula":{"type":"string"},"betLiabilityFormula":{"type":"string"},"cashoutPolicy":{"type":"string"},"currency":{"type":"string"},"currencyDecimalPlaces":{"type":"integer","format":"int32","minimum":0},"feePolicy":{"type":"string"},"liquidityCapFormula":{"type":"string"},"liquidityCapPolicy":{"type":"string"},"maximumCashoutMultiplier":{"type":"string"},"minimumBet":{"type":"string"},"minimumBetMinor":{"type":"integer","format":"int64","minimum":0},"minimumCashoutMultiplier":{"type":"string"},"modelVersion":{"type":"string"},"moneyRepresentation":{"type":"string"},"outcomeFormula":{"type":"string"},"reserveModel":{"type":"string"},"reserveRiskBasisPoints":{"type":"integer","format":"int32","minimum":0},"reserveRiskPercent":{"type":"string"},"shortfallPolicy":{"type":"string"},"solvencyInvariant":{"type":"string"}}},"arkjet_RoundHistory":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/arkjet_RoundView"}},"nextBeforeSequence":{"type":["integer","null"],"format":"int64","minimum":0}}},"arkjet_RoundStatus":{"type":"string","enum":["COMMITTED","LOCKED","RUNNING","REVEALED","CANCELLED"]},"arkjet_RoundView":{"type":"object","required":["roundId","sequence","status","algorithmVersion","serverSeedCommitment","committedAt","bettingClosesAt"],"properties":{"algorithmVersion":{"type":"string"},"bettingClosesAt":{"type":"string"},"cancellationReason":{"type":["string","null"]},"committedAt":{"type":"string"},"configuredRoundLiabilityCapMinor":{"type":["string","null"]},"crashAt":{"type":["string","null"]},"crashMultiplier":{"type":["string","null"]},"crashReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/arkjet_CrashReason"}]},"currentMultiplier":{"type":["string","null"]},"liquidityCapMultiplier":{"type":["string","null"]},"liquiditySnapshotCommitment":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"protectedReserveFloorMinor":{"type":["string","null"]},"randomCrashMultiplier":{"type":["string","null"]},"reserveRiskBasisPoints":{"type":["integer","null"],"format":"int32","minimum":0},"revealedAt":{"type":["string","null"]},"roundId":{"type":"string"},"roundRiskBudgetMinor":{"type":["string","null"]},"runningAt":{"type":["string","null"]},"sequence":{"type":"integer","format":"int64","minimum":0},"serverSeedCommitment":{"type":"string"},"status":{"$ref":"#/components/schemas/arkjet_RoundStatus"}}},"arkjet_RoundingRules":{"type":"object","required":["policy","decimalPlaces","minimumMultiplier"],"properties":{"decimalPlaces":{"type":"integer","format":"int32","minimum":0},"minimumMultiplier":{"type":"string"},"policy":{"type":"string"}}},"arkjet_SelectedClientSeed":{"type":"object","required":["position","source","seed"],"properties":{"acceptedSequence":{"type":["integer","null"],"format":"int64","minimum":0},"position":{"type":"integer","format":"int32","minimum":0},"seed":{"type":"string"},"source":{"$ref":"#/components/schemas/arkjet_ClientSeedSource"}}},"arkjet_ServiceInfo":{"type":"object","required":["service","version","phase"],"properties":{"phase":{"type":"string"},"service":{"type":"string"},"version":{"type":"string"}}},"arkjet_StartChickenRequest":{"type":"object","required":["amount","currency","difficulty","clientSeed","idempotencyKey"],"properties":{"amount":{"type":"string"},"clientSeed":{"type":"string"},"currency":{"type":"string"},"difficulty":{"$ref":"#/components/schemas/arkjet_ChickenDifficulty"},"idempotencyKey":{"type":"string"}}},"arkjet_VerificationChecks":{"type":"object","required":["algorithmVersion","proofShape","serverSeedCommitment","fallbackSeeds","resultHash","randomValue","multiplier","liquidityModelVersion","liquiditySnapshotChain","liquidityStateTransitions","liquidityCap","effectiveMultiplier","crashReason"],"properties":{"algorithmVersion":{"type":"boolean"},"crashReason":{"type":"boolean"},"effectiveMultiplier":{"type":"boolean"},"fallbackSeeds":{"type":"boolean"},"liquidityCap":{"type":"boolean"},"liquidityModelVersion":{"type":"boolean"},"liquiditySnapshotChain":{"type":"boolean"},"liquidityStateTransitions":{"type":"boolean"},"multiplier":{"type":"boolean"},"proofShape":{"type":"boolean"},"randomValue":{"type":"boolean"},"resultHash":{"type":"boolean"},"serverSeedCommitment":{"type":"boolean"}}},"arkjet_VerificationResult":{"type":"object","required":["valid","checks"],"properties":{"calculatedEffectiveMultiplier":{"type":["string","null"]},"calculatedLiquidityCapMultiplier":{"type":["string","null"]},"calculatedMultiplier":{"type":["string","null"]},"calculatedRandomValueHex":{"type":["string","null"]},"calculatedResultHash":{"type":["string","null"]},"calculatedServerSeedCommitment":{"type":["string","null"]},"checks":{"$ref":"#/components/schemas/arkjet_VerificationChecks"},"valid":{"type":"boolean"}}},"arkjet_WithdrawalView":{"type":"object","required":["withdrawalId","toAddress","amount","fee","amountUsdc","currency","status","createdAt"],"properties":{"amount":{"type":"string"},"amountUsdc":{"type":"string"},"createdAt":{"type":"string"},"currency":{"type":"string"},"fee":{"type":"string"},"sentAt":{"type":["string","null"]},"status":{"type":"string"},"toAddress":{"type":"string"},"txHash":{"type":["string","null"]},"withdrawalId":{"type":"string"}}},"perp_JoinWaitlistRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":320,"example":"trader@example.com","description":"Normalized server-side (trimmed, lowercased)."},"source":{"type":"string","maxLength":64,"example":"launch-landing-page","description":"Optional marketing-attribution tag (campaign, page, referrer)."}}},"perp_WaitlistEntry":{"type":"object","properties":{"email":{"type":"string","example":"trader@example.com"},"source":{"type":"string","example":"launch-landing-page"},"createdAt":{"type":"string","format":"date-time"}}},"perp_WaitlistListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/perp_WaitlistEntry"}},"total":{"type":"integer","description":"Total signups on the list."},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}},"perp_WaitlistDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"email":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}}}}},"perp_WaitlistJoinResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"email":{"type":"string","description":"The normalized email that was recorded."},"alreadyJoined":{"type":"boolean","description":"True when the email was already on the list (200 instead of 201)."}}}}},"perp_ArkWallet":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"address":{"type":"string"},"isActive":{"type":"boolean"},"smartAccountUpgradedAt":{"type":"string","format":"date-time","nullable":true},"dextopusDepositAddress":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"perp_WalletResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_ArkWallet"}}},"perp_ArkAsset":{"type":"object","properties":{"id":{"type":"string"},"assetIndex":{"type":"integer"},"dex":{"type":"string","example":""},"symbol":{"type":"string","example":"BTC"},"category":{"type":"string","nullable":true,"example":"crypto"},"szDecimals":{"type":"integer"},"maxLeverage":{"type":"integer"},"isActive":{"type":"boolean"}}},"perp_AssetListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_ArkAsset"}}}},"perp_AssetContext":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC"},"markPrice":{"type":"string"},"oraclePrice":{"type":"string"},"prevDayPrice":{"type":"string","description":"24h change basis: (markPrice - prevDayPrice) / prevDayPrice."},"dayVolumeUsd":{"type":"string"},"openInterest":{"type":"string","description":"Base asset units, not USD."},"fundingRate":{"type":"string"}}},"perp_MarketContextListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_AssetContext"}}}},"perp_FundingHistoryEntry":{"type":"object","properties":{"coin":{"type":"string"},"fundingRate":{"type":"string"},"premium":{"type":"string"},"time":{"type":"integer","description":"Unix ms."}}},"perp_Candle":{"type":"object","properties":{"t":{"type":"integer","description":"Open time, unix ms."},"T":{"type":"integer","description":"Close time, unix ms."},"s":{"type":"string"},"i":{"type":"string"},"o":{"type":"string"},"c":{"type":"string"},"h":{"type":"string"},"l":{"type":"string"},"v":{"type":"string","description":"Volume in the base asset, not USD."},"n":{"type":"integer"}}},"perp_CandlesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_Candle"}}}},"perp_FundingHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_FundingHistoryEntry"}}}},"perp_ArkPricesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":{"type":"string"},"example":{"BTC":"65000.5","ETH":"3200.1"}}}},"perp_AccountStateResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","description":"Live margin summary, withdrawable balance, and open positions, passed through unmodified.","properties":{"withdrawable":{"type":"string"},"marginSummary":{"type":"object"},"crossMarginSummary":{"type":"object"},"assetPositions":{"type":"array","items":{"type":"object"}}}}}},"perp_ArbitrumBalanceResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"balance":{"type":"string","example":"12.345678"}}}}},"perp_ArkPositionView":{"type":"object","properties":{"id":{"type":"string"},"walletId":{"type":"string"},"assetId":{"type":"string"},"side":{"type":"string","enum":["long","short"]},"size":{"type":"string"},"entryPrice":{"type":"string"},"leverage":{"type":"integer"},"marginMode":{"type":"string","enum":["isolated","cross"]},"status":{"type":"string","enum":["open","closed"]},"markPrice":{"type":"string","nullable":true},"unrealizedPnlUsdc":{"type":"string","nullable":true},"accruedFundingUsdc":{"type":"string","description":"Not yet computed — always \"0\" for now."},"openedAt":{"type":"string","format":"date-time"}}},"perp_ArkPositionListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_ArkPositionView"}}}},"perp_ArkClosedPositionView":{"type":"object","properties":{"id":{"type":"string"},"walletId":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string","example":"BTC"},"side":{"type":"string","enum":["long","short"]},"size":{"type":"string"},"entryPrice":{"type":"string"},"leverage":{"type":"integer"},"marginMode":{"type":"string","enum":["isolated","cross"]},"status":{"type":"string","enum":["closed"]},"closeReason":{"type":"string","enum":["take_profit","stop_loss","manual_close","liquidation","reconciled"]},"closePrice":{"type":"string"},"realizedPnlUsdc":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"}}},"perp_ArkClosedPositionListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_ArkClosedPositionView"}}}},"perp_ArkOrderRow":{"type":"object","properties":{"id":{"type":"string"},"walletId":{"type":"string"},"assetId":{"type":"string"},"cloid":{"type":"string"},"externalOrderId":{"type":"string","nullable":true},"parentOrderId":{"type":"string","nullable":true},"orderType":{"type":"string","enum":["market","limit","take_profit","stop_loss"]},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string"},"limitPrice":{"type":"string","nullable":true},"reduceOnly":{"type":"boolean"},"status":{"type":"string","enum":["submitted","open","partially_filled","filled","cancelled","rejected"]}}},"perp_ArkOrderListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/perp_ArkOrderRow"}}}},"perp_ArkSignature":{"type":"object","description":"An ECDSA signature {r, s, v} produced CLIENT-SIDE by the wallet's own embedded key.","required":["r","s","v"],"properties":{"r":{"type":"string"},"s":{"type":"string"},"v":{"type":"number"}}},"perp_PlaceOrderRequest":{"type":"object","required":["walletId","assetSymbol","side","size"],"properties":{"walletId":{"type":"string"},"assetSymbol":{"type":"string","example":"ETH"},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string","description":"Decimal string, base units","example":"1.5"},"limitPrice":{"type":"string","description":"Omit for a market order"},"takeProfitPrice":{"type":"string"},"stopLossPrice":{"type":"string"},"slippagePct":{"type":"number","maximum":0.2,"description":"Market-order slippage tolerance"}}},"perp_PreparedOrder":{"type":"object","description":"The unsigned action wire format plus the cloids the client must sign and echo back unchanged.","properties":{"action":{"type":"object","description":"Signed action (type: \"order\"), canonicalized key order."},"nonce":{"type":"integer"},"entryCloid":{"type":"string"},"takeProfitCloid":{"type":"string","nullable":true},"stopLossCloid":{"type":"string","nullable":true}}},"perp_PreparedOrderResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_PreparedOrder"}}},"perp_SubmitOrderRequest":{"type":"object","required":["walletId","prepared","signature"],"properties":{"walletId":{"type":"string"},"prepared":{"allOf":[{"$ref":"#/components/schemas/perp_PreparedOrder"}],"description":"Echoed back verbatim from /ark/orders/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_ArkOrder":{"type":"object","description":"One leg of the placed order (entry, take-profit, or stop-loss).","properties":{"id":{"type":"string"},"externalOrderId":{"type":"string","nullable":true,"description":"Order id, once accepted"},"orderType":{"type":"string","enum":["market","limit","take_profit","stop_loss","close"]},"status":{"type":"string","enum":["submitted","open","partially_filled","filled","cancelled","rejected"]}}},"perp_ArkOrderResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_ArkOrder"}}},"perp_PlaceOrderResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"entryOrder":{"$ref":"#/components/schemas/perp_ArkOrder"},"takeProfitOrder":{"allOf":[{"$ref":"#/components/schemas/perp_ArkOrder"}],"nullable":true},"stopLossOrder":{"allOf":[{"$ref":"#/components/schemas/perp_ArkOrder"}],"nullable":true}}}}},"perp_PrepareLeverageRequest":{"type":"object","required":["walletId","assetSymbol","leverage","marginMode"],"properties":{"walletId":{"type":"string"},"assetSymbol":{"type":"string","example":"ETH"},"leverage":{"type":"integer","minimum":1,"maximum":200},"marginMode":{"type":"string","enum":["isolated","cross"]}}},"perp_PreparedLeverageResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","description":"{ action, nonce } to sign, or { alreadySet: true } if the setting is already what was requested.","properties":{"action":{"type":"object","description":"Signed action (type: \"updateLeverage\")."},"nonce":{"type":"integer"},"alreadySet":{"type":"boolean"}}}}},"perp_SubmitLeverageRequest":{"type":"object","required":["walletId","action","nonce","signature"],"properties":{"walletId":{"type":"string"},"action":{"type":"object","description":"Echoed back verbatim from /ark/leverage/prepare."},"nonce":{"type":"integer"},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_UpdatedResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"updated":{"type":"boolean","enum":[true]}}}}},"perp_PrepareCancelOrderRequest":{"type":"object","required":["walletId","orderId"],"properties":{"walletId":{"type":"string"},"orderId":{"type":"string","description":"Our own order id, not the externalOrderId."}}},"perp_PreparedCancel":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"cancel\")."},"nonce":{"type":"integer"},"orderId":{"type":"string"}}},"perp_PreparedCancelResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_PreparedCancel"}}},"perp_SubmitCancelOrderRequest":{"type":"object","required":["walletId","prepared","signature"],"properties":{"walletId":{"type":"string"},"prepared":{"allOf":[{"$ref":"#/components/schemas/perp_PreparedCancel"}],"description":"Echoed back verbatim from /ark/orders/cancel/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_PrepareClosePositionRequest":{"type":"object","required":["walletId","positionId"],"properties":{"walletId":{"type":"string"},"positionId":{"type":"string"},"size":{"type":"string","description":"Partial-close size, decimal string; defaults to the full position."},"slippagePct":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":0.2}}},"perp_PreparedClosePosition":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"order\"), a single reduce-only IOC leg."},"nonce":{"type":"integer"},"cloid":{"type":"string"},"positionId":{"type":"string"}}},"perp_PreparedClosePositionResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_PreparedClosePosition"}}},"perp_SubmitClosePositionRequest":{"type":"object","required":["walletId","prepared","signature"],"properties":{"walletId":{"type":"string"},"prepared":{"allOf":[{"$ref":"#/components/schemas/perp_PreparedClosePosition"}],"description":"Echoed back verbatim from /ark/positions/close/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_ClosePositionResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"closeOrder":{"$ref":"#/components/schemas/perp_ArkOrder"}}}}},"perp_PrepareTriggerOrderRequest":{"type":"object","required":["walletId","positionId","kind","triggerPrice"],"properties":{"walletId":{"type":"string"},"positionId":{"type":"string"},"kind":{"type":"string","enum":["take_profit","stop_loss"]},"triggerPrice":{"type":"string"}}},"perp_PreparedTriggerOrder":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"order\"), a single reduce-only trigger leg."},"nonce":{"type":"integer"},"cloid":{"type":"string"},"positionId":{"type":"string"},"kind":{"type":"string","enum":["take_profit","stop_loss"]}}},"perp_PreparedTriggerOrderResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/perp_PreparedTriggerOrder"}}},"perp_SubmitTriggerOrderRequest":{"type":"object","required":["walletId","prepared","signature"],"properties":{"walletId":{"type":"string"},"prepared":{"allOf":[{"$ref":"#/components/schemas/perp_PreparedTriggerOrder"}],"description":"Echoed back verbatim from /ark/orders/trigger/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_PrepareBridgeRequest":{"type":"object","required":["walletId"],"properties":{"walletId":{"type":"string"}}},"perp_PreparedBridgeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","description":"Unsigned calldata for the client to send itself, bridging the wallet's entire Arbitrum USDC balance.","properties":{"to":{"type":"string","description":"The Arbitrum USDC contract address."},"data":{"type":"string","description":"ABI-encoded ERC-20 transfer calldata."},"value":{"type":"string","example":"0"},"amountUsdc":{"type":"string"}}}}},"perp_ConfirmBridgeRequest":{"type":"object","required":["walletId","txHash","amountUsdc"],"properties":{"walletId":{"type":"string"},"txHash":{"type":"string","description":"The hash of the transfer the client already broadcast."},"amountUsdc":{"type":"string","description":"Decimal string"}}},"perp_BridgeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"treasuryMovementId":{"type":"string","description":"Track this id for settlement status."}}}}},"perp_PrepareWithdrawalRequest":{"type":"object","required":["walletId","amountUsdc"],"properties":{"walletId":{"type":"string"},"amountUsdc":{"type":"string","description":"Decimal string","example":"100"}}},"perp_PreparedWithdrawalResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"withdraw3\")."},"nonce":{"type":"integer"}}}}},"perp_SubmitWithdrawalRequest":{"type":"object","required":["walletId","action","signature"],"properties":{"walletId":{"type":"string"},"action":{"type":"object","description":"Echoed back verbatim from /ark/withdrawals/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_WithdrawalResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"treasuryMovementId":{"type":"string","description":"Track this id for settlement status."}}}}},"perp_PendingWithdrawalResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","nullable":true,"properties":{"treasuryMovementId":{"type":"string"},"amountUsdc":{"type":"string","description":"Decimal string."},"status":{"type":"string","enum":["pending","confirmed","failed","stuck"]}}}}},"perp_BuilderFeeStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"approved":{"type":"boolean"},"maxFeeRateTenthsBps":{"type":"integer","description":"What the wallet has already granted the treasury — 0 if never approved."}}}}},"perp_PrepareBuilderFeeApprovalRequest":{"type":"object","required":["walletId"],"properties":{"walletId":{"type":"string"}}},"perp_PreparedBuilderFeeApprovalResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"approveBuilderFee\")."},"nonce":{"type":"integer"}}}}},"perp_SubmitBuilderFeeApprovalRequest":{"type":"object","required":["walletId","action","signature"],"properties":{"walletId":{"type":"string"},"action":{"type":"object","description":"Echoed back verbatim from /ark/builder-fee/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_BuilderFeeApprovalResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"approved":{"type":"boolean","enum":[true]}}}}},"perp_AbstractionModeStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"mode":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin"]},"eligibleForBuilderFees":{"type":"boolean"}}}}},"perp_PrepareAbstractionModeRequest":{"type":"object","required":["walletId","abstraction"],"properties":{"walletId":{"type":"string"},"abstraction":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin"]}}},"perp_PreparedAbstractionModeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"action":{"type":"object","description":"Signed action (type: \"userSetAbstraction\")."},"nonce":{"type":"integer"}}}}},"perp_SubmitAbstractionModeRequest":{"type":"object","required":["walletId","action","signature"],"properties":{"walletId":{"type":"string"},"action":{"type":"object","description":"Echoed back verbatim from /ark/abstraction-mode/prepare."},"signature":{"$ref":"#/components/schemas/perp_ArkSignature"}}},"perp_AbstractionModeChangeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"mode":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin"]}}}}},"perp_RewardsStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"unclaimedRewards":{"type":"string","description":"Decimal string, USDC."},"claimedRewards":{"type":"string","description":"Decimal string."},"builderRewards":{"type":"string","description":"Decimal string."}}}}},"perp_HealthResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","example":"perp"},"uptimeSeconds":{"type":"integer"}}}}},"perp_ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string","description":"VALIDATION_ERROR | NOT_FOUND | CONTRACT_ERROR | SERVICE_UNAVAILABLE"},"message":{"type":"string"},"details":{}}}}},"gas-sponsor_AuthContract":{"type":"object","required":["transport","verificationConfigured","verificationImplemented","note"],"properties":{"note":{"type":"string"},"transport":{"type":"array","items":{"type":"string"}},"verificationConfigured":{"type":"boolean"},"verificationImplemented":{"type":"boolean"}}},"gas-sponsor_BackingStores":{"type":"object","required":["databaseUrlPresent","redisUrlPresent","rabbitmqConfigured"],"properties":{"databaseUrlPresent":{"type":"boolean"},"rabbitmqConfigured":{"type":"boolean"},"redisUrlPresent":{"type":"boolean"}}},"gas-sponsor_CapabilitiesResponse":{"type":"object","required":["auth","solana","stores"],"properties":{"auth":{"$ref":"#/components/schemas/gas-sponsor_AuthContract"},"solana":{"$ref":"#/components/schemas/gas-sponsor_SolanaCapabilities"},"stores":{"$ref":"#/components/schemas/gas-sponsor_BackingStores"}}},"gas-sponsor_HealthStatus":{"type":"object","required":["status","service","uptimeSeconds"],"properties":{"service":{"type":"string"},"status":{"type":"string"},"uptimeSeconds":{"type":"integer","format":"int64","minimum":0}}},"gas-sponsor_SolanaCapabilities":{"type":"object","required":["previewOnly","configured","signer","sponsorRpcUrl","sponsorshipPath","requiresPrivyAuth","defaultPrefundRent"],"properties":{"configured":{"type":"boolean"},"defaultPrefundRent":{"type":"boolean"},"previewOnly":{"type":"boolean"},"requiresPrivyAuth":{"type":"boolean"},"signer":{"type":"string"},"sponsorPublicKey":{"type":["string","null"]},"sponsorRpcUrl":{"type":"string"},"sponsorshipPath":{"type":"string"}}},"gas-sponsor_SolanaSponsorRequest":{"type":"object","required":["serializedTransaction"],"properties":{"prefundRent":{"type":["boolean","null"]},"serializedTransaction":{"type":"string"}}},"gas-sponsor_SolanaSponsorResponse":{"type":"object","required":["previewOnly","configured","signer","sponsorPublicKey","serializedTransactionBytes","sponsoredSerializedTransaction","prefundRent","note"],"properties":{"configured":{"type":"boolean"},"note":{"type":"string"},"prefundRent":{"type":"boolean"},"previewOnly":{"type":"boolean"},"serializedTransactionBytes":{"type":"integer","minimum":0},"signer":{"type":"string"},"sponsorPublicKey":{"type":"string"},"sponsoredSerializedTransaction":{"type":"string"},"submittedSignature":{"type":["string","null"]}}},"kash_UsernameAvailabilityResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"username":{"type":"string","description":"Normalized (lower-case, trimmed)"},"available":{"type":"boolean"},"reason":{"type":"string","description":"Why not, when unavailable"}}}}},"kash_ProfileResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"wallet":{"type":"string"},"username":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}}}}},"kash_ReferralClaimResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"referrerWallet":{"type":"string"},"code":{"type":"string"},"claimedAt":{"type":"string","format":"date-time"}}}}},"kash_ReferralStatsResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"wallet":{"type":"string"},"username":{"type":"string","nullable":true},"referred":{"type":"integer","description":"Referees who have deposited"},"pending":{"type":"integer","description":"Referees who claimed but have not deposited yet"}}}}},"kash_PurchaseRequest":{"type":"object","required":["wallet","usdcAmount"],"properties":{"wallet":{"type":"string","example":"0x1111111111111111111111111111111111111111"},"usdcAmount":{"type":"string","description":"Decimal string","example":"10"},"paymentTxHash":{"type":"string","description":"On-chain USDC payment tx to the treasury wallet — REQUIRED in real-USDC mode; verified and usable exactly once."}}},"kash_Purchase":{"type":"object","properties":{"id":{"type":"string"},"wallet":{"type":"string"},"usdcPaid":{"type":"string","example":"10"},"kashReceived":{"type":"string","example":"10000"},"kashPriceUsd":{"type":"string","example":"0.001"},"createdAt":{"type":"string","format":"date-time"},"mintTxHash":{"type":"string","description":"Token mint tx (mock or real)."}}},"kash_PurchaseResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/kash_Purchase"}}},"kash_ActivityRequest":{"type":"object","required":["wallet","type","notionalUsd"],"properties":{"wallet":{"type":"string"},"type":{"type":"string","enum":["buy","sell","trade"]},"notionalUsd":{"type":"string","description":"Decimal string","example":"100"},"ref":{"type":"string","description":"Optional ledger reference"}}},"kash_Accrual":{"type":"object","properties":{"applied":{"type":"boolean"},"reason":{"type":"string","enum":["locked","duplicate","epoch_usd_budget","epoch_kash_cap","allocation_exhausted","dust"],"description":"Why no reward was granted (present when applied=false)."},"wallet":{"type":"string"},"type":{"type":"string"},"notionalUsd":{"type":"string","example":"100"},"feeUsd":{"type":"string","example":"0.3"},"points":{"type":"string","example":"12.5"},"pointsBreakdown":{"type":"array","description":"Audit: the subscription tier and flat revenue share applied (always exactly one entry — no volume banding).","items":{"type":"object","properties":{"tier":{"type":"integer"},"volumeUsd":{"type":"string"},"sharePct":{"type":"string"},"points":{"type":"string"}}}},"rewardUsd":{"type":"string","example":"0.0125","description":"points × POINT_VALUE_USD"},"kashEarned":{"type":"string","example":"12.5"},"kashPriceUsd":{"type":"string","example":"0.001"},"balance":{"type":"string"},"lifetimeEarned":{"type":"string"},"vesting":{"type":"array","description":"30-day weekly tranches created by this accrual.","items":{"type":"object","properties":{"amount":{"type":"string"},"vestsAt":{"type":"string","format":"date-time"},"released":{"type":"boolean"}}}},"mintTxHash":{"type":"string"}}},"kash_AccrualResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/kash_Accrual"}}},"kash_Account":{"type":"object","properties":{"wallet":{"type":"string"},"balance":{"type":"string","example":"10012.5"},"balanceUsd":{"type":"string","example":"10.0125"},"lifetimeEarned":{"type":"string","example":"12.5"},"purchased":{"type":"string","example":"10000"},"vesting":{"type":"string","example":"12.5","description":"Earned KSH still locked."},"convertible":{"type":"string","example":"10000","description":"KSH redeemable at the desk right now (balance − vesting)."},"gate":{"type":"object","description":"The single holding gate: hold minHoldingKash to earn.","properties":{"minHoldingKash":{"type":"string","example":"10000"},"met":{"type":"boolean"},"shortfall":{"type":"string","example":"0"},"vestingPaused":{"type":"boolean","description":"True while below the gate — tranche maturation is suspended."}}},"vestingSchedule":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string"},"vestsAt":{"type":"string","format":"date-time"},"released":{"type":"boolean"}}}},"kashPriceUsd":{"type":"string","example":"0.001"}}},"kash_AccountResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/kash_Account"}}},"kash_SubscribeRequest":{"type":"object","required":["wallet","tier"],"properties":{"wallet":{"type":"string"},"tier":{"type":"integer","minimum":2,"example":3},"paymentTxHash":{"type":"string","description":"On-chain USDC payment (required in real-USDC mode)."}}},"kash_StatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"price":{"type":"object"},"treasury":{"type":"object"},"supply":{"type":"object"},"rewards":{"type":"object"},"points":{"type":"object","description":"Marginal slice bounds + rates + point value."},"gate":{"type":"object"},"vesting":{"type":"object"},"desk":{"type":"object"},"epoch":{"type":"object"},"coverage":{"type":"object","description":"Circuit-breaker state and floors."},"chainMode":{"type":"string","enum":["mock","ethers","off"]}}}}},"kash_SettlementResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"weekKey":{"type":"string","example":"2026-08-01T00:00:00.000Z"},"windowStart":{"type":"string","format":"date-time"},"windowEnd":{"type":"string","format":"date-time"},"settlesAt":{"type":"string","format":"date-time"},"settled":{"type":"boolean"},"wallets":{"type":"integer"},"points":{"type":"string","description":"Decimal string, never a float"},"kash":{"type":"string"},"priceUsd":{"type":"string","nullable":true}}}}},"kash_ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string","description":"VALIDATION_ERROR | CONFLICT | NOT_FOUND | SERVICE_UNAVAILABLE"},"message":{"type":"string"},"details":{}}}}},"prediction_AcceptComboQuoteRequest":{"type":"object","required":["quote_id","signed_order"],"properties":{"quote_id":{"type":"string"},"signed_order":{"$ref":"#/components/schemas/prediction_SignedComboOrder"}},"additionalProperties":false},"prediction_ApprovalRequirement":{"type":"object","required":["chainId","token","spender","amountAtomic"],"properties":{"amountAtomic":{"type":"string"},"chainId":{"type":"integer","format":"int64","minimum":0},"spender":{"type":"string"},"token":{"type":"string"}}},"prediction_AvailableFreebets":{"type":"object","required":["environment","token","bonuses"],"properties":{"bonuses":{"type":"array","items":{"$ref":"#/components/schemas/prediction_FreebetView"}},"environment":{"type":"string"},"token":{"$ref":"#/components/schemas/prediction_BetToken"}}},"prediction_AvailableFreebetsRequest":{"type":"object","required":["selections"],"properties":{"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_FreebetSelection"}}},"additionalProperties":false},"prediction_BetCalculation":{"type":"object","required":["provider","environment","selections","minimumStake","maximumStake","maximumPayout","token"],"properties":{"environment":{"type":"string"},"maximumPayout":{"$ref":"#/components/schemas/prediction_DecimalValue"},"maximumStake":{"$ref":"#/components/schemas/prediction_DecimalValue"},"minimumStake":{"$ref":"#/components/schemas/prediction_DecimalValue"},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_Selection"}},"token":{"$ref":"#/components/schemas/prediction_BetToken"}}},"prediction_BetToken":{"type":"object","required":["symbol","decimals"],"properties":{"decimals":{"type":"integer","format":"int32","minimum":0},"symbol":{"type":"string"}}},"prediction_CalculateBetRequest":{"type":"object","required":["selections"],"properties":{"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_Selection"}},"wallet":{"type":["string","null"]}},"additionalProperties":false},"prediction_ComboEligibilityLeg":{"type":"object","required":["positionId","marketId","conditionId","marketSlug","marketTitle","outcome","outcomeIndex","tags"],"properties":{"conditionId":{"type":"string"},"decimalOdds":{"type":["number","null"],"format":"double"},"marketId":{"type":"string"},"marketSlug":{"type":"string"},"marketTitle":{"type":"string"},"outcome":{"type":"string"},"outcomeIndex":{"type":"integer","minimum":0},"positionId":{"type":"string"},"referencePrice":{"type":["number","null"],"format":"double"},"tags":{"type":"array","items":{"type":"string"}}}},"prediction_ComboEligibilityRequest":{"type":"object","required":["legPositionIds"],"properties":{"legPositionIds":{"type":"array","items":{"type":"string"},"description":"Polymarket Combo position IDs, not CLOB token IDs."}},"additionalProperties":false},"prediction_ComboEligibilityResult":{"type":"object","required":["eligible","requestedLegCount","resolvedLegCount","legs","rejected","warnings"],"properties":{"eligible":{"type":"boolean","description":"True only when every leg is in the current catalog and no local contradiction exists."},"legs":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboEligibilityLeg"}},"rejected":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboRejectedLeg"}},"requestedLegCount":{"type":"integer","minimum":0},"resolvedLegCount":{"type":"integer","minimum":0},"warnings":{"type":"array","items":{"type":"string"}}}},"prediction_ComboEvent":{"type":"object","required":["id","slug","title","live","league","teams","moneyline","spreads","totals"],"properties":{"eventDate":{"type":["string","null"]},"id":{"type":"string"},"league":{"$ref":"#/components/schemas/prediction_ComboLeagueSummary"},"liquidity":{"type":["number","null"],"format":"double"},"live":{"type":"boolean"},"moneyline":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"slug":{"type":"string"},"spreads":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"startTime":{"type":["string","null"]},"teams":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboTeam"}},"title":{"type":"string"},"totals":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"volume":{"type":["number","null"],"format":"double"}}},"prediction_ComboEventsPage":{"type":"object","required":["sport","events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboEvent"}},"league":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_ComboLeague"}]},"nextCursor":{"type":["string","null"]},"sport":{"$ref":"#/components/schemas/prediction_ComboSport"}}},"prediction_ComboFilters":{"type":"object","required":["sports","selectedSport","leagues","marketTypes"],"properties":{"leagues":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboLeague"}},"marketTypes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarketType"}},"selectedSport":{"$ref":"#/components/schemas/prediction_ComboSport"},"sports":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboSportOption"}}}},"prediction_ComboLeague":{"type":"object","required":["slug","providerSlug","name","seriesId"],"properties":{"imageUrl":{"type":["string","null"]},"name":{"type":"string"},"primaryTagId":{"type":["integer","null"],"format":"int64","minimum":0},"providerSlug":{"type":"string","description":"League identifier used by Gamma event payloads."},"seriesId":{"type":"string"},"slug":{"type":"string","description":"Route-compatible Combo slug."},"teamOrdering":{"type":["string","null"]}}},"prediction_ComboLeagueSummary":{"type":"object","required":["slug","name"],"properties":{"imageUrl":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"}}},"prediction_ComboMarket":{"type":"object","required":["id","conditionId","slug","question","marketType","positionIds","selections"],"properties":{"conditionId":{"type":"string"},"id":{"type":"string"},"label":{"type":["string","null"]},"line":{"type":["number","null"],"format":"double"},"liquidity":{"type":["number","null"],"format":"double"},"marketType":{"$ref":"#/components/schemas/prediction_ComboMarketType"},"positionIds":{"type":"array","items":{"type":"string"}},"question":{"type":"string"},"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboSelection"}},"slug":{"type":"string"},"volume":{"type":["number","null"],"format":"double"}}},"prediction_ComboMarketType":{"type":"string","enum":["moneyline","spread","total"]},"prediction_ComboQuoteView":{"type":"object","required":["id","direction","requestedUnit","requestedValueE6","legPositionIds","status","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"blendedPriceE6":{"type":["string","null"]},"builderCode":{"type":["string","null"]},"comboConditionId":{"type":["string","null"]},"comboNoPositionId":{"type":["string","null"]},"comboYesPositionId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"direction":{"type":"string"},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"finalizedAt":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"legPositionIds":{"type":"array","items":{"type":"string"}},"makerAmountE6":{"type":["string","null"]},"netReceiveE6":{"type":["string","null"],"description":"Combo shares received for BUY; exact USDC proceeds after fees for SELL."},"quoteId":{"type":["string","null"]},"requestedUnit":{"type":"string"},"requestedValueE6":{"type":"string"},"rfqId":{"type":["string","null"]},"status":{"type":"string"},"takerAmountE6":{"type":["string","null"]},"takerOrderHash":{"type":["string","null"]},"totalRequiredE6":{"type":["string","null"]},"transactionHash":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_ComboRejectedLeg":{"type":"object","required":["positionId","code","reason"],"properties":{"code":{"$ref":"#/components/schemas/prediction_ComboRejectionCode"},"positionId":{"type":"string"},"reason":{"type":"string"}}},"prediction_ComboRejectionCode":{"type":"string","enum":["UNKNOWN_POSITION","CONFLICTING_CONDITION"]},"prediction_ComboSelection":{"type":"object","required":["outcome","outcomeIndex"],"properties":{"decimalOdds":{"type":["number","null"],"format":"double"},"outcome":{"type":"string"},"outcomeIndex":{"type":"integer","minimum":0},"positionId":{"type":["string","null"]},"referencePrice":{"type":["number","null"],"format":"double"},"tokenId":{"type":["string","null"]}}},"prediction_ComboSport":{"type":"string","enum":["soccer","mlb","tennis","cricket","basketball","efootball","tabletennis","icehockey","ufc","nfl"]},"prediction_ComboSportOption":{"type":"object","required":["slug","label"],"properties":{"label":{"type":"string"},"slug":{"$ref":"#/components/schemas/prediction_ComboSport"}}},"prediction_ComboTeam":{"type":"object","required":["name"],"properties":{"abbreviation":{"type":["string","null"]},"alias":{"type":["string","null"]},"color":{"type":["string","null"]},"id":{"type":["integer","null"],"format":"int64","minimum":0},"logoUrl":{"type":["string","null"]},"name":{"type":"string"},"ordering":{"type":["string","null"]},"record":{"type":["string","null"]}}},"prediction_ContractCall":{"type":"object","required":["chainId","to","data","valueAtomic"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"data":{"type":"string"},"to":{"type":"string"},"valueAtomic":{"type":"string"}}},"prediction_ContractRead":{"type":"object","required":["chainId","to","data"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"data":{"type":"string"},"to":{"type":"string"}}},"prediction_CountryNavigation":{"type":"object","required":["country","turnover","activeGames","liveGames","prematchGames","leagues"],"properties":{"activeGames":{"type":"integer","format":"int64","minimum":0},"country":{"$ref":"#/components/schemas/prediction_SportsbookEntity"},"leagues":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LeagueNavigation"}},"liveGames":{"type":"integer","format":"int64","minimum":0},"prematchGames":{"type":"integer","format":"int64","minimum":0},"turnover":{"$ref":"#/components/schemas/prediction_DecimalValue"}}},"prediction_CreateComboQuoteRequest":{"type":"object","required":["signer_address","maker_address","signature_type","leg_position_ids","direction","side","requested_size"],"properties":{"direction":{"$ref":"#/components/schemas/prediction_QuoteDirection"},"leg_position_ids":{"type":"array","items":{"type":"string"}},"maker_address":{"type":"string"},"requested_size":{"$ref":"#/components/schemas/prediction_RequestedSize"},"side":{"type":"string"},"signature_type":{"type":"integer","format":"int32"},"signer_address":{"type":"string"}},"additionalProperties":false},"prediction_CreateFavoriteRequest":{"type":"object","required":["sportSlug","countrySlug"],"properties":{"countrySlug":{"type":"string"},"leagueSlug":{"type":["string","null"]},"sportSlug":{"type":"string"}},"additionalProperties":false},"prediction_CreateSinglesTicketRequest":{"type":"object","required":["bookingCode","status","requestedStakeE6","spentE6","referenceReturnE6","filledCount","acceptedCount","orders","placedAt"],"properties":{"acceptedCount":{"type":"integer","format":"int32"},"bookingCode":{"type":"string"},"filledCount":{"type":"integer","format":"int32"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SinglesTicketOrder"}},"placedAt":{"type":"integer","format":"int64"},"referenceReturnE6":{"type":"string"},"requestedStakeE6":{"type":"string"},"spentE6":{"type":"string"},"status":{"$ref":"#/components/schemas/prediction_SinglesTicketStatus"}},"additionalProperties":false},"prediction_DecimalOdds":{"type":"string","example":"1.95"},"prediction_DecimalValue":{"type":"string","example":"1414.2857142857142"},"prediction_DeleteFavoriteResult":{"type":"object","required":["id","deleted"],"properties":{"deleted":{"type":"boolean"},"id":{"type":"string","format":"uuid"}}},"prediction_DiscoveryCategory":{"type":"string","enum":["trending","sports","basketball","nfl","politics","crypto","esports","iran","finance","geopolitics","tech","culture","economy","weather","mentions","elections"]},"prediction_DiscoveryEvent":{"type":"object","required":["id","slug","title","active","closed","restricted","marketCount","markets","tags"],"properties":{"active":{"type":"boolean"},"closed":{"type":"boolean"},"description":{"type":["string","null"]},"endDate":{"type":["string","null"]},"iconUrl":{"type":["string","null"]},"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"liquidity":{"type":["number","null"],"format":"double"},"marketCount":{"type":"integer","minimum":0},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_MarketSummary"}},"oneDayPriceChange":{"type":["number","null"],"format":"double"},"restricted":{"type":"boolean"},"slug":{"type":"string"},"startDate":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/prediction_MarketTag"}},"title":{"type":"string"},"volume":{"type":["number","null"],"format":"double"},"volume24h":{"type":["number","null"],"format":"double"}}},"prediction_DiscoveryEventsPage":{"type":"object","required":["category","sort","events"],"properties":{"category":{"$ref":"#/components/schemas/prediction_DiscoveryCategory"},"events":{"type":"array","items":{"$ref":"#/components/schemas/prediction_DiscoveryEvent"}},"nextCursor":{"type":["string","null"]},"sort":{"$ref":"#/components/schemas/prediction_MarketSort"}}},"prediction_Eip712Domain":{"type":"object","required":["name","version","chainId","verifyingContract"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"name":{"type":"string"},"verifyingContract":{"type":"string"},"version":{"type":"string"}}},"prediction_Eip712Field":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"prediction_Eip712TypedData":{"type":"object","required":["domain","primaryType","types","message"],"properties":{"domain":{"$ref":"#/components/schemas/prediction_Eip712Domain"},"message":{},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/prediction_Eip712Field"}},"propertyNames":{"type":"string"}}}},"prediction_EligibleComboMarket":{"type":"object","required":["id","conditionId","slug","title","tags","outcomes"],"properties":{"conditionId":{"type":"string"},"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_EligibleComboOutcome"}},"pending":{"type":["boolean","null"],"description":"Upstream settlement preparation state. It does not override catalog eligibility."},"slug":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"volume":{"type":["number","null"],"format":"double"}}},"prediction_EligibleComboOutcome":{"type":"object","required":["outcome","outcomeIndex","positionId"],"properties":{"decimalOdds":{"type":["number","null"],"format":"double"},"outcome":{"type":"string"},"outcomeIndex":{"type":"integer","minimum":0},"positionId":{"type":"string"},"referencePrice":{"type":["number","null"],"format":"double"}}},"prediction_EligibleMarketsPage":{"type":"object","required":["markets","limit"],"properties":{"limit":{"type":"integer","format":"int32","minimum":0},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_EligibleComboMarket"}},"nextCursor":{"type":["string","null"]}}},"prediction_EventMarketsRequest":{"type":"object","required":["gameIds"],"properties":{"gameIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"prediction_EventState":{"type":"string","enum":["prematch","live","finished","pre_finished","stopped","suspended","canceled","coverage_lost","unknown"]},"prediction_FavoriteKind":{"type":"string","enum":["country","league"]},"prediction_FavoriteView":{"type":"object","required":["id","kind","sport","country","createdAt"],"properties":{"country":{"$ref":"#/components/schemas/prediction_SportsbookEntity"},"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/prediction_FavoriteKind"},"league":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_SportsbookEntity"}]},"sport":{"$ref":"#/components/schemas/prediction_SportReference"}}},"prediction_FreebetBetType":{"type":"string","enum":["ordinary","combo"]},"prediction_FreebetEventFilter":{"type":"object","required":["exclude","sports"],"properties":{"exclude":{"type":"boolean"},"sports":{"type":"array","items":{"$ref":"#/components/schemas/prediction_FreebetSportFilter"}}}},"prediction_FreebetEventState":{"type":"string","enum":["live","prematch"]},"prediction_FreebetListStatus":{"type":"string","enum":["available","used"]},"prediction_FreebetMarketFilter":{"type":"object","required":["marketId","gamePeriodId","gameTypeId"],"properties":{"gamePeriodId":{"type":"integer","format":"int64"},"gameTypeId":{"type":"integer","format":"int64"},"marketId":{"type":"integer","format":"int64"}}},"prediction_FreebetRestrictions":{"type":"object","required":["minimumOdds","validityMs"],"properties":{"betType":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_FreebetBetType"}]},"eventFilter":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_FreebetEventFilter"}]},"eventState":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_FreebetEventState"}]},"maximumOdds":{"type":["string","null"]},"minimumOdds":{"type":"string"},"validityMs":{"type":"integer","format":"int64","minimum":0}}},"prediction_FreebetSelection":{"type":"object","required":["conditionId","outcomeId"],"properties":{"conditionId":{"type":"string"},"outcomeId":{"type":"string"}},"additionalProperties":false},"prediction_FreebetSportFilter":{"type":"object","required":["sportId","leagueIds","markets"],"properties":{"leagueIds":{"type":"array","items":{"type":"string"}},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_FreebetMarketFilter"}},"sportId":{"type":"string"}}},"prediction_FreebetStatus":{"type":"string","enum":["available","used"]},"prediction_FreebetType":{"type":"string","enum":["only_win","all_win"]},"prediction_FreebetView":{"type":"object","required":["id","amountAtomic","status","freebetType","isBetSponsored","isFeeSponsored","isSponsoredBetReturnable","restrictions","expiresAt","createdAt"],"properties":{"amountAtomic":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"freebetType":{"$ref":"#/components/schemas/prediction_FreebetType"},"id":{"type":"string"},"isBetSponsored":{"type":"boolean"},"isFeeSponsored":{"type":"boolean"},"isSponsoredBetReturnable":{"type":"boolean"},"publicData":{"type":["object","null"],"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"restrictions":{"$ref":"#/components/schemas/prediction_FreebetRestrictions"},"status":{"$ref":"#/components/schemas/prediction_FreebetStatus"},"usedAt":{"type":["string","null"],"format":"date-time"}}},"prediction_GasInfo":{"type":"object","required":["provider","environment","gasLimit","gasPrice","betTokenRate","gasPriceInBetToken","slippage","gasAmount","relayerFeeAmount","token"],"properties":{"betTokenRate":{"$ref":"#/components/schemas/prediction_DecimalValue"},"environment":{"type":"string"},"gasAmount":{"$ref":"#/components/schemas/prediction_DecimalValue"},"gasLimit":{"type":"integer","format":"int64","minimum":0},"gasPrice":{"$ref":"#/components/schemas/prediction_DecimalValue"},"gasPriceInBetToken":{"$ref":"#/components/schemas/prediction_DecimalValue"},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"relayerFeeAmount":{"$ref":"#/components/schemas/prediction_DecimalValue"},"slippage":{"$ref":"#/components/schemas/prediction_DecimalValue"},"token":{"$ref":"#/components/schemas/prediction_BetToken"}}},"prediction_HealthStatus":{"type":"object","description":"Payload returned by `GET /health` — matches the platform `HealthStatus`\n(`@tsionark/types`): Docker healthchecks and monitors depend on this shape.","required":["status","service","uptimeSeconds"],"properties":{"service":{"type":"string"},"status":{"type":"string","description":"\"ok\" | \"degraded\""},"uptimeSeconds":{"type":"integer","format":"int64","minimum":0}}},"prediction_LeagueNavigation":{"type":"object","required":["league","eventKind","isTopLeague","topWeight","turnover","activeGames","liveGames","prematchGames"],"properties":{"activeGames":{"type":"integer","format":"int64","minimum":0},"eventKind":{"$ref":"#/components/schemas/prediction_SportsbookEventKind"},"isTopLeague":{"type":"boolean"},"league":{"$ref":"#/components/schemas/prediction_SportsbookEntity"},"liveGames":{"type":"integer","format":"int64","minimum":0},"prematchGames":{"type":"integer","format":"int64","minimum":0},"topWeight":{"type":"integer","format":"int64"},"turnover":{"$ref":"#/components/schemas/prediction_DecimalValue"}}},"prediction_LimitlessCapabilities":{"type":"object","required":["provider","chainId","collateralSymbol","collateralDecimals","minLegs","maxLegs","minStake","maxStake","maxPayout","quoteConfigured","executionConfigured","requiresRegisteredWallet"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"collateralDecimals":{"type":"integer","format":"int32","minimum":0},"collateralSymbol":{"type":"string"},"executionConfigured":{"type":"boolean"},"maxLegs":{"type":"integer","format":"int32","minimum":0},"maxPayout":{"type":"string"},"maxStake":{"type":"string"},"minLegs":{"type":"integer","format":"int32","minimum":0},"minStake":{"type":"string"},"provider":{"type":"string"},"quoteConfigured":{"type":"boolean"},"requiresRegisteredWallet":{"type":"boolean"}}},"prediction_LimitlessCreateRequest":{"type":"object","required":["source","stakeAmount","wallet","intentSig","permit"],"properties":{"displayedMultiplier":{"type":["number","null"],"format":"double"},"intentSig":{"type":"string"},"negRiskIntent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_LimitlessNegRiskIntent"}]},"permit":{"$ref":"#/components/schemas/prediction_LimitlessPermit"},"source":{"$ref":"#/components/schemas/prediction_LimitlessParlaySource"},"stakeAmount":{"type":"string"},"vanillaIntent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_LimitlessVanillaIntent"}]},"wallet":{"type":"string"}},"additionalProperties":false},"prediction_LimitlessCreateResponse":{},"prediction_LimitlessNegRiskIntent":{"type":"object","required":["user","userStake","mintAmount","userIndexSets","nonce","deadline","ids","legTypes"],"properties":{"deadline":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"legTypes":{"type":"array","items":{"type":"string"}},"mintAmount":{"type":"string"},"nonce":{"type":"string"},"user":{"type":"string"},"userIndexSets":{"type":"array","items":{"type":"string"}},"userStake":{"type":"string"}},"additionalProperties":false},"prediction_LimitlessOutcome":{"type":"string","enum":["YES","NO"]},"prediction_LimitlessPack":{"type":"object","required":["id","name","parlayType","status","wasteStrategy","earliestDeadline","payout","eligible","inDeadlineWindow","packOutcome"],"properties":{"earliestDeadline":{"type":"string"},"eligible":{"type":"boolean"},"id":{"type":"string"},"inDeadlineWindow":{"type":"boolean"},"ineligibleReason":{"type":["string","null"]},"legs":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessPackLeg"}},"name":{"type":"string"},"packOutcome":{"type":"string"},"parlayType":{"type":"string"},"payout":{"$ref":"#/components/schemas/prediction_LimitlessPackPayout"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessProperty"}},"status":{"type":"string"},"wasteStrategy":{"type":"string"}}},"prediction_LimitlessPackGroup":{"type":"object","required":["id","slug","title"],"properties":{"awayScore":{"type":["integer","null"],"format":"int64"},"awayTeam":{"type":["string","null"]},"homeScore":{"type":["integer","null"],"format":"int64"},"homeTeam":{"type":["string","null"]},"id":{"type":"integer","format":"int64"},"leagueName":{"type":["string","null"]},"slug":{"type":"string"},"startMatchTimestamp":{"type":["integer","null"],"format":"int64"},"title":{"type":"string"}}},"prediction_LimitlessPackLeg":{"type":"object","required":["marketId","marketSlug","marketTitle","marketType","outcome","livePrice","priceSnapshot"],"properties":{"esportsPropType":{"type":["string","null"]},"group":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_LimitlessPackGroup"}]},"leagueName":{"type":["string","null"]},"livePrice":{"type":"number","format":"double"},"marketId":{"type":"integer","format":"int64"},"marketImageUrl":{"type":["string","null"]},"marketSlug":{"type":"string"},"marketTitle":{"type":"string"},"marketType":{"type":"string"},"outcome":{"$ref":"#/components/schemas/prediction_LimitlessOutcome"},"outcomeImageUrls":{"type":["array","null"],"items":{"type":"string"}},"outcomeLabels":{"type":["array","null"],"items":{"type":"string"}},"priceSnapshot":{"type":"number","format":"double"},"resolvedOutcome":{"type":["string","null"]},"startMatchTimestamp":{"type":["integer","null"],"format":"int64"}}},"prediction_LimitlessPackPayout":{"type":"object","required":["stake","parlayMultiplier","parlayPayout","singlesMultiplier","singlesPayout","savingsPct"],"properties":{"parlayMultiplier":{"type":"number","format":"double"},"parlayPayout":{"type":"string"},"savingsPct":{"type":"number","format":"double"},"singlesMultiplier":{"type":"number","format":"double"},"singlesPayout":{"type":"string"},"stake":{"type":"string"}}},"prediction_LimitlessParlayEvent":{"type":"object","required":["marketType","title","slug","deadline"],"properties":{"categories":{"type":"array","items":{"type":"string"}},"deadline":{"type":"string"},"eventKey":{"type":["string","null"]},"fixtureKey":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"leagueName":{"type":["string","null"]},"marketType":{"type":"string"},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessParlayMarket"}},"propLine":{"type":["number","null"],"format":"double"},"propType":{"type":["string","null"]},"properties":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessProperty"}},"slug":{"type":"string"},"startMatchTimestamp":{"type":["integer","null"],"format":"int64"},"title":{"type":"string"}}},"prediction_LimitlessParlayMarket":{"type":"object","required":["marketId","slug","title","priceYes","priceNo"],"properties":{"imageUrl":{"type":["string","null"]},"isMatch":{"type":"boolean"},"marketId":{"type":"integer","format":"int64"},"matchSide":{"type":["string","null"]},"outcomeImageUrls":{"type":["array","null"],"items":{"type":"string"}},"outcomeLabels":{"type":["array","null"],"items":{"type":"string"}},"priceNo":{"type":"number","format":"double"},"priceYes":{"type":"number","format":"double"},"slug":{"type":"string"},"title":{"type":"string"}}},"prediction_LimitlessParlaySource":{"type":"object","required":["kind","packId"],"properties":{"kind":{"type":"string"},"packId":{"type":"string"}},"additionalProperties":false},"prediction_LimitlessPermit":{"type":"object","required":["value","deadline","v","r","s"],"properties":{"deadline":{"type":"string"},"r":{"type":"string"},"s":{"type":"string"},"v":{"type":"integer","format":"int32","minimum":0},"value":{"type":"string"}},"additionalProperties":false},"prediction_LimitlessProperty":{"type":"object","required":["propertyKeyId","propertyKeySlug"],"properties":{"id":{"type":["string","null"]},"propertyKeyId":{"type":"string"},"propertyKeyName":{"type":["string","null"]},"propertyKeySlug":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}}},"prediction_LimitlessQuote":{"type":"object","required":["eligible"],"properties":{"collateralRequired":{"type":["string","null"]},"eligible":{"type":"boolean"},"ineligibleReasons":{"type":"array","items":{"type":"string"}},"legs":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessQuotedLeg"}},"multiplier":{"type":["number","null"],"format":"double"},"parlayType":{"type":["string","null"]},"potentialPayout":{"type":["string","null"]},"rawMultiplier":{"type":["number","null"],"format":"double"},"vigPercent":{"type":["number","null"],"format":"double"}}},"prediction_LimitlessQuoteLegRequest":{"type":"object","required":["marketSlug","outcome"],"properties":{"marketSlug":{"type":"string"},"outcome":{"$ref":"#/components/schemas/prediction_LimitlessOutcome"}}},"prediction_LimitlessQuoteRequest":{"type":"object","required":["legs","stake"],"properties":{"legs":{"type":"array","items":{"$ref":"#/components/schemas/prediction_LimitlessQuoteLegRequest"}},"stake":{"type":"string","description":"Human-readable USDC amount, with at most six decimal places."},"wasteStrategy":{"type":["string","null"]}},"additionalProperties":false},"prediction_LimitlessQuotedLeg":{"type":"object","required":["marketSlug","marketId","conditionId","questionId","marketType","outcome","price"],"properties":{"conditionId":{"type":"string"},"marketId":{"type":"integer","format":"int64"},"marketSlug":{"type":"string"},"marketType":{"type":"string"},"outcome":{"$ref":"#/components/schemas/prediction_LimitlessOutcome"},"price":{"type":"number","format":"double"},"questionId":{"type":"string"}}},"prediction_LimitlessVanillaIntent":{"type":"object","required":["user","userStake","mintAmount","userIndexSets","nonce","deadline","conditionIds"],"properties":{"conditionIds":{"type":"array","items":{"type":"string"}},"deadline":{"type":"string"},"mintAmount":{"type":"string"},"nonce":{"type":"string"},"user":{"type":"string"},"userIndexSets":{"type":"array","items":{"type":"string"}},"userStake":{"type":"string"}},"additionalProperties":false},"prediction_MarketEventSummary":{"type":"object","required":["id","slug","title"],"properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"slug":{"type":"string"},"title":{"type":"string"}}},"prediction_MarketOutcome":{"type":"object","required":["id","title","odds","state","providerState","hidden"],"properties":{"hidden":{"type":"boolean"},"id":{"type":"string"},"odds":{"$ref":"#/components/schemas/prediction_DecimalOdds"},"point":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]},"providerState":{"type":"string"},"sortOrder":{"type":["string","null"]},"state":{"$ref":"#/components/schemas/prediction_MarketState"},"title":{"type":"string"}}},"prediction_MarketPage":{"type":"object","required":["markets","limit","offset"],"properties":{"limit":{"type":"integer","format":"int32","minimum":0},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_MarketSummary"}},"nextOffset":{"type":["integer","null"],"format":"int32","minimum":0},"offset":{"type":"integer","format":"int32","minimum":0}}},"prediction_MarketSort":{"type":"string","enum":["volume_24h","volume","liquidity","newest","ending_soon"]},"prediction_MarketState":{"type":"string","enum":["active","stopped","canceled","won","lost","unknown"]},"prediction_MarketSummary":{"type":"object","required":["id","conditionId","slug","question","active","closed","acceptingOrders","restricted","enableOrderBook","outcomes","negRisk","rfqEnabled"],"properties":{"acceptingOrders":{"type":"boolean"},"active":{"type":"boolean"},"bestAsk":{"type":["number","null"],"format":"double"},"bestBid":{"type":["number","null"],"format":"double"},"category":{"type":["string","null"]},"closed":{"type":"boolean"},"comboStatus":{"type":["string","null"]},"conditionId":{"type":"string"},"description":{"type":["string","null"]},"enableOrderBook":{"type":"boolean"},"endDate":{"type":["string","null"]},"event":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_MarketEventSummary"}]},"gameStartTime":{"type":["string","null"]},"groupItemTitle":{"type":["string","null"]},"iconUrl":{"type":["string","null"]},"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"lastTradePrice":{"type":["number","null"],"format":"double"},"liquidity":{"type":["number","null"],"format":"double"},"negRisk":{"type":"boolean"},"oneDayPriceChange":{"type":["number","null"],"format":"double"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_MarketOutcome"}},"question":{"type":"string"},"restricted":{"type":"boolean"},"rfqEnabled":{"type":"boolean"},"slug":{"type":"string"},"sportsMarketType":{"type":["string","null"]},"spread":{"type":["number","null"],"format":"double"},"startDate":{"type":["string","null"]},"volume":{"type":["number","null"],"format":"double"},"volume24h":{"type":["number","null"],"format":"double"}}},"prediction_MarketTag":{"type":"object","required":["id","label","slug"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"slug":{"type":"string"}}},"prediction_Navigation":{"type":"object","required":["provider","environment","sports"],"properties":{"environment":{"type":"string"},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"sports":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportNavigation"}}}},"prediction_NftOperatorApprovalRequirement":{"type":"object","required":["owner","operator","check","transaction"],"properties":{"check":{"$ref":"#/components/schemas/prediction_ContractRead"},"operator":{"type":"string"},"owner":{"type":"string"},"transaction":{"$ref":"#/components/schemas/prediction_ContractCall"}}},"prediction_NormalSport":{"type":"string","enum":["football","basketball"]},"prediction_NormalSportOption":{"type":"object","required":["slug","label"],"properties":{"label":{"type":"string"},"slug":{"$ref":"#/components/schemas/prediction_NormalSport"}}},"prediction_Participant":{"type":"object","required":["name"],"properties":{"imageUrl":{"type":["string","null"]},"name":{"type":"string"}}},"prediction_PrepareOrderRequest":{"type":"object","required":["selections","stake"],"properties":{"bonusId":{"type":["string","null"]},"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_PrepareOrderSelection"}},"slippageBps":{"type":["integer","null"],"format":"int32","minimum":0},"stake":{"$ref":"#/components/schemas/prediction_DecimalValue"}},"additionalProperties":false},"prediction_PrepareOrderSelection":{"type":"object","required":["eventId","conditionId","outcomeId"],"properties":{"conditionId":{"type":"string"},"eventId":{"type":"string"},"outcomeId":{"type":"string"}},"additionalProperties":false},"prediction_PreparedCashoutView":{"type":"object","required":["cashoutId","ticketId","bookingCode","ownerWallet","graphBetId","status","quotedAmountAtomic","cashoutOdds","token","approval","typedData","expiresAt","approveExpiresAt","createdAt","updatedAt"],"properties":{"approval":{"$ref":"#/components/schemas/prediction_NftOperatorApprovalRequirement"},"approveExpiresAt":{"type":"string","format":"date-time"},"bookingCode":{"type":"string"},"cashoutId":{"type":"string","format":"uuid"},"cashoutOdds":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"graphBetId":{"type":"string"},"ownerWallet":{"type":"string"},"quotedAmountAtomic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/prediction_BetToken"},"typedData":{"$ref":"#/components/schemas/prediction_Eip712TypedData"},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_PreparedOrderView":{"type":"object","required":["ticketId","bookingCode","ownerWallet","status","kind","environment","stakeAtomic","possiblePayoutAtomic","token","approval","typedData","expiresAt"],"properties":{"approval":{"$ref":"#/components/schemas/prediction_ApprovalRequirement"},"bonusId":{"type":["string","null"]},"bookingCode":{"type":"string"},"environment":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"isBetSponsored":{"type":"boolean"},"isFeeSponsored":{"type":"boolean"},"isSponsoredBetReturnable":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/prediction_SportsbookOrderKind"},"ownerWallet":{"type":"string"},"possiblePayoutAtomic":{"type":"string"},"stakeAtomic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/prediction_BetToken"},"typedData":{"$ref":"#/components/schemas/prediction_Eip712TypedData"}}},"prediction_PreparedRedemptionView":{"type":"object","required":["redemptionId","ticketId","bookingCode","status","redemptionKind","amountAtomic","token","transaction","createdAt","updatedAt"],"properties":{"amountAtomic":{"type":"string"},"bookingCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"redemptionId":{"type":"string","format":"uuid"},"redemptionKind":{"$ref":"#/components/schemas/prediction_SportsbookRedemptionKind"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/prediction_BetToken"},"transaction":{"$ref":"#/components/schemas/prediction_ContractCall"},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_QuoteDirection":{"type":"string","enum":["BUY","SELL"]},"prediction_ReadinessStatus":{"type":"object","required":["status","service","database","broker","cache","distributedCache"],"properties":{"broker":{"type":"boolean"},"cache":{"type":"boolean"},"database":{"type":"boolean"},"distributedCache":{"type":"boolean"},"service":{"type":"string"},"status":{"type":"string"}}},"prediction_RealtimeOutcomeUpdate":{"type":"object","required":["outcomeId","state"],"properties":{"hidden":{"type":["boolean","null"]},"odds":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalOdds"}]},"outcomeId":{"type":"string"},"state":{"type":"string"},"turnover":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]}}},"prediction_RealtimeResyncScope":{"type":"string","enum":["conditions","statistics","all"]},"prediction_RefreshConditionsRequest":{"type":"object","required":["conditionIds"],"properties":{"conditionIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"prediction_RequestedSize":{"type":"object","required":["unit","value_e6"],"properties":{"unit":{"type":"string"},"value_e6":{"type":"string"}},"additionalProperties":false},"prediction_Selection":{"type":"object","required":["conditionId","outcomeId"],"properties":{"conditionId":{"type":"string"},"outcomeId":{"type":"string"}}},"prediction_SignedComboOrder":{"type":"object","required":["salt","maker","signer","tokenId","makerAmount","takerAmount","side","signatureType","timestamp","metadata","builder","signature"],"properties":{"builder":{"type":"string"},"maker":{"type":"string"},"makerAmount":{"type":"string"},"metadata":{"type":"string"},"salt":{"type":"string"},"side":{"type":"integer","format":"int32"},"signature":{"type":"string"},"signatureType":{"type":"integer","format":"int32"},"signer":{"type":"string"},"takerAmount":{"type":"string"},"timestamp":{"type":"string"},"tokenId":{"type":"string"}},"additionalProperties":false},"prediction_SinglesOrderStatus":{"type":"string","enum":["filled","pending","failed"]},"prediction_SinglesTicketOrder":{"type":"object","required":["selectionId","source","eventId","eventTitle","marketId","conditionId","tokenId","marketLabel","outcome","status"],"properties":{"conditionId":{"type":"string"},"error":{"type":["string","null"]},"eventId":{"type":"string"},"eventTitle":{"type":"string"},"marketId":{"type":"string"},"marketLabel":{"type":"string"},"orderId":{"type":["string","null"]},"outcome":{"type":"string"},"selectionId":{"type":"string"},"source":{"type":"string"},"status":{"$ref":"#/components/schemas/prediction_SinglesOrderStatus"},"tokenId":{"type":"string"},"transactionHash":{"type":["string","null"]}},"additionalProperties":false},"prediction_SinglesTicketStatus":{"type":"string","enum":["filled","partial","pending","failed"]},"prediction_SinglesTicketView":{"type":"object","required":["id","bookingCode","status","requestedStakeE6","spentE6","referenceReturnE6","filledCount","acceptedCount","orders","placedAt","createdAt","updatedAt"],"properties":{"acceptedCount":{"type":"integer","format":"int32"},"bookingCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"filledCount":{"type":"integer","format":"int32"},"id":{"type":"string","format":"uuid"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SinglesTicketOrder"}},"placedAt":{"type":"string","format":"date-time"},"referenceReturnE6":{"type":"string"},"requestedStakeE6":{"type":"string"},"spentE6":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_SortDirection":{"type":"string","enum":["asc","desc"]},"prediction_SportNavigation":{"type":"object","required":["sport","activeGames","liveGames","prematchGames","countries"],"properties":{"activeGames":{"type":"integer","format":"int64","minimum":0},"countries":{"type":"array","items":{"$ref":"#/components/schemas/prediction_CountryNavigation"}},"liveGames":{"type":"integer","format":"int64","minimum":0},"prematchGames":{"type":"integer","format":"int64","minimum":0},"sport":{"$ref":"#/components/schemas/prediction_SportReference"}}},"prediction_SportReference":{"type":"object","required":["id","slug","name","hub"],"properties":{"hub":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}},"prediction_SportsEvent":{"type":"object","required":["id","slug","title","live","league","teams","moneyline","spreads","totals"],"properties":{"eventDate":{"type":["string","null"]},"id":{"type":"string"},"league":{"$ref":"#/components/schemas/prediction_ComboLeagueSummary"},"liquidity":{"type":["number","null"],"format":"double"},"live":{"type":"boolean"},"moneyline":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"slug":{"type":"string"},"spreads":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"startTime":{"type":["string","null"]},"teams":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboTeam"}},"title":{"type":"string"},"totals":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarket"}},"volume":{"type":["number","null"],"format":"double"}}},"prediction_SportsEventsPage":{"type":"object","required":["sport","events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsEvent"}},"league":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_ComboLeague"}]},"nextCursor":{"type":["string","null"]},"sport":{"$ref":"#/components/schemas/prediction_NormalSport"}}},"prediction_SportsFilters":{"type":"object","required":["sports","selectedSport","selectedLeague","leagues","marketTypes"],"properties":{"leagues":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboLeague"}},"marketTypes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_ComboMarketType"}},"selectedLeague":{"type":"string"},"selectedSport":{"$ref":"#/components/schemas/prediction_NormalSport"},"sports":{"type":"array","items":{"$ref":"#/components/schemas/prediction_NormalSportOption"}}}},"prediction_SportsbookActivityCondition":{"type":"object","required":["conditionId","outcomeId","orderId","gameId","gameState","conditionMargin","selectionMargin","odds"],"properties":{"conditionId":{"type":"string"},"conditionMargin":{"$ref":"#/components/schemas/prediction_DecimalValue"},"gameId":{"type":"string"},"gameState":{"$ref":"#/components/schemas/prediction_SportsbookActivityGameState"},"odds":{"$ref":"#/components/schemas/prediction_DecimalOdds"},"orderId":{"type":"string"},"outcomeId":{"type":"string"},"potentialAmount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]},"potentialLoss":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]},"result":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_SportsbookActivityConditionResult"}]},"selectionMargin":{"$ref":"#/components/schemas/prediction_DecimalValue"},"settledSelectionMargin":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]}}},"prediction_SportsbookActivityConditionResult":{"type":"string","enum":["canceled","created","paused","resolved"]},"prediction_SportsbookActivityGameState":{"type":"string","enum":["live","prematch"]},"prediction_SportsbookActivityItem":{"type":"object","required":["id","state","kind","core","bettor","owner","affiliate","stake","odds","isFreebet","isSponsoredBetReturnable","margin","isRedeemable","isRedeemed","isCashedOut","conditions","createdAt","updatedAt"],"properties":{"affiliate":{"type":"string"},"betId":{"type":["string","null"]},"bettor":{"type":"string"},"bonusId":{"type":["string","null"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookActivityCondition"}},"core":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"id":{"type":"string"},"isCashedOut":{"type":"boolean"},"isFreebet":{"type":"boolean"},"isRedeemable":{"type":"boolean"},"isRedeemed":{"type":"boolean"},"isSponsoredBetReturnable":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/prediction_SportsbookActivityKind"},"margin":{"$ref":"#/components/schemas/prediction_DecimalValue"},"odds":{"$ref":"#/components/schemas/prediction_DecimalOdds"},"owner":{"type":"string"},"payout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]},"redeemedAt":{"type":["string","null"],"format":"date-time"},"result":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_SportsbookActivityResult"}]},"settledAt":{"type":["string","null"],"format":"date-time"},"settledMargin":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_DecimalValue"}]},"stake":{"$ref":"#/components/schemas/prediction_DecimalValue"},"state":{"$ref":"#/components/schemas/prediction_SportsbookActivityState"},"transactionHash":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_SportsbookActivityKind":{"type":"string","enum":["ordinary","combo"]},"prediction_SportsbookActivityPage":{"type":"object","required":["provider","environment","token","items","offset","limit"],"properties":{"environment":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookActivityItem"}},"limit":{"type":"integer","format":"int32","minimum":0},"nextOffset":{"type":["integer","null"],"format":"int32","minimum":0},"offset":{"type":"integer","format":"int32","minimum":0},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"token":{"$ref":"#/components/schemas/prediction_BetToken"}}},"prediction_SportsbookActivityResult":{"type":"string","enum":["won","lost","canceled"]},"prediction_SportsbookActivityState":{"type":"string","enum":["created","placed","sent","accepted","rejected","pending_cancel","cancel_failed","canceled","settled"]},"prediction_SportsbookCapabilities":{"type":"object","required":["provider","chainId","environment","token","features"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"environment":{"type":"string"},"features":{"$ref":"#/components/schemas/prediction_SportsbookFeatures"},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"token":{"$ref":"#/components/schemas/prediction_BetToken"}}},"prediction_SportsbookCashoutView":{"type":"object","required":["cashoutId","ticketId","status","quotedAmountAtomic","cashoutOdds","signatureRequired","createdAt","updatedAt"],"properties":{"approveExpiresAt":{"type":["string","null"],"format":"date-time"},"cashoutId":{"type":"string","format":"uuid"},"cashoutOdds":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"providerOrderId":{"type":["string","null"]},"quotedAmountAtomic":{"type":"string"},"signatureRequired":{"type":"boolean"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"transactionHash":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_SportsbookEntity":{"type":"object","required":["slug","name"],"properties":{"id":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"}}},"prediction_SportsbookEvent":{"type":"object","required":["provider","eventKind","id","slug","title","startsAt","state","providerState","turnover","sport","country","league","leagueIsTop","participants"],"properties":{"country":{"$ref":"#/components/schemas/prediction_SportsbookEntity"},"eventKind":{"$ref":"#/components/schemas/prediction_SportsbookEventKind"},"id":{"type":"string"},"league":{"$ref":"#/components/schemas/prediction_SportsbookEntity"},"leagueIsTop":{"type":"boolean"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/prediction_Participant"}},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"providerState":{"type":"string"},"slug":{"type":"string"},"sport":{"$ref":"#/components/schemas/prediction_SportReference"},"startsAt":{"type":"integer","format":"int64"},"state":{"$ref":"#/components/schemas/prediction_EventState"},"title":{"type":"string"},"turnover":{"$ref":"#/components/schemas/prediction_DecimalValue"}}},"prediction_SportsbookEventDetails":{"type":"object","required":["event","markets"],"properties":{"event":{"$ref":"#/components/schemas/prediction_SportsbookEvent"},"markets":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookMarket"}}}},"prediction_SportsbookEventKind":{"type":"string","enum":["sports","esports","virtual"]},"prediction_SportsbookEventsPage":{"type":"object","required":["provider","environment","events","limit","offset","total"],"properties":{"environment":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookEvent"}},"limit":{"type":"integer","format":"int32","minimum":0},"nextOffset":{"type":["integer","null"],"format":"int32","minimum":0},"offset":{"type":"integer","format":"int32","minimum":0},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"total":{"type":"integer","format":"int32","minimum":0}}},"prediction_SportsbookFeatures":{"type":"object","required":["navigation","search","prematch","live","virtualBetting","realtime","calculations","orderPlacement","activity","freebets","settlement","redemption","cashout","leaderboard","favorites","referrals"],"properties":{"activity":{"type":"boolean"},"calculations":{"type":"boolean"},"cashout":{"type":"boolean"},"favorites":{"type":"boolean"},"freebets":{"type":"boolean"},"leaderboard":{"type":"boolean"},"live":{"type":"boolean"},"navigation":{"type":"boolean"},"orderPlacement":{"type":"boolean"},"prematch":{"type":"boolean"},"realtime":{"type":"boolean"},"redemption":{"type":"boolean"},"referrals":{"type":"boolean"},"search":{"type":"boolean"},"settlement":{"type":"boolean"},"virtualBetting":{"type":"boolean"}}},"prediction_SportsbookGameState":{"type":"string","enum":["prematch","live","all"]},"prediction_SportsbookMarket":{"type":"object","required":["id","title","state","providerState","expressForbidden","prematchEnabled","liveEnabled","hidden","outcomes"],"properties":{"category":{"type":["string","null"]},"eventId":{"type":["string","null"]},"expressForbidden":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"string"},"liveEnabled":{"type":"boolean"},"marketId":{"type":["integer","null"],"format":"int64"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_MarketOutcome"}},"prematchEnabled":{"type":"boolean"},"providerState":{"type":"string"},"sortOrder":{"type":["string","null"]},"state":{"$ref":"#/components/schemas/prediction_MarketState"},"title":{"type":"string"}}},"prediction_SportsbookOrderHistoryPage":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookOrderView"}},"nextCursor":{"type":["string","null"]}}},"prediction_SportsbookOrderKind":{"type":"string","enum":["ordinary","combo"]},"prediction_SportsbookOrderLegView":{"type":"object","required":["eventId","eventTitle","eventKind","conditionId","marketTitle","outcomeId","outcomeTitle","requestedOdds","index"],"properties":{"acceptedOdds":{"type":["string","null"]},"conditionId":{"type":"string"},"eventId":{"type":"string"},"eventKind":{"$ref":"#/components/schemas/prediction_SportsbookEventKind"},"eventTitle":{"type":"string"},"index":{"type":"integer","format":"int32","minimum":0},"marketTitle":{"type":"string"},"outcomeId":{"type":"string"},"outcomeTitle":{"type":"string"},"requestedOdds":{"type":"string"},"result":{"type":["string","null"]}}},"prediction_SportsbookOrderStatus":{"type":"string","enum":["draft","awaiting_signature","submitted","accepted","partially_accepted","live","pending_resolution","won","lost","canceled","partially_void","cashed_out","redeemable","redeemed","rejected","failed"]},"prediction_SportsbookOrderView":{"type":"object","required":["ticketId","bookingCode","ownerWallet","status","kind","environment","stakeAtomic","token","signatureRequired","legs","createdAt","updatedAt"],"properties":{"betId":{"type":["string","null"]},"bonusId":{"type":["string","null"]},"bookingCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"environment":{"type":"string"},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"kind":{"$ref":"#/components/schemas/prediction_SportsbookOrderKind"},"legs":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookOrderLegView"}},"ownerWallet":{"type":"string"},"payoutAtomic":{"type":["string","null"]},"possiblePayoutAtomic":{"type":["string","null"]},"providerOrderId":{"type":["string","null"]},"settlement":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/prediction_SportsbookSettlementView"}]},"signatureRequired":{"type":"boolean"},"stakeAtomic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/prediction_BetToken"},"transactionHash":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_SportsbookProvider":{"type":"string","enum":["azuro","polymarket"]},"prediction_SportsbookRealtimeEvent":{"oneOf":[{"type":"object","required":["environment","type"],"properties":{"environment":{"type":"string"},"type":{"type":"string","enum":["ready"]}}},{"type":"object","required":["conditionId","state","outcomes","type"],"properties":{"cashoutEnabled":{"type":["boolean","null"]},"conditionId":{"type":"string"},"gameId":{"type":["string","null"]},"hidden":{"type":["boolean","null"]},"liveEnabled":{"type":["boolean","null"]},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/prediction_RealtimeOutcomeUpdate"}},"prematchEnabled":{"type":["boolean","null"]},"state":{"type":"string"},"type":{"type":"string","enum":["condition"]}}},{"type":"object","required":["gameId","type"],"properties":{"clock":{},"gameId":{"type":"string"},"jerseyColors":{},"scoreboard":{},"stats":{},"status":{},"timeline":{},"type":{"type":"string","enum":["statistics"]},"virtualCourtId":{}}},{"type":"object","required":["scope","type"],"properties":{"scope":{"$ref":"#/components/schemas/prediction_RealtimeResyncScope"},"type":{"type":"string","enum":["resync"]}}}]},"prediction_SportsbookRealtimeStatus":{"type":"object","required":["environment","endpoint","conditionFeedConnected","statisticsFeedConnected","downstreamSubscribers"],"properties":{"conditionFeedConnected":{"type":"boolean"},"downstreamSubscribers":{"type":"integer","minimum":0},"endpoint":{"type":"string"},"environment":{"type":"string"},"statisticsFeedConnected":{"type":"boolean"}}},"prediction_SportsbookRedemptionKind":{"type":"string","enum":["regular","freebet"]},"prediction_SportsbookRedemptionView":{"type":"object","required":["redemptionId","ticketId","status","amountAtomic","createdAt","updatedAt"],"properties":{"amountAtomic":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"redemptionId":{"type":"string","format":"uuid"},"status":{"type":"string"},"ticketId":{"type":"string","format":"uuid"},"transactionHash":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}}},"prediction_SportsbookSearchPage":{"type":"object","required":["provider","environment","events","page","perPage"],"properties":{"environment":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SportsbookEvent"}},"nextPage":{"type":["integer","null"],"format":"int32","minimum":0},"page":{"type":"integer","format":"int32","minimum":0},"perPage":{"type":"integer","format":"int32","minimum":0},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"},"total":{"type":["integer","null"],"format":"int32","minimum":0},"totalPages":{"type":["integer","null"],"format":"int32","minimum":0}}},"prediction_SportsbookSettlementView":{"type":"object","required":["isRedeemable","isRedeemed","isCashedOut","hasVoidedLegs","syncedAt"],"properties":{"freebetId":{"type":["string","null"]},"hasVoidedLegs":{"type":"boolean"},"isCashedOut":{"type":"boolean"},"isFreebetAmountReturnable":{"type":["boolean","null"]},"isRedeemable":{"type":"boolean"},"isRedeemed":{"type":"boolean"},"paymasterContractAddress":{"type":["string","null"]},"providerResult":{"type":["string","null"]},"providerStatus":{"type":["string","null"]},"resolvedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":"string","format":"date-time"}}},"prediction_SportsbookSort":{"type":"string","enum":["starts_at","turnover"]},"prediction_SubmitCashoutRequest":{"type":"object","required":["cashoutId","signature"],"properties":{"cashoutId":{"type":"string","format":"uuid"},"signature":{"type":"string"}},"additionalProperties":false},"prediction_SubmitOrderRequest":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string"}},"additionalProperties":false},"prediction_SubmitRedemptionRequest":{"type":"object","required":["transactionHash"],"properties":{"transactionHash":{"type":"string"}},"additionalProperties":false},"prediction_SuggestedCombo":{"type":"object","required":["selections"],"properties":{"selections":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SuggestedComboSelection"}}}},"prediction_SuggestedComboSelection":{"type":"object","required":["event","marketId","marketTitle","outcome"],"properties":{"event":{"$ref":"#/components/schemas/prediction_SportsbookEvent"},"marketId":{"type":"string"},"marketTitle":{"type":"string"},"outcome":{"$ref":"#/components/schemas/prediction_MarketOutcome"}}},"prediction_SuggestedCombos":{"type":"object","required":["provider","environment","combos"],"properties":{"combos":{"type":"array","items":{"$ref":"#/components/schemas/prediction_SuggestedCombo"}},"environment":{"type":"string"},"provider":{"$ref":"#/components/schemas/prediction_SportsbookProvider"}}}},"securitySchemes":{"perp_waitlistAdminKey":{"type":"http","scheme":"bearer","description":"The service operator’s WAITLIST_ADMIN_KEY (admin listing only)."},"perp_perpsAdminKey":{"type":"http","scheme":"bearer","description":"The service operator’s PERPS_ADMIN_KEY (reward status + claim only)."},"kash_adminKey":{"type":"http","scheme":"bearer","description":"KASH_TEST_ADMIN_KEY — test-only wallet reset routes."},"kash_railKey":{"type":"http","scheme":"bearer","description":"KASH_RAIL_API_KEY — the service rail. Proves the CALLER is a trusted service; it is not consent from the wallet holder, which travels separately as a permit on each debit."},"kash_privyIdentity":{"type":"apiKey","in":"header","name":"privy-id-token","description":"The session's Privy identity token, forwarded by the gateway. The service verifies it and reads the caller's embedded wallet from it."},"paymaster_privyToken":{"type":"apiKey","in":"header","name":"privy-id-token"},"paymaster_bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"user-management_AdminApiKey":{"type":"apiKey","in":"header","name":"x-admin-api-key"},"user-management_DecaneBearer":{"type":"http","scheme":"bearer","bearerFormat":"Decane access token"},"user-management_basicAuth":{"type":"http","scheme":"basic"}},"responses":{"perp_NotFound":{"description":"Unknown market (PAIR_NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ErrorResponse"}}}},"perp_BadRequest":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/perp_ErrorResponse"}}}},"kash_BadRequest":{"description":"Validation failed (VALIDATION_ERROR)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ErrorResponse"}}}},"kash_Unauthorized":{"description":"Missing or invalid identity token (UNAUTHORIZED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ErrorResponse"}}}},"kash_Conflict":{"description":"The request contradicts existing state (CONFLICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/kash_ErrorResponse"}}}}}},"tags":[{"name":"meta"},{"name":"routing"},{"name":"arkjet","description":"arkjet service (proxied at /v1/arkjet/*)"},{"name":"perp","description":"perp service (proxied at /v1/perp/*)"},{"name":"gas-sponsor","description":"gas-sponsor service (proxied at /v1/gas-sponsor/*)"},{"name":"kash","description":"kash service (proxied at /v1/kash/*)"},{"name":"prediction","description":"prediction service (proxied at /v1/prediction/*)"},{"name":"paymaster","description":"paymaster service (proxied at /v1/paymaster/*)"},{"name":"prediction-market","description":"prediction-market service (proxied at /v1/prediction-market/*)"},{"name":"user-management","description":"user-management service (proxied at /v1/user-management/*)"}]}