{"components":{"schemas":{"APIKey":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"prefix":{"pattern":"^st_live_","type":"string"},"requests_today":{"format":"int64","minimum":0,"type":"integer"}},"required":["id","name","prefix","created_at","last_used_at","requests_today"],"type":"object"},"Account":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"email":{"format":"email","type":"string"},"id":{"type":"string"},"limits":{"additionalProperties":false,"properties":{"active_deployments":{"format":"int64","minimum":0,"type":"integer"},"api_keys":{"format":"int64","minimum":0,"type":"integer"},"concurrent_backtests":{"format":"int64","minimum":0,"type":"integer"},"requests_per_day":{"format":"int64","minimum":0,"type":"integer"}},"required":["active_deployments","concurrent_backtests","requests_per_day","api_keys"],"type":"object"},"plan":{"enum":["free","pro"],"type":"string"},"usage":{"additionalProperties":false,"properties":{"backtests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"running":{"format":"int64","minimum":0,"type":"integer"}},"required":["running","limit"],"type":"object"},"by_key":{"items":{"additionalProperties":false,"properties":{"api_key_start":{"type":"string"},"key_id":{"type":"string"},"requests":{"format":"int64","minimum":0,"type":"integer"}},"required":["key_id","api_key_start","requests"],"type":"object"},"type":"array"},"deployments":{"additionalProperties":false,"properties":{"active":{"format":"int64","minimum":0,"type":"integer"},"limit":{"format":"int64","minimum":0,"type":"integer"}},"required":["active","limit"],"type":"object"},"period":{"format":"date","type":"string"},"requests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"used":{"format":"int64","minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"}},"required":["period","requests","deployments","backtests","by_key"],"type":"object"}},"required":["id","email","plan","created_at","limits","usage"],"type":"object"},"Backtest":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"reason":{"type":"string"},"release":{"type":["string","null"]},"result":{"additionalProperties":true,"type":["object","null"]},"status":{"enum":["queued","running","finished","error","deleted"],"type":"string"},"symbols":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["id","status","framework","venue"],"type":"object"},"Deployment":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"},"ErrorResponse":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"details":{"additionalProperties":true,"type":["object","null"]},"docs_url":{"format":"uri","type":"string"},"message":{"type":"string"}},"required":["code","message","docs_url","details"],"type":"object"}},"required":["error"],"type":"object"},"Execution":{"additionalProperties":false,"properties":{"account_address":{"type":"string"},"action_type":{"description":"Native action type when supplied; native when the action has no type field.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":true,"type":"object"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"result":{"additionalProperties":true,"type":"object"},"status":{"enum":["processing","submitting","succeeded","failed","reconciliation_required"],"type":"string"},"venue":{"enum":["hyperliquid","polymarket"],"type":"string"}},"required":["id","status","venue","action_type","account_address","created_at"],"type":"object"},"Pagination":{"additionalProperties":true,"properties":{"next_cursor":{"type":["string","null"]}},"required":["next_cursor"],"type":"object"},"RuntimeLogs":{"additionalProperties":false,"properties":{"deployment_id":{"type":"string"},"id":{"type":"string"},"logs":{"items":{"type":"string"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["id","logs","next_cursor"],"type":"object"},"Usage":{"additionalProperties":false,"properties":{"backtests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"running":{"format":"int64","minimum":0,"type":"integer"}},"required":["running","limit"],"type":"object"},"by_key":{"items":{"additionalProperties":false,"properties":{"api_key_start":{"type":"string"},"key_id":{"type":"string"},"requests":{"format":"int64","minimum":0,"type":"integer"}},"required":["key_id","api_key_start","requests"],"type":"object"},"type":"array"},"deployments":{"additionalProperties":false,"properties":{"active":{"format":"int64","minimum":0,"type":"integer"},"limit":{"format":"int64","minimum":0,"type":"integer"}},"required":["active","limit"],"type":"object"},"period":{"format":"date","type":"string"},"requests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"used":{"format":"int64","minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"}},"required":["period","requests","deployments","backtests","by_key"],"type":"object"},"Wallet":{"additionalProperties":false,"properties":{"address":{"type":"string"},"balance":{"$ref":"#/components/schemas/WalletBalance"},"deposit":{"$ref":"#/components/schemas/WalletDeposit"},"venues":{"additionalProperties":false,"properties":{"hyperliquid":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"},"lighter":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"},"polymarket":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"}},"required":["hyperliquid","polymarket","lighter"],"type":"object"}},"required":["address","deposit","balance","venues"],"type":"object"},"WalletBalance":{"additionalProperties":false,"properties":{"allocated":{"items":{"$ref":"#/components/schemas/WalletVenueBalance"},"type":"array"},"held_usd":{"minimum":0,"type":"number"},"networks":{"items":{"$ref":"#/components/schemas/WalletNetworkBalance"},"maxItems":2,"minItems":2,"type":"array"},"total_usd":{"minimum":0,"type":"number"}},"required":["held_usd","networks","allocated","total_usd"],"type":"object"},"WalletDeposit":{"additionalProperties":false,"properties":{"address":{"type":"string"},"asset":{"const":"USDC","type":"string"},"chain":{"const":"arbitrum","type":"string"},"min_usd":{"const":50,"type":"number"},"protocol_min_usd":{"const":5,"type":"number"}},"required":["chain","asset","address","min_usd","protocol_min_usd"],"type":"object"},"WalletNetworkBalance":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"const":"USDC","type":"string"},"balance":{"minimum":0,"type":"number"},"balance_usd":{"minimum":0,"type":"number"},"network":{"enum":["arbitrum","polygon"],"type":"string"}},"required":["network","address","asset","balance","balance_usd"],"type":"object"},"WalletVenueBalance":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":"number"},"deployment":{"type":"string"},"venue":{"enum":["hyperliquid","polymarket","lighter"],"type":"string"}},"required":["venue","balance_usd"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"x-api-key","type":"apiKey"},"BearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"description":"Unified account, wallet, market context, runtime, deployment, backtest, execution, and MCP API.","title":"Superior Trade Unified API","version":"0.2.0"},"openapi":"3.1.0","paths":{"/.well-known/mcp.json":{"get":{"operationId":"getMCPDiscovery","responses":{"200":{"content":{"application/json":{"example":{"name":"superior-trade","url":"https://api.superior.trade/mcp"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"MCP discovery manifest","x-superior-docs":"https://docs.superior.trade/quickstart/agent","x-superior-status":"implemented"}},"/account":{"get":{"operationId":"getAccount","responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-07-28T09:12:00Z","email":"operator@example.com","id":"acct_01j8xq2v9…","limits":{"active_deployments":3,"api_keys":10,"concurrent_backtests":2,"requests_per_day":10000},"plan":"free","usage":{"backtests":{"limit":2,"running":0},"by_key":[{"api_key_start":"st_live_a1b2c3...","key_id":"key_01j8xq2v9…","requests":1240},{"api_key_start":"st_live_d4e5f6...","key_id":"key_01j8xr8m1…","requests":653}],"deployments":{"active":2,"limit":3},"period":"2026-07-28","requests":{"limit":10000,"used":1893}}},"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"email":{"format":"email","type":"string"},"id":{"type":"string"},"limits":{"additionalProperties":false,"properties":{"active_deployments":{"format":"int64","minimum":0,"type":"integer"},"api_keys":{"format":"int64","minimum":0,"type":"integer"},"concurrent_backtests":{"format":"int64","minimum":0,"type":"integer"},"requests_per_day":{"format":"int64","minimum":0,"type":"integer"}},"required":["active_deployments","concurrent_backtests","requests_per_day","api_keys"],"type":"object"},"plan":{"enum":["free","pro"],"type":"string"},"usage":{"additionalProperties":false,"properties":{"backtests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"running":{"format":"int64","minimum":0,"type":"integer"}},"required":["running","limit"],"type":"object"},"by_key":{"items":{"additionalProperties":false,"properties":{"api_key_start":{"type":"string"},"key_id":{"type":"string"},"requests":{"format":"int64","minimum":0,"type":"integer"}},"required":["key_id","api_key_start","requests"],"type":"object"},"type":"array"},"deployments":{"additionalProperties":false,"properties":{"active":{"format":"int64","minimum":0,"type":"integer"},"limit":{"format":"int64","minimum":0,"type":"integer"}},"required":["active","limit"],"type":"object"},"period":{"format":"date","type":"string"},"requests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"used":{"format":"int64","minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"}},"required":["period","requests","deployments","backtests","by_key"],"type":"object"}},"required":["id","email","plan","created_at","limits","usage"],"type":"object"}}},"description":"Account details"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Missing or invalid credentials"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing or invalid credentials"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/rate-limits","message":"Daily request limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Daily request limit exceeded"},"500":{"content":{"application/json":{"example":{"error":{"code":"internal_error","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unable to load account"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Return account identity, plan, limits, and usage","x-superior-docs":"https://docs.superior.trade/account","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/account/keys":{"get":{"operationId":"listAPIKeys","responses":{"200":{"content":{"application/json":{"example":{"keys":[{"created_at":"2026-07-28T09:12:00Z","id":"key_01j8xq2v9…","last_used_at":"2026-07-28T11:03:41Z","name":"trading-agent","prefix":"st_live_4f2a9c…","requests_today":1240}]},"schema":{"additionalProperties":false,"properties":{"keys":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"prefix":{"pattern":"^st_live_","type":"string"},"requests_today":{"format":"int64","minimum":0,"type":"integer"}},"required":["id","name","prefix","created_at","last_used_at","requests_today"],"type":"object"},"type":"array"}},"required":["keys"],"type":"object"}}},"description":"Active API keys"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Missing or invalid session"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing or invalid session"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/rate-limits","message":"Daily request limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Daily request limit exceeded"},"500":{"content":{"application/json":{"example":{"error":{"code":"internal_error","details":null,"docs_url":"https://docs.superior.trade/account/api-keys","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unable to list API keys"}},"security":[{"BearerAuth":[]}],"summary":"List API keys","x-superior-docs":"https://docs.superior.trade/account/api-keys","x-superior-provider":"account_store","x-superior-status":"implemented"},"post":{"operationId":"createAPIKey","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"name":{"description":"Optional display name; defaults to api-key when blank or omitted","type":"string"}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"example":{"account_id":"acct_example","api_key":"st_live_0000000000000000000000000000000000000000000000000000000000000000","key_id":"key_example"},"schema":{"additionalProperties":false,"properties":{"account_id":{"type":"string"},"api_key":{"pattern":"^st_live_[0-9a-f]{64}$","type":"string"},"key_id":{"type":"string"}},"required":["api_key","key_id","account_id"],"type":"object"}}},"description":"API key created"},"400":{"content":{"application/json":{"example":{"error":{"code":"bad_request","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Request body must contain one valid JSON object"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request body must contain one valid JSON object"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Missing or invalid session"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing or invalid session"},"409":{"content":{"application/json":{"example":{"error":{"code":"key_limit_reached","details":null,"docs_url":"https://docs.superior.trade/account/api-keys","message":"The account API key limit has been reached"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The account API key limit has been reached"},"413":{"content":{"application/json":{"example":{"error":{"code":"request_too_large","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Request body exceeds the 1 MiB limit"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request body exceeds the 1 MiB limit"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/rate-limits","message":"Daily request limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Daily request limit exceeded"},"500":{"content":{"application/json":{"example":{"error":{"code":"internal_error","details":null,"docs_url":"https://docs.superior.trade/account/api-keys","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unable to create API key"}},"security":[{"BearerAuth":[]}],"summary":"Create an API key","x-superior-docs":"https://docs.superior.trade/account/api-keys","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/account/keys/{id}":{"delete":{"operationId":"revokeAPIKey","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"status":"revoked"},"schema":{"additionalProperties":false,"properties":{"status":{"const":"revoked","type":"string"}},"required":["status"],"type":"object"}}},"description":"API key revoked"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Missing or invalid session"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing or invalid session"},"404":{"content":{"application/json":{"example":{"error":{"code":"not_found","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"API key not found"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"API key not found"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/rate-limits","message":"Daily request limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Daily request limit exceeded"},"500":{"content":{"application/json":{"example":{"error":{"code":"internal_error","details":null,"docs_url":"https://docs.superior.trade/account/api-keys","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unable to revoke API key"}},"security":[{"BearerAuth":[]}],"summary":"Revoke an API key","x-superior-docs":"https://docs.superior.trade/account/api-keys","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/account/register":{"post":{"operationId":"registerAccount","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"expires_in":600,"status":"otp_sent"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Request an account verification OTP","x-superior-docs":"https://docs.superior.trade/account/authentication","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/account/usage":{"get":{"operationId":"getAccountUsage","responses":{"200":{"content":{"application/json":{"example":{"backtests":{"limit":2,"running":0},"by_key":[{"api_key_start":"st_live_a1b2c3...","key_id":"key_01j8xq2v9…","requests":1240}],"deployments":{"active":2,"limit":3},"period":"2026-07-28","requests":{"limit":10000,"used":1893}},"schema":{"additionalProperties":false,"properties":{"backtests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"running":{"format":"int64","minimum":0,"type":"integer"}},"required":["running","limit"],"type":"object"},"by_key":{"items":{"additionalProperties":false,"properties":{"api_key_start":{"type":"string"},"key_id":{"type":"string"},"requests":{"format":"int64","minimum":0,"type":"integer"}},"required":["key_id","api_key_start","requests"],"type":"object"},"type":"array"},"deployments":{"additionalProperties":false,"properties":{"active":{"format":"int64","minimum":0,"type":"integer"},"limit":{"format":"int64","minimum":0,"type":"integer"}},"required":["active","limit"],"type":"object"},"period":{"format":"date","type":"string"},"requests":{"additionalProperties":false,"properties":{"limit":{"format":"int64","minimum":0,"type":"integer"},"used":{"format":"int64","minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"}},"required":["period","requests","deployments","backtests","by_key"],"type":"object"}}},"description":"Account usage"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Missing or invalid credentials"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing or invalid credentials"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/rate-limits","message":"Daily request limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Daily request limit exceeded"},"500":{"content":{"application/json":{"example":{"error":{"code":"internal_error","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unable to load account usage"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Return current account usage and limits","x-superior-docs":"https://docs.superior.trade/account/usage","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/account/verify":{"post":{"operationId":"verifyAccount","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"account_id":"acct_example","api_key":"st_example_redacted"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Verify an OTP and receive an API key","x-superior-docs":"https://docs.superior.trade/account/authentication","x-superior-provider":"account_store","x-superior-status":"implemented"}},"/context/candles":{"get":{"operationId":"getCandles","parameters":[{"description":"Venue id.","in":"query","name":"venue","required":true,"schema":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},{"description":"Exact canonical Context market symbol.","in":"query","name":"symbol","required":true,"schema":{"type":"string"}},{"description":"UTC candle timeframe aggregated from one-minute data.","in":"query","name":"timeframe","required":false,"schema":{"default":"1h","enum":["1m","5m","15m","1h","4h","1d"],"type":"string"}},{"description":"Inclusive RFC3339 window start.","in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Exclusive RFC3339 window end.","in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Maximum rows to return.","in":"query","name":"limit","required":false,"schema":{"default":10000,"maximum":10000,"minimum":1,"type":"integer"}},{"description":"Opaque cursor returned by the preceding page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"type":"string"}},{"description":"Optional immutable release id.","in":"query","name":"release","required":false,"schema":{"maxLength":256,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"candles":[],"next_cursor":null,"release":null,"symbol":"BTC-USD","timeframe":"1h","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"candles":{"items":{"additionalProperties":false,"properties":{"c":{"type":"number"},"h":{"type":"number"},"l":{"type":"number"},"o":{"type":"number"},"t":{"format":"date-time","type":"string"},"v":{"type":"number"}},"required":["t","o","h","l","c","v"],"type":"object"},"type":"array"},"gaps":{"items":{"additionalProperties":false,"properties":{"from":{"format":"date-time","type":"string"},"reason":{"type":"string"},"to":{"format":"date-time","type":"string"}},"required":["from","to","reason"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]},"release":{"type":["string","null"]},"symbol":{"type":"string"},"timeframe":{"enum":["1m","5m","15m","1h","4h","1d"],"type":"string"},"venue":{"type":"string"}},"required":["venue","symbol","timeframe","release","candles","next_cursor"],"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"description":"Historical rows","headers":{"X-Superior-Context-Gaps":{"description":"Bounded unpadded-base64url JSON summary of the text/csv page's gap state, count, and ordered-ledger SHA-256 fingerprint.","schema":{"maxLength":256,"type":"string"}},"X-Superior-Context-Release":{"description":"Immutable release id for a text/csv page, or the literal null when the source is mutable.","schema":{"type":"string"}},"X-Superior-Context-Symbol":{"description":"Canonical market symbol for a text/csv page.","schema":{"type":"string"}},"X-Superior-Context-Timeframe":{"description":"Normalized candle timeframe for a text/csv page.","schema":{"type":"string"}},"X-Superior-Context-Venue":{"description":"Canonical venue for a text/csv page.","schema":{"type":"string"}},"X-Superior-Next-Cursor":{"description":"Opaque continuation cursor for a text/csv page, or the literal null on the final page.","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid historical query"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Requested response format is unavailable"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue does not support this historical series"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue history is coming soon"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Historical catalog or object failed integrity validation"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Historical object store is unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get release-bound candle data for a symbol","x-superior-docs":"https://docs.superior.trade/context/market-data","x-superior-provider":"historical_context","x-superior-status":"implemented"}},"/context/datasets":{"get":{"description":"For Polymarket, an exact symbol follows exact Gamma token to slug to per-slug GCS readiness and never reads the legacy global catalog. An unfiltered request returns one bounded page with no cursor. A readiness-derived trades table reports rows=0 when the row count is unknown; zero does not mean the immutable dataset is empty.","operationId":"listDatasets","parameters":[{"description":"Optional venue filter.","in":"query","name":"venue","required":false,"schema":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},{"description":"Optional exact canonical symbol; requires venue.","in":"query","name":"symbol","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"datasets":[],"next_cursor":null},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"error":{"code":"bad_request","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Invalid dataset query"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid dataset query"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"example":{"error":{"code":"context_upstream_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Gamma data is invalid or unavailable; invalid readiness markers are isolated to their market"},"503":{"content":{"application/json":{"example":{"error":{"code":"context_store_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"GCS readiness access failed"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List available datasets","x-error-codes":["bad_request","context_upstream_unavailable","context_store_unavailable"],"x-superior-docs":"https://docs.superior.trade/context/datasets","x-superior-provider":"context_catalog","x-superior-status":"implemented"}},"/context/funding":{"get":{"operationId":"getFunding","parameters":[{"description":"Venue id.","in":"query","name":"venue","required":true,"schema":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},{"description":"Exact canonical perpetual-market symbol.","in":"query","name":"symbol","required":true,"schema":{"type":"string"}},{"description":"Inclusive RFC3339 window start.","in":"query","name":"from","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Exclusive RFC3339 window end.","in":"query","name":"to","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Maximum rows to return.","in":"query","name":"limit","required":false,"schema":{"default":10000,"maximum":10000,"minimum":1,"type":"integer"}},{"description":"Opaque cursor returned by the preceding page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"type":"string"}},{"description":"Optional immutable release id.","in":"query","name":"release","required":false,"schema":{"maxLength":256,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"fundings":[],"next_cursor":null,"release":null,"symbol":"BTC-USD","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"fundings":{"items":{"additionalProperties":false,"properties":{"rate":{"type":"number"},"rate_annualized":{"type":"number"},"t":{"format":"date-time","type":"string"}},"required":["t","rate","rate_annualized"],"type":"object"},"type":"array"},"gaps":{"items":{"additionalProperties":false,"properties":{"from":{"format":"date-time","type":"string"},"reason":{"type":"string"},"to":{"format":"date-time","type":"string"}},"required":["from","to","reason"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]},"release":{"type":["string","null"]},"symbol":{"type":"string"},"venue":{"type":"string"}},"required":["venue","symbol","release","fundings","next_cursor"],"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"description":"Historical rows","headers":{"X-Superior-Context-Gaps":{"description":"Bounded unpadded-base64url JSON summary of the text/csv page's gap state, count, and ordered-ledger SHA-256 fingerprint.","schema":{"maxLength":256,"type":"string"}},"X-Superior-Context-Release":{"description":"Immutable release id for a text/csv page, or the literal null when the source is mutable.","schema":{"type":"string"}},"X-Superior-Context-Symbol":{"description":"Canonical market symbol for a text/csv page.","schema":{"type":"string"}},"X-Superior-Context-Venue":{"description":"Canonical venue for a text/csv page.","schema":{"type":"string"}},"X-Superior-Next-Cursor":{"description":"Opaque continuation cursor for a text/csv page, or the literal null on the final page.","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid historical query"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Requested response format is unavailable"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue does not support this historical series"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue history is coming soon"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Historical catalog or object failed integrity validation"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Historical object store is unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get release-bound funding data for a symbol","x-superior-docs":"https://docs.superior.trade/context/market-data","x-superior-provider":"historical_context","x-superior-status":"implemented"}},"/context/leaderboard":{"get":{"operationId":"getLeaderboard","responses":{"200":{"content":{"application/json":{"example":{"disclaimer":"Paper-trading leaderboard for informational purposes only. Not financial advice. Backtested and paper results are not guarantees of future performance.","strategies":[]},"schema":{"additionalProperties":false,"properties":{"disclaimer":{"type":"string"},"strategies":{"items":{"additionalProperties":false,"properties":{"account_value":{"type":["number","null"]},"backtest":{"additionalProperties":true,"type":["object","null"]},"backtest_id":{"type":["string","null"]},"copy_count":{"type":"integer"},"deployed_at":{"type":["string","null"]},"deployment_id":{"type":["string","null"]},"display_rank":{"type":"integer"},"live_apr":{"type":["number","null"]},"live_pnl_abs":{"type":["number","null"]},"live_pnl_pct":{"type":["number","null"]},"name":{"type":"string"},"params":{"additionalProperties":true,"type":"object"},"pnl_24h_abs":{"type":["number","null"]},"pnl_24h_pct":{"type":["number","null"]},"prompt":{"type":"string"},"slug":{"type":"string"},"snapshot_at":{"type":["string","null"]}},"required":["slug","name","prompt","params","display_rank","deployment_id","deployed_at","live_pnl_abs","live_pnl_pct","live_apr","pnl_24h_abs","pnl_24h_pct","account_value","snapshot_at","copy_count","backtest_id","backtest"],"type":"object"},"type":"array"}},"required":["strategies","disclaimer"],"type":"object"}}},"description":"Paper-trading strategy leaderboard"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"leaderboard_store_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Strategy leaderboard is temporarily unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List paper-trading strategy leaderboard entries","x-superior-docs":"https://docs.superior.trade/context/leaderboard","x-superior-provider":"leaderboard","x-superior-status":"implemented"}},"/context/markets":{"get":{"description":"Cross-venue search is fail-soft: matches from available venues are returned when an unrelated venue fails; if no venue returns a match, the first provider error is returned. Polymarket live discovery uses bounded Gamma search and the exact active=true, closed=false, archived!=true, acceptingOrders=true, valid endDate, and endDate\u003enow lifecycle predicate. Per-slug GCS readiness is independent evidence of backtest coverage; live/all search leaves backtest_ready false and unverified, while readiness filtering performs exact slug reads. A request without search text returns one bounded readiness page rather than enumerating Gamma. The opaque cursor is not a snapshot and upstream or readiness drift can invalidate it. Markets, Datasets, and exact latest-dataset resolution never read the legacy global Polymarket catalog while the rollout flag is enabled.","operationId":"listMarkets","parameters":[{"description":"Optional free-text symbol, name, or question search across supported venues.","in":"query","name":"query","required":false,"schema":{"maxLength":256,"type":"string"}},{"description":"Maximum markets to return.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"markets":[],"next_cursor":null},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"error":{"code":"bad_request","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Invalid market search or opaque cursor"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid market search or opaque cursor"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"example":{"error":{"code":"context_upstream_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Gamma data is invalid or unavailable; invalid readiness markers are isolated to their market"},"503":{"content":{"application/json":{"example":{"error":{"code":"context_store_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"GCS readiness access failed"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List supported markets","x-error-codes":["bad_request","invalid_cursor","cursor_query_mismatch","context_upstream_unavailable","context_store_unavailable"],"x-superior-cross-venue-errors":{"empty_results":"return_first_provider_error","partial_results":"return_available_matches"},"x-superior-docs":"https://docs.superior.trade/context/markets","x-superior-polymarket-catalog":{"cursor_consistency":"opaque_non_snapshot","legacy_global_catalog":false,"live_discovery":"gamma","live_lifecycle":["active=true","closed=false","archived!=true","acceptingOrders=true","valid endDate","endDate\u003enow"],"no_query_scope":"one_bounded_readiness_page","readiness":"gcs_per_slug","search_backtest_ready":"exact_slug_reads","search_live_readiness":"false_unverified","store_error_scope":"gcs_access_failure"},"x-superior-provider":"context_catalog","x-superior-status":"implemented"}},"/context/scan":{"get":{"operationId":"scanSetups","parameters":[{"description":"Market universe to scan.","in":"query","name":"bucket","required":false,"schema":{"default":"all","enum":["alts","hip3","all"],"type":"string"}},{"description":"Public intelligence score category.","in":"query","name":"category","required":false,"schema":{"default":"all","enum":["momentum","mean_reversion","breakout","volume","all"],"type":"string"}},{"description":"Maximum results returned per selected category.","in":"query","name":"top_n","required":false,"schema":{"default":10,"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"computed_at":"2026-09-02T00:00:00Z","results":[]},"schema":{"additionalProperties":false,"properties":{"computed_at":{"format":"date-time","type":"string"},"results":{"items":{"additionalProperties":false,"properties":{"category":{"enum":["momentum","mean_reversion","breakout","volume"],"type":"string"},"evidence":{"additionalProperties":false,"properties":{"basis_pct":{"type":["number","null"]},"funding_apr_pct":{"type":"number"},"funding_paid_notional_usd_per_yr":{"minimum":0,"type":"number"},"liquidity_tier":{"enum":["tradable","watch","microcap"],"type":"string"},"mark_px":{"exclusiveMinimum":0,"type":"number"},"oi_turnover_days":{"minimum":0,"type":"number"},"oi_usd":{"minimum":0,"type":"number"},"pct_change_24h":{"type":"number"},"timeframe":{"enum":["15m","1h","4h","24h"],"type":"string"},"volume_usd_24h":{"minimum":0,"type":"number"}},"required":["timeframe","mark_px","pct_change_24h","volume_usd_24h","oi_usd","funding_apr_pct","funding_paid_notional_usd_per_yr","oi_turnover_days","basis_pct","liquidity_tier"],"type":"object"},"score":{"maximum":1,"minimum":0,"type":"number"},"symbol":{"maxLength":512,"type":"string"}},"required":["symbol","category","score","evidence"],"type":"object"},"type":"array"}},"required":["computed_at","results"],"type":"object"}}},"description":"Market intelligence scan"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid market intelligence request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Market intelligence upstream is unavailable or invalid"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List real market intelligence setups","x-superior-docs":"https://docs.superior.trade/context/intelligence","x-superior-provider":"intelligence","x-superior-status":"implemented"}},"/context/setup/{symbol}":{"get":{"operationId":"getSetup","parameters":[{"description":"Exact canonical Hyperliquid pair, including quote and settlement.","in":"path","name":"symbol","required":true,"schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"computed_at":"2026-09-02T00:00:00Z","found":false,"symbol":"BTC-USD"},"schema":{"oneOf":[{"additionalProperties":false,"properties":{"computed_at":{"format":"date-time","type":"string"},"found":{"const":false,"type":"boolean"},"symbol":{"maxLength":512,"type":"string"}},"required":["symbol","found","computed_at"],"type":"object"},{"additionalProperties":false,"properties":{"best_fit":{"additionalProperties":false,"properties":{"category":{"enum":["momentum","mean_reversion","breakout","volume"],"type":"string"},"score":{"maximum":1,"minimum":0,"type":"number"},"timeframe":{"enum":["15m","1h","4h","24h"],"type":"string"}},"required":["category","timeframe","score"],"type":"object"},"category_fits":{"items":{"additionalProperties":false,"properties":{"best_score":{"maximum":1,"minimum":0,"type":"number"},"best_timeframe":{"enum":["15m","1h","4h","24h"],"type":"string"},"category":{"enum":["momentum","mean_reversion","breakout","volume"],"type":"string"},"score_by_timeframe":{"additionalProperties":false,"properties":{"15m":{"maximum":1,"minimum":0,"type":"number"},"1h":{"maximum":1,"minimum":0,"type":"number"},"24h":{"maximum":1,"minimum":0,"type":"number"},"4h":{"maximum":1,"minimum":0,"type":"number"}},"required":["15m","1h","4h","24h"],"type":"object"}},"required":["category","best_timeframe","best_score","score_by_timeframe"],"type":"object"},"maxItems":4,"minItems":4,"type":"array"},"computed_at":{"format":"date-time","type":"string"},"found":{"const":true,"type":"boolean"},"snapshot":{"additionalProperties":false,"properties":{"basis_pct":{"type":["number","null"]},"funding_apr_pct":{"type":"number"},"funding_paid_notional_usd_per_yr":{"minimum":0,"type":"number"},"liquidity_tier":{"enum":["tradable","watch","microcap"],"type":"string"},"mark_px":{"exclusiveMinimum":0,"type":"number"},"oi_turnover_days":{"minimum":0,"type":"number"},"oi_usd":{"minimum":0,"type":"number"},"pct_change_24h":{"type":"number"},"volume_usd_24h":{"minimum":0,"type":"number"}},"required":["mark_px","pct_change_24h","volume_usd_24h","oi_usd","funding_apr_pct","funding_paid_notional_usd_per_yr","oi_turnover_days","basis_pct","liquidity_tier"],"type":"object"},"symbol":{"maxLength":512,"type":"string"}},"required":["symbol","found","computed_at","snapshot","best_fit","category_fits"],"type":"object"}]}}},"description":"Market intelligence setup"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid market intelligence request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Market intelligence upstream is unavailable or invalid"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get real setup evidence for a canonical pair","x-superior-docs":"https://docs.superior.trade/context/intelligence","x-superior-provider":"intelligence","x-superior-status":"implemented"}},"/context/traders":{"get":{"description":"This operation has no production provider and returns 501 feature_not_available.","operationId":"listTraders","responses":{"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"501":{"content":{"application/json":{"example":{"error":{"code":"feature_not_available","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The requested capability is not available yet"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Tracked traders are not available yet","x-superior-docs":"https://docs.superior.trade/context/leaderboard","x-superior-status":"coming_soon"}},"/context/traders/{wallet}":{"get":{"description":"This operation has no production provider and returns 501 feature_not_available.","operationId":"getTrader","parameters":[{"in":"path","name":"wallet","required":true,"schema":{"type":"string"}}],"responses":{"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"501":{"content":{"application/json":{"example":{"error":{"code":"feature_not_available","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The requested capability is not available yet"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Tracked trader details are not available yet","x-superior-docs":"https://docs.superior.trade/context/leaderboard","x-superior-status":"coming_soon"}},"/context/venues":{"get":{"operationId":"listVenues","responses":{"200":{"content":{"application/json":{"example":{"venues":[]},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List supported venues","x-superior-docs":"https://docs.superior.trade/context/venues","x-superior-status":"implemented"}},"/health":{"get":{"operationId":"getHealth","responses":{"200":{"content":{"application/json":{"example":{"commit":"example","status":"ok"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Health check","x-superior-docs":"https://docs.superior.trade/reference/health","x-superior-status":"implemented"}},"/install.txt":{"get":{"operationId":"getInstallText","responses":{"200":{"content":{"application/json":{"example":{"text":"Connect to the Superior MCP endpoint."},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Install instructions for MCP clients","x-superior-docs":"https://docs.superior.trade/quickstart/agent","x-superior-status":"implemented"}},"/livez":{"get":{"operationId":"getLiveness","responses":{"200":{"content":{"application/json":{"example":{"commit":"example","status":"ok"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Liveness check","x-superior-docs":"https://docs.superior.trade/reference/readiness","x-superior-status":"implemented"}},"/mcp":{"post":{"operationId":"callMCP","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"id":1,"jsonrpc":"2.0","result":{"tools":[]}},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Call the authenticated Streamable HTTP MCP endpoint","x-superior-docs":"https://docs.superior.trade/quickstart/agent","x-superior-provider":"capability_router","x-superior-status":"implemented"}},"/openapi.json":{"get":{"operationId":"getOpenAPI","responses":{"200":{"content":{"application/json":{"example":{"info":{"title":"Superior Trade Unified API","version":"0.2.0"},"openapi":"3.1.0","paths":{}},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"Authoritative OpenAPI contract","x-superior-docs":"https://docs.superior.trade/reference/openapi","x-superior-status":"implemented"}},"/readyz":{"get":{"operationId":"getReadiness","responses":{"200":{"content":{"application/json":{"example":{"checks":{"context_catalog":{"latency_ms":31,"status":"ready"},"database":{"latency_ms":7,"status":"ready"},"email":{"latency_ms":0,"status":"configured"},"execution":{"latency_ms":0,"status":"ready"},"historical_data_storage":{"latency_ms":22,"status":"ready"},"intelligence":{"latency_ms":24,"status":"ready"},"runtime":{"latency_ms":42,"status":"ready"},"venues":{"latency_ms":18,"status":"ready"}},"status":"ready"},"schema":{"additionalProperties":false,"properties":{"checks":{"additionalProperties":false,"properties":{"context_catalog":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"database":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"email":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["configured","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"execution":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"historical_data_storage":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"intelligence":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"runtime":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"venues":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"}},"required":["venues","intelligence","execution","runtime","context_catalog","historical_data_storage","email","database"],"type":"object"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","checks"],"type":"object"}}},"description":"All required dependencies are ready"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"checks":{"additionalProperties":false,"properties":{"context_catalog":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"database":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"email":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["configured","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"execution":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"historical_data_storage":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"intelligence":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"runtime":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"},"venues":{"additionalProperties":false,"properties":{"latency_ms":{"minimum":0,"type":"integer"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","latency_ms"],"type":"object"}},"required":["venues","intelligence","execution","runtime","context_catalog","historical_data_storage","email","database"],"type":"object"},"status":{"enum":["ready","unready"],"type":"string"}},"required":["status","checks"],"type":"object"}}},"description":"One or more required dependencies are unavailable"}},"summary":"Dependency readiness check","x-superior-docs":"https://docs.superior.trade/reference/readiness","x-superior-status":"implemented"}},"/runtime/backtests":{"get":{"operationId":"listBacktests","parameters":[{"description":"Public backtest status filter.","in":"query","name":"status","required":false,"schema":{"enum":["queued","running","finished","error"],"type":"string"}},{"description":"Venue filter.","in":"query","name":"venue","required":false,"schema":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},{"description":"Maximum backtests to return.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque account- and filter-bound cursor returned by the preceding page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"backtests":[],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"backtests":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"reason":{"type":"string"},"release":{"type":["string","null"]},"result":{"additionalProperties":true,"type":["object","null"]},"status":{"enum":["queued","running","finished","error","deleted"],"type":"string"},"symbols":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["id","status","framework","venue"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["backtests","next_cursor"],"type":"object"}}},"description":"Owned backtests"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List and create backtests","x-superior-docs":"https://docs.superior.trade/runtime/backtests","x-superior-status":"implemented"},"post":{"description":"Create a backtest from the typed public framework, venue, strategy, configuration, and time range. Select symbols from /context/markets framework_symbols.\u003cframework\u003e; runtime placement, canonical dataset identity, and provider identifiers are derived internally.","operationId":"createBacktest","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"freqtradeHyperliquid":{"summary":"Freqtrade Hyperliquid alias","value":{"code":"class Strategy: pass","config":{"exchange":{"name":"hyperliquid","pair_whitelist":["BTC/USDC:USDC"]}},"framework":"freqtrade","range":{"from":"2026-01-01","to":"2026-01-03"},"symbols":["BTC/USDC:USDC"],"venue":"hyperliquid"}},"nautilusHyperliquid":{"summary":"Nautilus Hyperliquid alias","value":{"code":"class Strategy: pass","config":{"bar_type":"BTC-PERP.HYPERLIQUID-1-HOUR-LAST-EXTERNAL","instrument_ids":["BTC-PERP.HYPERLIQUID"]},"framework":"nautilus","range":{"from":"2026-01-01T00:00:00Z","to":"2026-01-03T00:00:00Z"},"symbols":["BTC-PERP.HYPERLIQUID"],"venue":"hyperliquid"}}},"schema":{"additionalProperties":false,"properties":{"code":{"description":"Framework-native strategy source.","minLength":1,"type":"string"},"config":{"additionalProperties":true,"description":"Framework-native configuration without credentials or private planner fields.","type":"object"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"description":"Optional immutable sha256 image digest registered for the framework.","type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"description":"Inclusive YYYY-MM-DD or RFC3339 start.","type":"string"},"to":{"description":"Exclusive YYYY-MM-DD or RFC3339 end.","type":"string"}},"required":["from","to"],"type":"object"},"symbols":{"description":"Framework-native market aliases from /context/markets framework_symbols.\u003cframework\u003e. Nautilus requires symbols; Freqtrade may derive them from config.exchange.pair_whitelist.","items":{"type":"string"},"type":"array"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["framework","venue","code","config","range"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":"freqtrade","id":"bt_example","result":null,"status":"queued","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"reason":{"type":"string"},"release":{"type":["string","null"]},"result":{"additionalProperties":true,"type":["object","null"]},"status":{"enum":["queued","running","finished","error","deleted"],"type":"string"},"symbols":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["id","status","framework","venue"],"type":"object"}}},"description":"Backtest accepted"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List and create backtests","x-superior-docs":"https://docs.superior.trade/runtime/backtests","x-superior-provider":"backtest_runtime","x-superior-status":"implemented"}},"/runtime/backtests/dataset":{"get":{"description":"For Polymarket, resolve the exact Gamma token to its canonical slug, then read that per-slug GCS readiness marker and immutable dataset reference. This operation never reads the legacy global catalog while Gamma slug readiness is enabled.","operationId":"getLatestBacktestDataset","parameters":[{"description":"Venue id: lighter, polymarket, or coming-soon binance.","in":"query","name":"venue","required":true,"schema":{"enum":["lighter","polymarket","binance"],"type":"string"}},{"description":"Exact Lighter instrument id or Polymarket outcome-token instrument id.","in":"query","name":"market","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"release":"2026-09-02","symbol":"BTC-USD","venue":"lighter"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"error":{"code":"bad_request","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Invalid venue or canonical market symbol"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid venue or canonical market symbol"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"example":{"error":{"code":"context_upstream_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Gamma data is invalid or unavailable; invalid readiness markers return not-ready"},"503":{"content":{"application/json":{"example":{"error":{"code":"context_store_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"GCS readiness access failed"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get the latest backtest dataset for an exact market","x-error-codes":["bad_request","context_upstream_unavailable","context_store_unavailable"],"x-superior-docs":"https://docs.superior.trade/runtime/backtests/dataset","x-superior-provider":"context_catalog","x-superior-status":"implemented"}},"/runtime/backtests/{id}":{"delete":{"description":"Deletes an account-owned backtest. Terminal finished or error legacy v2 Freqtrade backtests for Hyperliquid are tombstoned without contacting a runtime workload; active or ambiguous legacy records remain unsupported.","operationId":"deleteBacktest","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":"freqtrade","id":"bt_example","result":{},"status":"finished","updated_at":"2026-09-02T00:01:00Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"reason":{"type":"string"},"release":{"type":["string","null"]},"result":{"additionalProperties":true,"type":["object","null"]},"status":{"enum":["queued","running","finished","error","deleted"],"type":"string"},"symbols":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["id","status","framework","venue"],"type":"object"}}},"description":"Deleted backtest"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Non-terminal or unsupported legacy runtime record"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get or delete a backtest","x-superior-docs":"https://docs.superior.trade/runtime/backtests/{id}","x-superior-provider":"backtest_runtime","x-superior-status":"implemented"},"get":{"description":"Returns an account-owned backtest. A legacy v2 Freqtrade backtest for Hyperliquid is available by known ID only after it reaches the terminal finished or error state; this compatibility path returns only fields that were persisted by that API.","operationId":"getBacktest","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":"freqtrade","id":"bt_example","result":null,"status":"running","updated_at":"2026-09-02T00:00:01Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"range":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"reason":{"type":"string"},"release":{"type":["string","null"]},"result":{"additionalProperties":true,"type":["object","null"]},"status":{"enum":["queued","running","finished","error","deleted"],"type":"string"},"symbols":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["id","status","framework","venue"],"type":"object"}}},"description":"Owned backtest"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Non-terminal or unsupported legacy runtime record"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get or delete a backtest","x-superior-docs":"https://docs.superior.trade/runtime/backtests/{id}","x-superior-provider":"backtest_runtime","x-superior-status":"implemented"}},"/runtime/backtests/{id}/logs":{"get":{"operationId":"getBacktestLogs","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"backtest_id":"bt_example","id":"bt_example","logs":[],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"backtest_id":{"type":"string"},"id":{"type":"string"},"logs":{"items":{"type":"string"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["id","logs","next_cursor"],"type":"object"}}},"description":"Owned runtime logs"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get backtest logs","x-superior-docs":"https://docs.superior.trade/runtime/backtests/{id}/logs","x-superior-provider":"runtime_logs","x-superior-status":"implemented"}},"/runtime/deployments":{"get":{"operationId":"listDeployments","parameters":[{"description":"Venue filter.","in":"query","name":"venue","required":false,"schema":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},{"description":"Runtime framework filter.","in":"query","name":"framework","required":false,"schema":{"enum":["freqtrade","nautilus"],"type":"string"}},{"description":"Deployment mode filter.","in":"query","name":"mode","required":false,"schema":{"enum":["paper","live"],"type":"string"}},{"description":"Public deployment status filter.","in":"query","name":"status","required":false,"schema":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"}},{"description":"Maximum deployments to return.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque account- and filter-bound cursor returned by the preceding page.","in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deployments":[],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"deployments":{"items":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["deployments","next_cursor"],"type":"object"}}},"description":"Owned deployments"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List deployments","x-superior-docs":"https://docs.superior.trade/runtime/deployments","x-superior-status":"implemented"},"post":{"description":"Create a deployment from the typed public runtime payload. For managed live Freqtrade, config.available_capital is required as an explicit numeric amount of at least 50 with at most six decimal places; the deployment uses a durable venue setup operation. Paper and BYOK bypass venue allocation. Managed live Nautilus is unavailable until it has an explicit capital authorization contract.","operationId":"createDeployment","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":"string"},"code":{"description":"Framework-native strategy source.","minLength":1,"type":"string"},"config":{"additionalProperties":true,"description":"Framework-native configuration without credentials or private planner fields. Managed live Freqtrade requires numeric available_capital of at least 50 with at most six decimal places; paper and BYOK bypass allocation, and managed live Nautilus is unavailable without an explicit capital authorization contract.","properties":{"available_capital":{"description":"Required only for managed live Freqtrade venue setup; a finite numeric amount with at most six decimal places.","minimum":50,"multipleOf":0.000001,"type":"number"}},"type":"object"},"credentials":{"additionalProperties":false,"description":"Credential mode only; secret material and references are never accepted.","properties":{"type":{"enum":["managed","byok"],"type":"string"}},"required":["type"],"type":"object"},"framework":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"description":"Optional immutable sha256 image digest registered for the framework.","type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"minLength":1,"type":"string"},"on_expiry":{"enum":["stop","block_entries"],"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"}},"required":["framework","venue","mode","name","code","config"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":{"id":"freqtrade","image_digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111"},"id":"dep_example","mode":"live","name":"btc-live","status":"created","updated_at":"2026-09-02T00:00:00Z","venue":"hyperliquid","venue_setup":{"amount_usd":"50.25","id":"vop_example","status":"confirming","step":"deposit","venue":"hyperliquid"}},"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"}}},"description":"Deployment created"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Create a deployment","x-error-codes":["invalid_request","idempotency_key_conflict","venue_not_ready","venue_setup_in_progress","insufficient_held_balance","runtime_provider_unavailable","feature_not_available"],"x-superior-docs":"https://docs.superior.trade/runtime/deployments","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"}},"/runtime/deployments/{id}":{"delete":{"operationId":"deleteDeployment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acknowledge_positions_open":{"type":"boolean"},"force":{"type":"boolean"}},"type":"object"}}},"required":false},"responses":{"202":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":{"id":"freqtrade","image_digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111"},"id":"dep_example","mode":"paper","name":"btc-paper","status":"deleting","updated_at":"2026-09-02T00:00:01Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"}}},"description":"Deployment deletion accepted"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get, update, or delete a deployment","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"},"get":{"operationId":"getDeployment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":{"id":"freqtrade","image_digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111"},"id":"dep_example","mode":"paper","name":"btc-paper","status":"running","updated_at":"2026-09-02T00:00:01Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"}}},"description":"Owned deployment"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get, update, or delete a deployment","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"},"patch":{"operationId":"updateDeployment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"minProperties":1,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"name":{"minLength":1,"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":{"id":"freqtrade","image_digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111"},"id":"dep_example","mode":"paper","name":"btc-paper-renamed","status":"created","updated_at":"2026-09-02T00:00:01Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"}}},"description":"Updated deployment metadata"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get, update, or delete a deployment","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"}},"/runtime/deployments/{id}/credentials":{"put":{"operationId":"setDeploymentCredentials","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Managed credentials are the default when type is omitted. Secret material and references are never accepted.","properties":{"type":{"enum":["managed"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"attached":true,"status":"ready","type":"managed"},"schema":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"enum":["managed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"required":["attached","type","status"],"type":"object"}}},"description":"Deployment credential readiness"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Attach deployment credentials","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}/credentials","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"}},"/runtime/deployments/{id}/logs":{"get":{"operationId":"getDeploymentLogs","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deployment_id":"dep_example","id":"dep_example","logs":[],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"deployment_id":{"type":"string"},"id":{"type":"string"},"logs":{"items":{"type":"string"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["id","logs","next_cursor"],"type":"object"}}},"description":"Owned runtime logs"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get deployment logs","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}/logs","x-superior-provider":"runtime_logs","x-superior-status":"implemented"}},"/runtime/deployments/{id}/metrics":{"get":{"operationId":"getDeploymentMetrics","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"as_of":"2026-09-02T00:00:00Z","balance":{"venue_usd":1000},"exposure":{"positions":[]},"pnl":{"realized_usd":0,"unrealized_usd":0},"simulated":true,"trades":{"losses":0,"open":0,"total":0,"wins":0}},"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"balance":{"additionalProperties":false,"properties":{"venue_usd":{"type":"number"}},"required":["venue_usd"],"type":"object"},"exposure":{"additionalProperties":false,"properties":{"positions":{"items":{"additionalProperties":false,"properties":{"side":{"type":"string"},"size_usd":{"type":"number"},"symbol":{"type":"string"}},"required":["symbol","side","size_usd"],"type":"object"},"type":"array"}},"required":["positions"],"type":"object"},"pnl":{"additionalProperties":false,"properties":{"realized_usd":{"type":"number"},"unrealized_usd":{"type":"number"}},"required":["realized_usd","unrealized_usd"],"type":"object"},"simulated":{"type":"boolean"},"trades":{"additionalProperties":false,"properties":{"losses":{"type":"integer"},"open":{"type":"integer"},"total":{"type":"integer"},"wins":{"type":"integer"}},"required":["total","open","wins","losses"],"type":"object"}},"required":["as_of","simulated","trades","pnl","exposure","balance"],"type":"object"}}},"description":"Normalized deployment metrics"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get deployment metrics","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}/metrics","x-superior-provider":"runtime_metrics","x-superior-status":"implemented"}},"/runtime/deployments/{id}/status":{"put":{"operationId":"setDeploymentStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"enum":["start","stop"],"type":"string"}},"required":["action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-09-02T00:00:00Z","framework":{"id":"freqtrade","image_digest":"sha256:1111111111111111111111111111111111111111111111111111111111111111"},"id":"dep_example","mode":"paper","name":"btc-paper","status":"starting","updated_at":"2026-09-02T00:00:01Z","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"alive_until":{"format":"date-time","type":["string","null"]},"available_replicas":{"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credentials":{"additionalProperties":false,"properties":{"attached":{"type":"boolean"},"status":{"type":"string"},"type":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"wallet_address":{"type":"string"}},"type":"object"},"framework":{"additionalProperties":false,"properties":{"id":{"enum":["freqtrade","nautilus"],"type":"string"},"image_digest":{"type":"string"}},"required":["id","image_digest"],"type":"object"},"id":{"type":"string"},"message":{"type":"string"},"mode":{"enum":["paper","live"],"type":"string"},"name":{"type":"string"},"on_expiry":{"enum":["stop","block_entries",null],"type":["string","null"]},"ready_replicas":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"region":{"enum":["tokyo","london"],"type":"string"},"replicas":{"minimum":0,"type":"integer"},"status":{"enum":["created","starting","running","stopping","stopped","error","deleting","deleted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket","binance"],"type":"string"},"venue_setup":{"additionalProperties":false,"properties":{"amount_usd":{"pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"venue":{"enum":["hyperliquid","lighter","polymarket"],"type":"string"}},"required":["id","venue","amount_usd","status","step"],"type":"object"}},"required":["id","name","mode","status","framework","venue"],"type":"object"}}},"description":"Deployment lifecycle transition accepted"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Start or stop a deployment","x-superior-docs":"https://docs.superior.trade/runtime/deployments/{id}/status","x-superior-provider":"deployment_runtime","x-superior-status":"implemented"}},"/runtime/executions":{"get":{"operationId":"listExecutions","responses":{"200":{"content":{"application/json":{"example":{"executions":[],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"executions":{"items":{"additionalProperties":false,"properties":{"account_address":{"type":"string"},"action_type":{"description":"Native action type when supplied; native when the action has no type field.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":true,"type":"object"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"result":{"additionalProperties":true,"type":"object"},"status":{"enum":["processing","submitting","succeeded","failed","reconciliation_required"],"type":"string"},"venue":{"enum":["hyperliquid","polymarket"],"type":"string"}},"required":["id","status","venue","action_type","account_address","created_at"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["executions","next_cursor"],"type":"object"}}},"description":"Owned one-time venue executions"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Execution history unavailable (execution_store_unavailable)"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List durable one-time venue executions","x-superior-docs":"https://docs.superior.trade/runtime/executions","x-superior-provider":"execution_store","x-superior-status":"implemented"},"post":{"description":"Synchronously run one native venue action through a managed wallet. Superior performs server-side credential injection, signing, nonce and timestamp generation, and transport selection; caller-supplied credentials, signatures, nonces, headers, methods, paths, and endpoints are rejected.","operationId":"createExecution","parameters":[{"description":"Unique key for this logical native execution. Reusing it with different input returns 409.","in":"header","name":"Idempotency-Key","required":true,"schema":{"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account_address":{"description":"Optional owned managed trading account. The default active account is used when omitted.","pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"action":{"additionalProperties":true,"description":"Native venue action. Superior performs server-side credential injection, signing, nonce and timestamp generation, and transport selection. Do not include credentials, signatures, nonces, headers, method, path, or endpoint fields.","minProperties":1,"type":"object"},"venue":{"description":"Native venue identifier.","minLength":1,"type":"string"}},"required":["venue","action"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"account_address":"0x0000000000000000000000000000000000000001","action_type":"native","created_at":"2026-09-02T00:00:00Z","id":"exec_example","status":"succeeded","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"account_address":{"type":"string"},"action_type":{"description":"Native action type when supplied; native when the action has no type field.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":true,"type":"object"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"result":{"additionalProperties":true,"type":"object"},"status":{"enum":["processing","submitting","succeeded","failed","reconciliation_required"],"type":"string"},"venue":{"enum":["hyperliquid","polymarket"],"type":"string"}},"required":["id","status","venue","action_type","account_address","created_at"],"type":"object"}}},"description":"Native action completed or an identical completed request was replayed"},"202":{"content":{"application/json":{"example":{"account_address":"0x0000000000000000000000000000000000000001","action_type":"native","created_at":"2026-09-02T00:00:00Z","id":"exec_example","status":"succeeded","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"account_address":{"type":"string"},"action_type":{"description":"Native action type when supplied; native when the action has no type field.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":true,"type":"object"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"result":{"additionalProperties":true,"type":"object"},"status":{"enum":["processing","submitting","succeeded","failed","reconciliation_required"],"type":"string"},"venue":{"enum":["hyperliquid","polymarket"],"type":"string"}},"required":["id","status","venue","action_type","account_address","created_at"],"type":"object"}}},"description":"Native action was submitted and its durable venue outcome is being reconciled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid or unsupported native action"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The API key lacks trade permission or the selected managed account is not owned by the caller"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Idempotency conflict, in-progress execution, or account not ready"},"422":{"content":{"application/json":{"example":{"error":{"code":"exchange_rejected","details":{"exchange_error":{"response":"The native action was rejected by the venue.","status":"err"}},"docs_url":"https://docs.superior.trade/runtime/executions","message":"The venue rejected the execution"}},"schema":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"const":"exchange_rejected","type":"string"},"details":{"additionalProperties":false,"properties":{"exchange_error":{"additionalProperties":true,"description":"Sanitized response returned by the venue.","type":"object"}},"required":["exchange_error"],"type":["object","null"]},"docs_url":{"format":"uri","type":"string"},"message":{"type":"string"}},"required":["code","message","docs_url","details"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The venue rejected the native action"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The venue is unavailable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The one-time venue execution is unavailable or its venue result could not be persisted"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Run a one-time venue execution","x-error-codes":["validation_failed","native_action_invalid","server_owned_field","insufficient_permissions","account_not_owned","idempotency_key_conflict","account_not_ready","native_action_unsupported","exchange_rejected","execution_provider_unavailable","execution_store_unavailable"],"x-superior-docs":"https://docs.superior.trade/runtime/executions","x-superior-provider":"execution_store","x-superior-status":"implemented"}},"/runtime/executions/{id}":{"get":{"operationId":"getExecution","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"account_address":"0x0000000000000000000000000000000000000001","action_type":"native","created_at":"2026-09-02T00:00:00Z","id":"exec_example","status":"succeeded","venue":"hyperliquid"},"schema":{"additionalProperties":false,"properties":{"account_address":{"type":"string"},"action_type":{"description":"Native action type when supplied; native when the action has no type field.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":true,"type":"object"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"result":{"additionalProperties":true,"type":"object"},"status":{"enum":["processing","submitting","succeeded","failed","reconciliation_required"],"type":"string"},"venue":{"enum":["hyperliquid","polymarket"],"type":"string"}},"required":["id","status","venue","action_type","account_address","created_at"],"type":"object"}}},"description":"Owned one-time venue execution"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Execution not found"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Execution history unavailable (execution_store_unavailable)"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get a durable one-time venue execution","x-superior-docs":"https://docs.superior.trade/runtime/executions/{id}","x-superior-provider":"execution_store","x-superior-status":"implemented"}},"/runtime/frameworks":{"get":{"operationId":"listRuntimeFrameworks","responses":{"200":{"content":{"application/json":{"example":{"frameworks":[]},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"summary":"List supported runtime frameworks","x-superior-docs":"https://docs.superior.trade/runtime/frameworks","x-superior-status":"implemented"}},"/wallet":{"get":{"description":"Returns the managed wallet deposit instruction, held and allocated balances, and exactly the Hyperliquid, Polymarket, and Lighter venue summaries. Balance reads are all-or-nothing: an unavailable network or onboarded venue returns 502 rather than a partial total. No venue or operation read routes are exposed.","operationId":"getWallet","responses":{"200":{"content":{"application/json":{"example":{"address":"0x0000000000000000000000000000000000000001","balance":{"allocated":[{"balance_usd":141.2,"venue":"hyperliquid"},{"balance_usd":75,"venue":"polymarket"},{"balance_usd":45,"venue":"lighter"}],"held_usd":205.4,"networks":[{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","balance":180.4,"balance_usd":180.4,"network":"arbitrum"},{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","balance":25,"balance_usd":25,"network":"polygon"}],"total_usd":466.6},"deposit":{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","chain":"arbitrum","min_usd":50,"protocol_min_usd":5},"venues":{"hyperliquid":{"balance_usd":141.2,"checks":{"allowances":true,"credentials":true,"funded":true,"wallet_created":true},"deposit":{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","chain":"hyperliquid"},"latest_operation":null,"minimum_deposit_usd":50,"status":"ready"},"lighter":{"balance_usd":45,"checks":{"allowances":true,"credentials":true,"funded":true,"wallet_created":true},"deposit":{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","chain":"lighter"},"latest_operation":null,"minimum_deposit_usd":50,"status":"ready"},"polymarket":{"balance_usd":75,"checks":{"allowances":true,"credentials":true,"funded":true,"wallet_created":true},"deposit":{"address":"0x0000000000000000000000000000000000000002","asset":"pUSD","chain":"polygon"},"latest_operation":null,"minimum_deposit_usd":50,"status":"ready"}}},"schema":{"additionalProperties":false,"properties":{"address":{"type":"string"},"balance":{"$ref":"#/components/schemas/WalletBalance"},"deposit":{"$ref":"#/components/schemas/WalletDeposit"},"venues":{"additionalProperties":false,"properties":{"hyperliquid":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"},"lighter":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"},"polymarket":{"additionalProperties":false,"properties":{"balance_usd":{"minimum":0,"type":["number","null"]},"checks":{"additionalProperties":false,"properties":{"allowances":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"credentials":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"funded":{"enum":[true,false,"unknown"],"type":["boolean","string"]},"wallet_created":{"enum":[true,false,"unknown"],"type":["boolean","string"]}},"required":["wallet_created","funded","allowances","credentials"],"type":"object"},"deposit":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"latest_operation":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"id":{"type":"string"},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","step","updated_at","error"],"type":["object","null"]},"minimum_deposit_usd":{"const":50,"type":"number"},"status":{"enum":["not_configured","not_funded","configuring","ready","degraded","unknown"],"type":"string"}},"required":["status","minimum_deposit_usd","balance_usd","deposit","checks","latest_operation"],"type":"object"}},"required":["hyperliquid","polymarket","lighter"],"type":"object"}},"required":["address","deposit","balance","venues"],"type":"object"}}},"description":"Managed wallet summary and venue readiness"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"example":{"error":{"code":"wallet_upstream_unavailable","details":null,"docs_url":"https://docs.superior.trade/wallet/overview","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Live wallet data is temporarily unavailable"},"503":{"content":{"application/json":{"example":{"error":{"code":"wallet_upstream_unavailable","details":null,"docs_url":"https://docs.superior.trade/wallet/overview","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Live wallet data is temporarily unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Return managed wallet address, deposit details, balances, and venue readiness","x-superior-docs":"https://docs.superior.trade/wallet","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/deposits":{"get":{"operationId":"listDeposits","parameters":[{"description":"Maximum deposits to return.","in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Opaque cursor returned by the preceding page.","in":"query","name":"cursor","required":false,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deposits":[{"amount_usd":250,"asset":"USDC","chain":"arbitrum","confirmed_at":"2026-07-30T09:20:41Z","created_at":"2026-07-30T09:20:00Z","id":"depst_01j9ac...","status":"confirmed","tx_hash":"0xabc..."}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"deposits":{"items":{"additionalProperties":false,"properties":{"amount_usd":{"exclusiveMinimum":0,"type":"number"},"asset":{"const":"USDC","type":"string"},"chain":{"const":"arbitrum","type":"string"},"confirmed_at":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"additionalProperties":false,"properties":{"code":{"const":"deposit_failed","type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"id":{"type":"string"},"status":{"enum":["observed","confirmed","failed"],"type":"string"},"tx_hash":{"type":["string","null"]}},"required":["id","status","asset","chain","amount_usd","tx_hash","created_at"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["deposits","next_cursor"],"type":"object"}}},"description":"Account-scoped deposit history"},"400":{"content":{"application/json":{"example":{"error":{"code":"bad_request","details":null,"docs_url":"https://docs.superior.trade/wallet/deposits","message":"Invalid wallet history page"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid wallet history page"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"wallet_repository_unavailable","details":null,"docs_url":"https://docs.superior.trade/wallet/deposits","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Wallet data is temporarily unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List account-scoped wallet deposits","x-superior-docs":"https://docs.superior.trade/wallet/deposits","x-superior-provider":"wallet_repository","x-superior-status":"implemented"}},"/wallet/venues/{venue}/setup":{"post":{"description":"Any authenticated API key can initiate setup. The hard minimum is $50.00 for Hyperliquid, Polymarket, and Lighter. Poll GET /wallet while setup is active.","operationId":"setupVenueWallet","parameters":[{"in":"path","name":"venue","required":true,"schema":{"enum":["hyperliquid","polymarket","lighter"],"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount_usd":{"description":"Canonical decimal USDC amount with a hard minimum of $50.00.","pattern":"^(0|[1-9]\\d*)(\\.\\d{1,6})?$","type":"string"}},"required":["amount_usd"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"amount_usd":"50","created_at":"2026-09-02T00:00:00Z","destination":{"address":"0x0000000000000000000000000000000000000002","asset":"pUSD","chain":"polygon"},"error":null,"finished_at":"2026-09-02T00:00:01Z","id":"vop_example","source":{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","chain":"arbitrum"},"status":"completed","step":"ready","updated_at":"2026-09-02T00:00:01Z","venue":"polymarket"},"schema":{"additionalProperties":false,"properties":{"amount_usd":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"destination":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"source":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","reconciliation_required","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","polymarket","lighter"],"type":"string"}},"required":["id","venue","status","amount_usd","source","destination","step","created_at","updated_at","finished_at","error"],"type":"object"}}},"description":"Venue setup completed"},"202":{"content":{"application/json":{"example":{"amount_usd":"50","created_at":"2026-09-02T00:00:00Z","destination":{"address":"0x0000000000000000000000000000000000000002","asset":"pUSD","chain":"polygon"},"error":null,"finished_at":"2026-09-02T00:00:01Z","id":"vop_example","source":{"address":"0x0000000000000000000000000000000000000001","asset":"USDC","chain":"arbitrum"},"status":"completed","step":"ready","updated_at":"2026-09-02T00:00:01Z","venue":"polymarket"},"schema":{"additionalProperties":false,"properties":{"amount_usd":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"destination":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":["object","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"source":{"additionalProperties":false,"properties":{"address":{"pattern":"^0x[0-9a-fA-F]{40}$","type":"string"},"asset":{"type":"string"},"chain":{"type":"string"}},"required":["chain","asset","address"],"type":["object","null"]},"status":{"enum":["queued","preparing","transferring","confirming","configuring","completed","failed","reconciliation_required","cancelled"],"type":"string"},"step":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"venue":{"enum":["hyperliquid","polymarket","lighter"],"type":"string"}},"required":["id","venue","status","amount_usd","source","destination","step","created_at","updated_at","finished_at","error"],"type":"object"}}},"description":"Venue setup accepted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or minimum not met"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue not supported"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Idempotency, active setup, or balance conflict"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Venue setup unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Allocate managed held USDC to a venue","x-error-codes":["idempotency_key_required","minimum_deposit_not_met","idempotency_key_conflict","venue_setup_in_progress","insufficient_held_balance","venue_setup_unavailable"],"x-superior-docs":"https://docs.superior.trade/wallet/deposits","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/withdraw":{"post":{"description":"Rechecks the identical source-bound authorization used at preflight, then creates a durable withdrawal. Arbitrum debits held native USDC through a Privy-sponsored transaction on eip155:42161; sponsorship failure never falls back to an unsponsored send. Hyperliquid debits only perp withdrawable USDC. Balances are never combined and a source never falls back to another provider. An accepted or ambiguous action is never resubmitted. FEATURE_WITHDRAWAL_OTP=false retains the prior amount-only compatibility contract only during rollout.","operationId":"createWithdrawal","parameters":[{"description":"Reuse the same account-scoped UUID and intent for OTP issuance, preflight, final submission, replay, and recovery. Accepted uppercase, unhyphenated, braced, and urn:uuid: forms use lowercase hyphenated UUIDs for new enforced authorizations and submissions; signatures and recovery request_id use this canonical representation. Locked lookups check the exact supplied historical spelling plus canonical form, never enumerate other spellings, and fail with 409 idempotency_key_conflict for different claims or claim/fence collisions. Recovery returns an existing claim or fences both spellings when neither has a claim. When FEATURE_WITHDRAWAL_OTP=false, amount-only submission and replay accept any nonempty legacy idempotency key and preserve its trimmed spelling, including UUID aliases, unchanged.","in":"header","name":"Idempotency-Key","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"Read-only recovery lookup for an authorized withdrawal using the same body and Idempotency-Key. Returns the existing resource (202), withdrawal_replay_not_found (404) when absent, withdrawal_replay_requires_resume (409) for an existing processing claim, or idempotency_key_conflict (409) for changed bound intent. Never authorizes, creates, adopts a lease, or moves funds. On requires_resume, send the identical normal final request directly; on not_found only, run preflight and funds preparation before final submission.","in":"header","name":"Idempotency-Replay-Only","required":false,"schema":{"enum":["true"],"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"authorized_email":{"summary":"Email authorization with feature enabled","value":{"amount_usd":"100","asset_address":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","authorization":{"challenge_id":"00000000-0000-4000-8000-000000000001","code":"123456","type":"email_otp"},"chain":"arbitrum","destination_wallet":"0x2222222222222222222222222222222222222222","source":"arbitrum"}},"disabled_compatibility":{"summary":"Amount-only compatibility with FEATURE_WITHDRAWAL_OTP=false","value":{"amount_usd":100}},"replay_only":{"summary":"Read-only recovery: send this unchanged body with Idempotency-Replay-Only: true and the original Idempotency-Key","value":{"amount_usd":"100","asset_address":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","authorization":{"challenge_id":"00000000-0000-4000-8000-000000000001","code":"123456","type":"email_otp"},"chain":"arbitrum","destination_wallet":"0x2222222222222222222222222222222222222222","source":"arbitrum"}}},"schema":{"description":"The authorization.type discriminator must equal the server-selected policy. Wallet mode forbids destination_wallet; email destinations are request-scoped.","oneOf":[{"additionalProperties":false,"properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]},"asset_address":{"description":"Arbitrum native USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"authorization":{"additionalProperties":false,"properties":{"challenge_id":{"format":"uuid","type":"string"},"code":{"pattern":"^[0-9]{6}$","type":"string","writeOnly":true},"type":{"const":"email_otp","type":"string"}},"required":["type","challenge_id","code"],"type":"object"},"chain":{"enum":["arbitrum"],"type":"string"},"destination_wallet":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"source":{"description":"Explicit balance source. Arbitrum debits held native USDC with sponsored gas; Hyperliquid debits perp withdrawable USDC. Balances are never combined and sources never fall back.","enum":["arbitrum","hyperliquid"],"type":"string"}},"required":["source","amount_usd","chain","asset_address","authorization","destination_wallet"],"title":"email_otp withdrawal (OTP feature enabled)","type":"object","x-idempotency-key-schema":{"format":"uuid","type":"string"}},{"additionalProperties":false,"properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]},"asset_address":{"description":"Arbitrum native USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"authorization":{"additionalProperties":false,"properties":{"expires_at":{"description":"Sign with a five-minute expiry. Must be in the future and at most ten minutes ahead of server time.","format":"date-time","type":"string"},"nonce":{"format":"uuid","type":"string"},"signature":{"pattern":"^0x[a-fA-F0-9]{130}$","type":"string","writeOnly":true},"type":{"const":"wallet_signature","type":"string"}},"required":["type","signature","nonce","expires_at"],"type":"object"},"chain":{"enum":["arbitrum"],"type":"string"},"source":{"description":"Explicit balance source. Arbitrum debits held native USDC with sponsored gas; Hyperliquid debits perp withdrawable USDC. Balances are never combined and sources never fall back.","enum":["arbitrum","hyperliquid"],"type":"string"}},"required":["source","amount_usd","chain","asset_address","authorization"],"title":"wallet_signature withdrawal (OTP feature enabled)","type":"object","x-idempotency-key-schema":{"format":"uuid","type":"string"}},{"additionalProperties":false,"description":"Accepted only when FEATURE_WITHDRAWAL_OTP=false. Never used as a fallback for enabled-mode authorization failures.","properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]}},"required":["amount_usd"],"title":"Amount-only withdrawal (OTP feature disabled)","type":"object","x-idempotency-key-schema":{"minLength":1,"type":"string"}}]}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"amount_usd":25,"created_at":"2026-09-02T00:00:00Z","destination_wallet":"0x0000000000000000000000000000000000000001","id":"wd_example","source":"arbitrum","status":"processing"},"schema":{"properties":{"amount_usd":{"type":"number"},"created_at":{"format":"date-time","type":"string"},"destination_wallet":{"type":"string"},"id":{"type":"string"},"source":{"enum":["arbitrum","hyperliquid","polymarket","lighter"],"type":"string"},"status":{"enum":["queued","processing","broadcast","confirmed","failed","reconciliation_required"],"type":"string"}},"required":["id","source","status","amount_usd","destination_wallet","created_at"],"type":"object"}}},"description":"Withdrawal accepted"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Invalid intent, proof, or missing idempotency key"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication or wallet signature invalid or expired"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"No persisted replay (withdrawal_replay_not_found), or challenge unavailable"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Changed bound intent, or a processing claim requires normal final submission (withdrawal_replay_requires_resume)"},"410":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Email OTP expired"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"OTP attempts, resend cooldown, or send limit reached"},"502":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Wallet provider unavailable"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Withdrawal provider or Arbitrum sponsorship unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Create an authorized wallet withdrawal","x-error-codes":["idempotency_key_required","bad_request","withdrawal_identity_unavailable","withdrawal_email_unavailable","withdrawal_wallet_unavailable","withdrawal_authorization_mismatch","withdrawal_signature_invalid","withdrawal_signature_expired","invalid_code","challenge_not_available","idempotency_key_conflict","withdrawal_challenge_mismatch","code_expired","attempt_limit_reached","resend_cooldown","email_limit_reached","withdrawal_otp_unavailable","withdrawal_authorization_unavailable","withdrawal_state_conflict","wallet_repository_unavailable","wallet_upstream_unavailable","invalid_withdrawal_source","withdrawal_source_unavailable","insufficient_held_balance","withdrawal_sponsorship_unavailable","withdrawal_replay_not_found","withdrawal_replay_requires_resume","withdrawal_request_cancelled"],"x-superior-docs":"https://docs.superior.trade/wallet/withdraw","x-superior-provider":"wallet","x-superior-replay-only":{"equivalence":"canonical intent and non-secret authorization binding; proof bytes are not persisted or hashed","header":"Idempotency-Replay-Only","moves_funds":false,"processing_claim":"withdrawal_replay_requires_resume","status":"implemented","value":"true"},"x-superior-status":"implemented"}},"/wallet/withdraw/authorization":{"get":{"description":"Authenticated identity selects email OTP or login-wallet signature. No query parameters are accepted. Refresh the Superior API key identity binding if identity is unavailable.","operationId":"getWithdrawalAuthorization","responses":{"200":{"content":{"application/json":{"example":{"account_id":"acct_test","authorization_ttl_seconds":600,"destination_mode":"user_entered","masked_email":"t***r@example.com","mode":"email_otp"},"schema":{"discriminator":{"propertyName":"mode"},"oneOf":[{"additionalProperties":false,"properties":{"account_id":{"description":"Authenticated account ID; bind this value as accountId in wallet EIP-712 authorization.","minLength":1,"type":"string"},"authorization_ttl_seconds":{"const":600,"type":"integer"},"destination_mode":{"const":"user_entered","type":"string"},"masked_email":{"type":"string"},"mode":{"const":"email_otp","type":"string"}},"required":["account_id","mode","masked_email","destination_mode","authorization_ttl_seconds"],"type":"object"},{"additionalProperties":false,"properties":{"account_id":{"description":"Authenticated account ID; bind this value as accountId in wallet EIP-712 authorization.","minLength":1,"type":"string"},"authorization_ttl_seconds":{"const":300,"type":"integer"},"destination_mode":{"const":"locked","type":"string"},"destination_wallet":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"mode":{"const":"wallet_signature","type":"string"}},"required":["account_id","mode","destination_mode","destination_wallet","authorization_ttl_seconds"],"type":"object"}]}}},"description":"Withdrawal authorization policy"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Invalid intent, proof, or missing idempotency key"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication or wallet signature invalid or expired"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Challenge unavailable or feature disabled"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Identity, authorization, or idempotency conflict"},"410":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Email OTP expired"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"OTP attempts, resend cooldown, or send limit reached"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Withdrawal authorization unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get server-selected withdrawal authorization policy","x-error-codes":["idempotency_key_required","bad_request","withdrawal_identity_unavailable","withdrawal_email_unavailable","withdrawal_wallet_unavailable","withdrawal_authorization_mismatch","withdrawal_signature_invalid","withdrawal_signature_expired","invalid_code","challenge_not_available","idempotency_key_conflict","withdrawal_challenge_mismatch","code_expired","attempt_limit_reached","resend_cooldown","email_limit_reached","withdrawal_otp_unavailable","withdrawal_authorization_unavailable","withdrawal_state_conflict","wallet_repository_unavailable","wallet_upstream_unavailable"],"x-superior-docs":"https://docs.superior.trade/wallet/withdraw","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/withdraw/authorize":{"post":{"description":"Verifies the same intent and proof as final submission without calling the wallet service or moving funds. Reuse the identical payload and Idempotency-Key for final submission. Authorization must still be live when final submission first occurs. Wallet signatures are stateless until a final withdrawal is persisted.","operationId":"authorizeWithdrawal","parameters":[{"description":"Reuse the same account-scoped UUID and intent for OTP issuance, preflight, final submission, replay, and recovery. Accepted uppercase, unhyphenated, braced, and urn:uuid: forms use lowercase hyphenated UUIDs for new enforced authorizations and submissions; signatures and recovery request_id use this canonical representation. Locked lookups check the exact supplied historical spelling plus canonical form, never enumerate other spellings, and fail with 409 idempotency_key_conflict for different claims or claim/fence collisions. Recovery returns an existing claim or fences both spellings when neither has a claim.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The authorization.type discriminator must equal the server-selected policy. Wallet mode forbids destination_wallet; email destinations are request-scoped.","oneOf":[{"additionalProperties":false,"properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]},"asset_address":{"description":"Arbitrum native USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"authorization":{"additionalProperties":false,"properties":{"challenge_id":{"format":"uuid","type":"string"},"code":{"pattern":"^[0-9]{6}$","type":"string","writeOnly":true},"type":{"const":"email_otp","type":"string"}},"required":["type","challenge_id","code"],"type":"object"},"chain":{"enum":["arbitrum"],"type":"string"},"destination_wallet":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"source":{"description":"Explicit balance source. Arbitrum debits held native USDC with sponsored gas; Hyperliquid debits perp withdrawable USDC. Balances are never combined and sources never fall back.","enum":["arbitrum","hyperliquid"],"type":"string"}},"required":["source","amount_usd","chain","asset_address","authorization","destination_wallet"],"title":"email_otp withdrawal (OTP feature enabled)","type":"object","x-idempotency-key-schema":{"format":"uuid","type":"string"}},{"additionalProperties":false,"properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]},"asset_address":{"description":"Arbitrum native USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"authorization":{"additionalProperties":false,"properties":{"expires_at":{"description":"Sign with a five-minute expiry. Must be in the future and at most ten minutes ahead of server time.","format":"date-time","type":"string"},"nonce":{"format":"uuid","type":"string"},"signature":{"pattern":"^0x[a-fA-F0-9]{130}$","type":"string","writeOnly":true},"type":{"const":"wallet_signature","type":"string"}},"required":["type","signature","nonce","expires_at"],"type":"object"},"chain":{"enum":["arbitrum"],"type":"string"},"source":{"description":"Explicit balance source. Arbitrum debits held native USDC with sponsored gas; Hyperliquid debits perp withdrawable USDC. Balances are never combined and sources never fall back.","enum":["arbitrum","hyperliquid"],"type":"string"}},"required":["source","amount_usd","chain","asset_address","authorization"],"title":"wallet_signature withdrawal (OTP feature enabled)","type":"object","x-idempotency-key-schema":{"format":"uuid","type":"string"}}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"amount_usd":"100","authorization_id":"00000000-0000-4000-8000-000000000001:example-intent-digest","destination_wallet":"0x2222222222222222222222222222222222222222","expires_at":"2026-09-13T08:10:00Z","source":"arbitrum","status":"authorized"},"schema":{"additionalProperties":false,"properties":{"amount_usd":{"type":"string"},"authorization_id":{"type":"string"},"destination_wallet":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"expires_at":{"format":"date-time","type":"string"},"source":{"enum":["arbitrum","hyperliquid"],"type":"string"},"status":{"const":"authorized","type":"string"}},"required":["authorization_id","source","amount_usd","destination_wallet","expires_at","status"],"type":"object"}}},"description":"Withdrawal authorized"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Invalid intent, proof, or missing idempotency key"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication or wallet signature invalid or expired"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Challenge unavailable or feature disabled"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Identity, authorization, or idempotency conflict"},"410":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Email OTP expired"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"OTP attempts, resend cooldown, or send limit reached"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Withdrawal authorization unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Authorize a withdrawal before moving funds","x-error-codes":["idempotency_key_required","bad_request","withdrawal_identity_unavailable","withdrawal_email_unavailable","withdrawal_wallet_unavailable","withdrawal_authorization_mismatch","withdrawal_signature_invalid","withdrawal_signature_expired","invalid_code","challenge_not_available","idempotency_key_conflict","withdrawal_challenge_mismatch","code_expired","attempt_limit_reached","resend_cooldown","email_limit_reached","withdrawal_otp_unavailable","withdrawal_authorization_unavailable","withdrawal_state_conflict","wallet_repository_unavailable","wallet_upstream_unavailable"],"x-superior-docs":"https://docs.superior.trade/wallet/withdraw","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/withdraw/otp":{"post":{"description":"Email-login accounts only. The code binds account, explicit source, canonical amount, destination, chain, asset, and idempotency key. Server nonce and expiry are loaded by challenge_id at preflight/final. Codes expire after ten minutes, including after successful preflight. Resending after cooldown rotates the code.","operationId":"requestWithdrawalOTP","parameters":[{"description":"Reuse the same account-scoped UUID and intent for OTP issuance, preflight, final submission, replay, and recovery. Accepted uppercase, unhyphenated, braced, and urn:uuid: forms use lowercase hyphenated UUIDs for new enforced authorizations and submissions; signatures and recovery request_id use this canonical representation. Locked lookups check the exact supplied historical spelling plus canonical form, never enumerate other spellings, and fail with 409 idempotency_key_conflict for different claims or claim/fence collisions. Recovery returns an existing claim or fences both spellings when neither has a claim.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount_usd":{"description":"Positive USDC amount with at most six decimal places. Prefer decimal strings to preserve precision; the server returns canonical strings.","oneOf":[{"pattern":"^[0-9]+(\\.[0-9]{1,6})?$","type":"string"},{"exclusiveMinimum":0,"type":"number"}]},"asset_address":{"description":"Arbitrum native USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831.","pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"chain":{"enum":["arbitrum"],"type":"string"},"destination_wallet":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"},"source":{"description":"Explicit balance source. Arbitrum debits held native USDC with sponsored gas; Hyperliquid debits perp withdrawable USDC. Balances are never combined and sources never fall back.","enum":["arbitrum","hyperliquid"],"type":"string"}},"required":["source","amount_usd","destination_wallet","chain","asset_address"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"challenge_id":"00000000-0000-4000-8000-000000000001","expires_at":"2026-09-02T00:10:00Z","masked_email":"t***r@example.com","resend_available_at":"2026-09-02T00:01:00Z"},"schema":{"additionalProperties":false,"properties":{"challenge_id":{"format":"uuid","type":"string"},"expires_at":{"format":"date-time","type":"string"},"masked_email":{"type":"string"},"resend_available_at":{"format":"date-time","type":"string"}},"required":["challenge_id","masked_email","expires_at","resend_available_at"],"type":"object"}}},"description":"Withdrawal OTP sent"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Invalid intent, proof, or missing idempotency key"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication or wallet signature invalid or expired"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Challenge unavailable or feature disabled"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Identity, authorization, or idempotency conflict"},"410":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Email OTP expired"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"OTP attempts, resend cooldown, or send limit reached"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Withdrawal authorization unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Email a code bound to a withdrawal intent","x-error-codes":["idempotency_key_required","bad_request","withdrawal_identity_unavailable","withdrawal_email_unavailable","withdrawal_wallet_unavailable","withdrawal_authorization_mismatch","withdrawal_signature_invalid","withdrawal_signature_expired","invalid_code","challenge_not_available","idempotency_key_conflict","withdrawal_challenge_mismatch","code_expired","attempt_limit_reached","resend_cooldown","email_limit_reached","withdrawal_otp_unavailable","withdrawal_authorization_unavailable","withdrawal_state_conflict","wallet_repository_unavailable","wallet_upstream_unavailable","email_delivery_failed","withdrawal_otp_identity_invalid"],"x-superior-docs":"https://docs.superior.trade/wallet/withdrawals","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/withdraw/recover":{"post":{"description":"Requires the original UUID Idempotency-Key and no authorization proof. Atomically returns any existing withdrawal claim, or permanently fences an unused key before returning safe_to_reauthorize. Existing claims/provider work are never cancelled. After cancelled, obtain new authorization with a new key; all delayed use of the old key is rejected. A replay 404 alone is never safe to reauthorize. Recovery remains available when authorization issuance is paused.","operationId":"recoverWithdrawal","parameters":[{"description":"Reuse the same account-scoped UUID and intent for OTP issuance, preflight, final submission, replay, and recovery. Accepted uppercase, unhyphenated, braced, and urn:uuid: forms use lowercase hyphenated UUIDs for new enforced authorizations and submissions; signatures and recovery request_id use this canonical representation. Locked lookups check the exact supplied historical spelling plus canonical form, never enumerate other spellings, and fail with 409 idempotency_key_conflict for different claims or claim/fence collisions. Recovery returns an existing claim or fences both spellings when neither has a claim.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"additionalProperties":false,"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"example":{"request_id":"24fd8259-b9c6-4d6f-8340-ecb5ef924f6d","safe_to_reauthorize":true,"status":"cancelled"},"schema":{"oneOf":[{"additionalProperties":false,"properties":{"request_id":{"format":"uuid","type":"string"},"safe_to_reauthorize":{"const":true,"type":"boolean"},"status":{"const":"cancelled","type":"string"}},"required":["status","request_id","safe_to_reauthorize"],"type":"object"},{"additionalProperties":false,"properties":{"request_id":{"format":"uuid","type":"string"},"status":{"const":"existing","type":"string"},"withdrawal":{"properties":{"amount_usd":{"type":"number"},"created_at":{"format":"date-time","type":"string"},"destination_wallet":{"type":"string"},"id":{"type":"string"},"source":{"enum":["arbitrum","hyperliquid","polymarket","lighter"],"type":"string"},"status":{"enum":["queued","processing","broadcast","confirmed","failed","reconciliation_required"],"type":"string"}},"required":["id","source","status","amount_usd","destination_wallet","created_at"],"type":"object"}},"required":["status","request_id","withdrawal"],"type":"object"}]}}},"description":"Existing withdrawal or permanently cancelled unused key"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Invalid key or unexpected body/query fields"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Insufficient permission"},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Historical and canonical key identities conflict; retain original request"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Fence could not be established; retain original request"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Resolve or permanently fence an unresolved withdrawal request","x-error-codes":["idempotency_key_required","bad_request","idempotency_key_conflict","wallet_repository_unavailable"],"x-superior-docs":"https://docs.superior.trade/wallet/withdraw","x-superior-provider":"wallet_repository","x-superior-status":"implemented"}},"/wallet/withdraw/sources":{"get":{"description":"Returns the four stable withdrawal sources. Only entries with status available are executable; clients must not combine balances or infer support from wallet allocation data.","operationId":"listWithdrawalSources","responses":{"200":{"content":{"application/json":{"example":{"sources":[{"asset":"USDC","available_amount_usd":"180.4","destination_mode":"user_entered","fee_policy":"superior_sponsored_gas","minimum_amount_usd":"1","network":"eip155:42161","source":"arbitrum","status":"available"},{"asset":"USDC","available_amount_usd":"95.25","destination_mode":"user_entered","fee_policy":"hyperliquid_withdrawal_fee","minimum_amount_usd":"1","network":"hyperliquid","source":"hyperliquid","status":"available"},{"asset":"USDC","available_amount_usd":null,"destination_mode":"user_entered","fee_policy":"unavailable","minimum_amount_usd":"1","network":"polygon","source":"polymarket","status":"coming_soon"},{"asset":"USDC","available_amount_usd":null,"destination_mode":"user_entered","fee_policy":"unavailable","minimum_amount_usd":"1","network":"lighter","source":"lighter","status":"coming_soon"}]},"schema":{"additionalProperties":false,"properties":{"sources":{"items":{"additionalProperties":false,"properties":{"asset":{"const":"USDC","type":"string"},"available_amount_usd":{"pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","type":["string","null"]},"destination_mode":{"enum":["user_entered","locked"],"type":"string"},"fee_policy":{"type":"string"},"minimum_amount_usd":{"pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","type":"string"},"network":{"type":"string"},"source":{"enum":["arbitrum","hyperliquid","polymarket","lighter"],"type":"string"},"status":{"enum":["available","coming_soon","temporarily_unavailable"],"type":"string"}},"required":["source","status","asset","network","available_amount_usd","minimum_amount_usd","destination_mode","fee_policy"],"type":"object"},"maxItems":4,"minItems":4,"type":"array"}},"required":["sources"],"type":"object"}}},"description":"Withdrawal source catalog"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Insufficient permission"},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Rate limit exceeded"},"502":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Wallet identity unavailable"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Withdrawal catalog unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List explicit wallet withdrawal sources","x-error-codes":["wallet_upstream_unavailable"],"x-superior-docs":"https://docs.superior.trade/wallet/withdraw/sources","x-superior-provider":"wallet","x-superior-status":"implemented"}},"/wallet/withdrawals":{"get":{"operationId":"listWithdrawals","responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"withdrawals":[]},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"List wallet withdrawals","x-superior-docs":"https://docs.superior.trade/wallet/withdrawals","x-superior-provider":"wallet_repository","x-superior-status":"implemented"}},"/wallet/withdrawals/{id}":{"get":{"operationId":"getWithdrawal","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"amount":"25.00","asset":"USDC","id":"wd_example","status":"confirmed"},"schema":{"additionalProperties":true,"type":"object"}}},"description":"Successful response"},"401":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Authentication is required"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authentication is required"},"429":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Rate limit exceeded"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"503":{"content":{"application/json":{"example":{"error":{"code":"service_unavailable","details":null,"docs_url":"https://docs.superior.trade/reference/errors","message":"Internal server error"}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Required service unavailable"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"summary":"Get a wallet withdrawal","x-superior-docs":"https://docs.superior.trade/wallet/withdrawals/{id}","x-superior-provider":"wallet_repository","x-superior-status":"implemented"}}},"servers":[{"url":"https://unified-api-zag4gzx6gq-an.a.run.app"}]}
