{"openapi":"3.1.0","info":{"title":"Orderly One API","version":"1.0.0","description":"Orderly One DEX Creator API - Create and manage decentralized exchanges\n\n**Agent quickstart — full graduation without a browser:**\n\n1. Create an EVM wallet, then authenticate: `POST /api/auth/nonce` → sign the returned message with the wallet → `POST /api/auth/verify` with the returned `challenge` → keep the Bearer token.\n2. Create your DEX: `POST /api/dex` (multipart form; `integrationType: \"custom\"` is enough — no hosted frontend needed).\n3. Pay the one-time fee **and** create your broker in a single x402 request: `POST /api/graduation/graduate?brokerId=...&makerFee=...&takerFee=...&rwaMakerFee=...&rwaTakerFee=...` with your Bearer token — see that endpoint for the payment protocol (402 → sign EIP-3009 → retry with `payment-signature`).\n4. Finish graduation by registering your wallet as the broker admin: follow the recipe in `POST /api/graduation/finalize-admin-wallet`.\n5. Confirm with `GET /api/graduation/graduation-status` — done when `isGraduated: true`."},"servers":[{"url":"https://dex-api.orderly.network","description":"API Server"}],"tags":[{"name":"Authentication","description":"Authentication endpoints"},{"name":"DEX","description":"DEX management endpoints"},{"name":"Admin","description":"Administrative status checks"},{"name":"Theme","description":"Theme customization endpoints"},{"name":"Graduation","description":"DEX graduation endpoints"},{"name":"Leaderboard","description":"Trading leaderboards"},{"name":"Stats","description":"Platform statistics"},{"name":"Blogposts","description":"Builder blogpost management"},{"name":"Blogpost Assets","description":"Private builder blogpost media"},{"name":"Blogposts - Public","description":"Published blogposts"}],"components":{"schemas":{"DexNotFoundResponse":{"type":"object","properties":{"exists":{"type":"boolean","enum":[false],"description":"Indicates no DEX exists for this user"}},"required":["exists"]},"DexResponse":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"userId":{"type":"string","description":"User ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name of the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo asset URL"},"secondaryLogo":{"type":"string","nullable":true,"description":"Secondary logo asset URL"},"favicon":{"type":"string","nullable":true,"description":"Favicon URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated from demo"},"integrationType":{"type":"string","description":"Integration type: 'low_code' for hosted DEX, 'custom' for custom SDK/API integration"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","userId","brokerId","brokerName","repoUrl","customDomain","description","banner","logo","primaryLogo","secondaryLogo","favicon","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl","isGraduated","integrationType","showOnBoard","createdAt","updatedAt"]},"BrokerNameUpdateSuccess":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"dex":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"userId":{"type":"string","description":"User ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name of the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo asset URL"},"secondaryLogo":{"type":"string","nullable":true,"description":"Secondary logo asset URL"},"favicon":{"type":"string","nullable":true,"description":"Favicon URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated from demo"},"integrationType":{"type":"string","description":"Integration type: 'low_code' for hosted DEX, 'custom' for custom SDK/API integration"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","userId","brokerId","brokerName","repoUrl","customDomain","description","banner","logo","primaryLogo","secondaryLogo","favicon","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl","isGraduated","integrationType","showOnBoard","createdAt","updatedAt"]}},"required":["message","dex"]},"NotFoundError":{"type":"object","properties":{"message":{"type":"string","description":"Not found error message"}},"required":["message"]},"BrokerNameUpdate":{"type":"object","properties":{"brokerName":{"type":"string","minLength":3,"maxLength":30,"pattern":"^[a-zA-Z0-9 .\\-_]*$"}},"required":["brokerName"]},"UnauthorizedError":{"type":"object","properties":{"message":{"type":"string","description":"Unauthorized error message"}},"required":["message"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string","description":"Conflict error message"}},"required":["error"]},"SocialCardUpdate":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"dex":{"type":"object","properties":{"id":{"type":"string"},"brokerName":{"type":"string","minLength":3,"maxLength":30,"pattern":"^[a-zA-Z0-9 .\\-_]*$"},"description":{"type":"string","nullable":true},"banner":{"type":"string","nullable":true},"logo":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"tokenChain":{"type":"string","nullable":true},"telegramLink":{"type":"string","nullable":true},"discordLink":{"type":"string","nullable":true},"xLink":{"type":"string","nullable":true},"websiteUrl":{"type":"string","nullable":true}},"required":["id","brokerName","description","banner","logo","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl"]}},"required":["message","dex"]},"DeleteSuccess":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"dex":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"userId":{"type":"string","description":"User ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name of the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo asset URL"},"secondaryLogo":{"type":"string","nullable":true,"description":"Secondary logo asset URL"},"favicon":{"type":"string","nullable":true,"description":"Favicon URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated from demo"},"integrationType":{"type":"string","description":"Integration type: 'low_code' for hosted DEX, 'custom' for custom SDK/API integration"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","userId","brokerId","brokerName","repoUrl","customDomain","description","banner","logo","primaryLogo","secondaryLogo","favicon","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl","isGraduated","integrationType","showOnBoard","createdAt","updatedAt"]}},"required":["message","dex"]},"UpgradeSuccess":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"success":{"type":"boolean"}},"required":["message","success"]},"CustomDomainSuccess":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"dex":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"userId":{"type":"string","description":"User ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name of the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo asset URL"},"secondaryLogo":{"type":"string","nullable":true,"description":"Secondary logo asset URL"},"favicon":{"type":"string","nullable":true,"description":"Favicon URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated from demo"},"integrationType":{"type":"string","description":"Integration type: 'low_code' for hosted DEX, 'custom' for custom SDK/API integration"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","userId","brokerId","brokerName","repoUrl","customDomain","description","banner","logo","primaryLogo","secondaryLogo","favicon","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl","isGraduated","integrationType","showOnBoard","createdAt","updatedAt"]}},"required":["message","dex"]},"RetryableErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error category"},"message":{"type":"string","description":"Retryable error details"},"retryAfter":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Seconds until the request should be retried"}},"required":["error","message","retryAfter"],"description":"Retryable error response"},"SwapFeeSuccess":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"dex":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"userId":{"type":"string","description":"User ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name of the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo asset URL"},"secondaryLogo":{"type":"string","nullable":true,"description":"Secondary logo asset URL"},"favicon":{"type":"string","nullable":true,"description":"Favicon URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated from demo"},"integrationType":{"type":"string","description":"Integration type: 'low_code' for hosted DEX, 'custom' for custom SDK/API integration"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","userId","brokerId","brokerName","repoUrl","customDomain","description","banner","logo","primaryLogo","secondaryLogo","favicon","tokenAddress","tokenChain","telegramLink","discordLink","xLink","websiteUrl","isGraduated","integrationType","showOnBoard","createdAt","updatedAt"]}},"required":["message","dex"]},"NonceResponse":{"type":"object","properties":{"message":{"type":"string","description":"Message to sign"},"nonce":{"type":"string","description":"Authentication nonce"},"challenge":{"type":"string","description":"Server-signed authentication challenge"},"expiresAt":{"type":"string","format":"date-time","description":"Challenge expiration time"}},"required":["message","nonce","challenge","expiresAt"]},"AuthErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"AuthRequest":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum wallet address"}},"required":["address"]},"AuthSuccessResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"address":{"type":"string","description":"Ethereum address"}},"required":["id","address"]},"token":{"type":"string","description":"JWT authentication token"}},"required":["user","token"]},"AuthVerify":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum wallet address"},"signature":{"type":"string","description":"Signature of the authentication message"},"challenge":{"type":"string","minLength":1,"maxLength":4096,"description":"Server-signed authentication challenge"}},"required":["address","signature","challenge"]},"TokenValidationResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the token is valid"},"user":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"}},"required":["id","address"]},"error":{"type":"string","description":"Error message if validation failed"}},"required":["valid"]},"TokenValidation":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum wallet address"},"token":{"type":"string","description":"Authentication token"}},"required":["address","token"]},"CliTokenResponse":{"type":"object","properties":{"accessToken":{"type":"string","description":"Opaque bearer access token"},"refreshToken":{"type":"string","description":"Rotating refresh token (single use)"},"expiresIn":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Access token lifetime in seconds"}},"required":["accessToken","refreshToken","expiresIn"]},"CliTokenRequest":{"type":"object","properties":{"refreshToken":{"type":"string","description":"CLI refresh token to rotate"}},"required":["refreshToken"]},"CliRevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean","description":"Whether a CLI session was found and revoked"}},"required":["revoked"]},"CliRevokeAllResponse":{"type":"object","properties":{"revokedCount":{"type":"integer","minimum":0,"description":"Number of revoked sessions"}},"required":["revokedCount"]},"AdminCheckResponse":{"type":"object","properties":{"isAdmin":{"type":"boolean","description":"Whether the current user is an admin"},"roles":{"type":"array","items":{"type":"string","enum":["MARKETING"]},"default":[],"description":"Scoped Orderly One roles assigned to the current user"}},"required":["isAdmin"]},"ThemeModifyResponse":{"type":"object","properties":{"themes":{"type":"array","items":{"type":"string"},"description":"Array of 3 generated token-only CSS theme variants"}},"required":["themes"]},"ThemeErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"message":{"type":"string","description":"Additional error details"},"retryAfter":{"type":"number","description":"Seconds until retry is allowed"}}},"VerifyTxSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"Verification successful"},"message":{"type":"string","description":"Success message"},"amount":{"type":"string","description":"Amount paid in graduation fee"},"brokerCreationData":{"type":"object","properties":{"brokerId":{"type":"string","description":"Created broker ID"},"transactionHashes":{"type":"object","additionalProperties":{"type":"string"},"description":"Transaction hashes from broker creation"}},"required":["brokerId"]}},"required":["success","message","brokerCreationData"]},"GraduationErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]},"GraduationRefundResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Refund successful"},"message":{"type":"string","description":"Result message"},"refundTxHash":{"type":"string","description":"On-chain refund transaction hash"},"amount":{"type":"string","description":"Refunded amount in USDC"}},"required":["success","message"]},"GraduationRefund":{"type":"object","properties":{"txHash":{"type":"string","minLength":10,"maxLength":100,"description":"x402 settlement transaction hash (from the PAYMENT-RESPONSE header of POST /api/graduation/graduate)"},"chain":{"type":"string","minLength":1,"maxLength":50,"description":"Blockchain chain name of the settlement (e.g. base, base-sepolia)"}},"required":["txHash","chain"]},"GraduationStatus":{"type":"object","properties":{"success":{"type":"boolean"},"currentBrokerId":{"type":"string","description":"Current broker ID"},"approved":{"type":"boolean","description":"Whether graduation is approved"}},"required":["success","currentBrokerId","approved"]},"RebindPermissionlessVaultResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Rebind successful"},"message":{"type":"string","description":"Success message"},"brokerId":{"type":"string","description":"Broker ID rebound to the permissionless vault"},"txHash":{"type":"string","description":"Permissionless vault transaction hash"}},"required":["success","message","brokerId"]},"DexFees":{"type":"object","properties":{"success":{"type":"boolean"},"makerFee":{"type":"number","description":"Maker fee in basis points"},"takerFee":{"type":"number","description":"Taker fee in basis points"},"rwaMakerFee":{"type":"number","description":"RWA maker fee in basis points"},"rwaTakerFee":{"type":"number","description":"RWA taker fee in basis points"}},"required":["success","makerFee","takerFee","rwaMakerFee","rwaTakerFee"]},"BrokerTier":{"type":"object","properties":{"tier":{"type":"string","description":"Broker tier level"},"stakingVolume":{"type":"string","description":"Staking volume"},"tradingVolume":{"type":"string","description":"Trading volume"},"makerFeeRate":{"type":"string","description":"Maker fee rate in decimal"},"takerFeeRate":{"type":"string","description":"Taker fee rate in decimal"},"rwaMakerFeeRate":{"type":"string","description":"RWA maker fee rate in decimal"},"rwaTakerFeeRate":{"type":"string","description":"RWA taker fee rate in decimal"},"logDate":{"type":"string","description":"Log date"}},"required":["tier","stakingVolume","tradingVolume","makerFeeRate","takerFeeRate","rwaMakerFeeRate","rwaTakerFeeRate","logDate"]},"FinalizeAdminWalletResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","description":"Success message"},"isGraduated":{"type":"boolean"}},"required":["success","message","isGraduated"]},"GraduationStatusExtended":{"type":"object","properties":{"success":{"type":"boolean"},"isGraduated":{"type":"boolean","description":"Whether DEX has completed graduation"},"brokerId":{"type":"string","description":"Current broker ID"},"isMultisig":{"type":"boolean","description":"Whether using multisig admin"},"multisigAddress":{"type":"string","nullable":true,"description":"Multisig address if applicable"},"multisigChainId":{"type":"number","nullable":true,"description":"Multisig chain ID"}},"required":["success","isGraduated","brokerId","isMultisig","multisigAddress","multisigChainId"]},"FeeOptions":{"type":"object","properties":{"usdc":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Token amount required"},"currency":{"type":"string"},"stable":{"type":"boolean"}},"required":["amount","currency","stable"]},"order":{"type":"object","nullable":true,"properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Token amount required"},"currency":{"type":"string"},"stable":{"type":"boolean"},"currentPrice":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Current ORDER token price in USD"},"quote":{"type":"string","minLength":1,"maxLength":4096},"quoteExpiresAt":{"type":"string","format":"date-time"}},"required":["amount","currency","stable","currentPrice","quote","quoteExpiresAt"]},"usdt":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Token amount required"},"currency":{"type":"string"},"stable":{"type":"boolean"}},"required":["amount","currency","stable"]},"receiverAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Address to send graduation payment"},"payerAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Authenticated wallet address that must send the graduation payment"}},"required":["usdc","order","usdt","receiverAddress","payerAddress"]},"LeaderboardResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"isAnonymous":{"type":"boolean","description":"Whether DEX identity is masked"},"id":{"type":"string","description":"DEX ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"DEX display name"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo URL"},"dexUrl":{"type":"string","nullable":true,"description":"DEX website URL"},"totalVolume":{"type":"number","description":"Total trading volume"},"totalPnl":{"type":"number","description":"Total profit/loss"},"totalBrokerFee":{"type":"number","description":"Sum of daily revenue history total_revenue for the period"},"totalFee":{"type":"number","description":"Total fees"},"lastUpdated":{"type":"string","format":"date-time","description":"Last statistics update"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"tokenSymbol":{"type":"string","description":"Token symbol"},"tokenName":{"type":"string","description":"Token name"},"tokenPrice":{"type":"number","description":"Token price in USD"},"tokenMarketCap":{"type":"number","description":"Token market cap"},"tokenImageUrl":{"type":"string","description":"Token image URL"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"}},"required":["isAnonymous","totalVolume","totalPnl","totalBrokerFee","totalFee","lastUpdated"]}},"meta":{"type":"object","properties":{"sortBy":{"type":"string","description":"Current sort field"},"period":{"type":"string","description":"Current time period"},"limit":{"type":"integer","description":"Results per page"},"offset":{"type":"integer","description":"Current offset"},"total":{"type":"integer","description":"Total number of DEXes"}},"required":["sortBy","period","limit","offset","total"]}},"required":["data","meta"]},"LeaderboardErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},"BrokerStatsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"dex":{"type":"object","properties":{"isAnonymous":{"type":"boolean","description":"Whether DEX identity is masked"},"id":{"type":"string","description":"DEX ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"DEX name"},"primaryLogo":{"type":"string","nullable":true,"description":"Primary logo URL"},"dexUrl":{"type":"string","nullable":true,"description":"DEX website URL"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token contract address"},"tokenChain":{"type":"string","nullable":true,"description":"Token blockchain network"},"tokenSymbol":{"type":"string","description":"Token symbol"},"tokenName":{"type":"string","description":"Token name"},"tokenPrice":{"type":"number","description":"Token price in USD"},"tokenMarketCap":{"type":"number","description":"Token market cap"},"tokenImageUrl":{"type":"string","description":"Token image URL"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram group link"},"discordLink":{"type":"string","nullable":true,"description":"Discord invite link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) profile link"},"websiteUrl":{"type":"string","nullable":true,"description":"Official website URL"}},"required":["isAnonymous"]},"aggregated":{"type":"object","properties":{"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"DEX name"},"totalVolume":{"type":"number","description":"Total trading volume"},"totalPnl":{"type":"number","description":"Total profit/loss"},"totalBrokerFee":{"type":"number","description":"Sum of daily revenue history total_revenue for the period"},"totalFee":{"type":"number","description":"Total fees"},"lastUpdated":{"type":"string","format":"date-time","description":"Last statistics update"},"tokenAddress":{"type":"string","description":"Token contract address"},"tokenChain":{"type":"string","description":"Token blockchain network"},"tokenSymbol":{"type":"string","description":"Token symbol"},"tokenName":{"type":"string","description":"Token name"},"tokenPrice":{"type":"number","description":"Token price in USD"},"tokenMarketCap":{"type":"number","description":"Token market cap"},"tokenImageUrl":{"type":"string","description":"Token image URL"}},"required":["totalVolume","totalPnl","totalBrokerFee","totalFee","lastUpdated"]},"daily":{"type":"array","items":{"type":"object","properties":{"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"DEX name"},"date":{"type":"string","description":"Revenue date in UTC"},"perp_volume":{"type":"number","description":"Perpetual trading volume"},"perp_taker_volume":{"type":"number","description":"Taker volume"},"perp_maker_volume":{"type":"number","description":"Maker volume"},"realized_pnl":{"type":"number","description":"Realized profit/loss"},"broker_fee":{"type":"number","description":"Daily revenue history total_revenue"},"total_fee":{"type":"number","description":"Total fees"}},"required":["date","perp_volume","perp_taker_volume","perp_maker_volume","realized_pnl","broker_fee","total_fee"]}}},"required":["dex","aggregated","daily"]}},"required":["data"]},"DexStats":{"type":"object","properties":{"total":{"type":"object","properties":{"allTime":{"type":"integer","description":"Total DEXes created all time"},"new":{"type":"integer","description":"New DEXes created in the period"}},"required":["allTime","new"]},"graduated":{"type":"object","properties":{"allTime":{"type":"integer","description":"Total graduated DEXes all time"},"new":{"type":"integer","description":"New graduated DEXes in the period"}},"required":["allTime","new"]},"demo":{"type":"object","properties":{"allTime":{"type":"integer","description":"Total demo DEXes all time"},"new":{"type":"integer","description":"New demo DEXes in the period"}},"required":["allTime","new"]},"period":{"type":"string","description":"Time period for these statistics"}},"required":["total","graduated","demo","period"]},"StatsErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},"SwapFeeConfig":{"type":"object","additionalProperties":{"type":"object","properties":{"fee_rate":{"type":"number","description":"Swap fee rate in basis points"}},"required":["fee_rate"]}},"BoostedDistributorSuccess":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]},"BoostedDistributorError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"BoostedDistributorApplication":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":255,"format":"email"},"telegram":{"type":"string","pattern":"^@?[a-zA-Z0-9_]{4,32}$"},"source":{"type":"string","maxLength":80,"pattern":"^[a-zA-Z0-9_-]+$","default":"bd_funnel_v1"},"submitted_at":{"type":"string","format":"date-time"},"reason":{"type":"string","minLength":1,"maxLength":3000},"location":{"type":"string","enum":["North America","Latin America","Europe","UK","Middle East & North Africa","Sub-Saharan Africa","South Asia (India / Pakistan / Bangladesh)","Southeast Asia","East Asia (China / Korea / Japan)","Oceania","Other"]},"channels":{"type":"array","items":{"type":"string","enum":["x","telegram","youtube","discord","tiktok","newsletter","podcast","irl"]},"minItems":1,"maxItems":8},"links":{"type":"string","minLength":0,"maxLength":3000,"default":""},"idempotencyKey":{"type":"string","format":"uuid"},"turnstileToken":{"type":"string","minLength":1,"maxLength":4096}},"required":["name","email","telegram","reason","location","channels","idempotencyKey"]},"BuilderBlogPostListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"publisher":{"type":"string","enum":["BUILDER","ORDERLY"]},"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"title":{"type":"string"},"summary":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","UNPUBLISHED"]},"staffUnpublish":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","minLength":1,"maxLength":1000},"at":{"type":"string","format":"date-time"}},"required":["reason","at"]},"version":{"type":"integer","minimum":0},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","publisher","category","slug","title","summary","status","staffUnpublish","version","publishedAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true},"meta":{"type":"object","properties":{"activeCount":{"type":"integer","minimum":0},"slugPrefix":{"type":"string","nullable":true},"maxActivePosts":{"type":"number","enum":[100]},"remainingPosts":{"type":"integer","minimum":0}},"required":["activeCount","slugPrefix","maxActivePosts","remainingPosts"]}},"required":["data","nextCursor","meta"]},"BlogPostErrorResponse":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["BLOGPOST_REFERENCE_CONFLICT","BLOGPOST_CONSTRAINT_FAILED","BLOGPOST_SCHEMA_UNAVAILABLE","BLOGPOST_TRANSACTION_UNAVAILABLE","BLOGPOST_DATABASE_READ_ONLY"]}},"required":["error"]},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"nullable":true}}},"required":["issues"]}},"required":["success","error"]}]},"BlogPostAuthenticatedRateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["BLOGPOST_RATE_LIMITED"]},"retryAfter":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["error","code","retryAfter"]},"BuilderBlogPostResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"title":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"summary":{"type":"string","maxLength":80},"markdown":{"type":"string"},"keywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":10},"coverAssetId":{"type":"string","nullable":true,"format":"uuid"},"coverLogoAssetId":{"type":"string","nullable":true,"format":"uuid"},"startsAt":{"type":"string","nullable":true,"format":"date-time"},"endsAt":{"type":"string","nullable":true,"format":"date-time"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"},"id":{"type":"string","format":"uuid"},"publisher":{"type":"string","enum":["BUILDER","ORDERLY"]},"slugPrefix":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","UNPUBLISHED"]},"version":{"type":"integer","minimum":0},"owner":{"type":"object","properties":{"brokerId":{"type":"string"},"name":{"type":"string"}},"required":["brokerId","name"]},"firstPublishedAt":{"type":"string","nullable":true,"format":"date-time"},"lastPublishedAt":{"type":"string","nullable":true,"format":"date-time"},"unpublishedAt":{"type":"string","nullable":true,"format":"date-time"},"deletedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"staffUnpublish":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","minLength":1,"maxLength":1000},"at":{"type":"string","format":"date-time"}},"required":["reason","at"]},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"postId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PRIVATE","PUBLIC","DELETED"]},"originalFilename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":5242880},"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"checksumSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"publicUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","postId","status","originalFilename","mimeType","sizeBytes","width","height","checksumSha256","publicUrl","createdAt"]}}},"required":["category","title","slug","summary","markdown","keywords","coverAssetId","coverLogoAssetId","startsAt","endsAt","ctaUrl","id","publisher","slugPrefix","status","version","owner","firstPublishedAt","lastPublishedAt","unpublishedAt","deletedAt","createdAt","updatedAt","staffUnpublish","assets"]}},"required":["data"]},"BlogPostCreateRequest":{"type":"object","properties":{"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"title":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"summary":{"type":"string","maxLength":80,"default":""},"markdown":{"type":"string","default":""},"markdownBase64":{"type":"string","maxLength":136536},"keywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":10,"default":[]},"coverAssetId":{"type":"string","nullable":true,"format":"uuid","default":null},"coverLogoAssetId":{"type":"string","nullable":true,"format":"uuid","default":null},"startsAt":{"type":"string","nullable":true,"format":"date-time","default":null},"endsAt":{"type":"string","nullable":true,"format":"date-time","default":null},"ctaLabel":{"type":"string","nullable":true,"minLength":1,"maxLength":40,"description":"Deprecated and ignored; CTA text is presentation-owned"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","default":null}},"required":["category","title","slug"],"additionalProperties":false},"BlogPostPatchRequest":{"type":"object","properties":{"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"title":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"slugSuffix":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"summary":{"type":"string","maxLength":80},"markdown":{"type":"string"},"keywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":10},"coverAssetId":{"type":"string","nullable":true,"format":"uuid"},"coverLogoAssetId":{"type":"string","nullable":true,"format":"uuid"},"startsAt":{"type":"string","nullable":true,"format":"date-time"},"endsAt":{"type":"string","nullable":true,"format":"date-time"},"ctaLabel":{"type":"string","nullable":true,"minLength":1,"maxLength":40,"description":"Deprecated and ignored; CTA text is presentation-owned"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"},"markdownBase64":{"type":"string","maxLength":136536}},"additionalProperties":false},"BlogPostPreviewResponse":{"type":"object","properties":{"html":{"type":"string"},"coverUrl":{"type":"string","nullable":true,"format":"uri"},"coverLogoUrl":{"type":"string","nullable":true,"format":"uri"},"version":{"type":"integer","minimum":0}},"required":["html","coverUrl","coverLogoUrl","version"]},"BlogPostPreviewRequest":{"type":"object","properties":{"markdown":{"type":"string"},"markdownBase64":{"type":"string","maxLength":136536},"coverAssetId":{"type":"string","nullable":true,"format":"uuid"},"coverLogoAssetId":{"type":"string","nullable":true,"format":"uuid","default":null}},"required":["markdown","coverAssetId"],"additionalProperties":false},"BlogPostAssetListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"postId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PRIVATE","PUBLIC","DELETED"]},"originalFilename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":5242880},"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"checksumSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"publicUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","postId","status","originalFilename","mimeType","sizeBytes","width","height","checksumSha256","publicUrl","createdAt"]}}},"required":["data"]},"BlogPostAssetResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"postId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PRIVATE","PUBLIC","DELETED"]},"originalFilename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":5242880},"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"checksumSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"publicUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","postId","status","originalFilename","mimeType","sizeBytes","width","height","checksumSha256","publicUrl","createdAt"]}},"required":["data"]},"BlogPostAssetUpload":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]},"BlogPostPublicFeaturedResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"publisher":{"type":"string","enum":["BUILDER","ORDERLY"]},"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"title":{"type":"string"},"summary":{"type":"string"},"coverUrl":{"type":"string","nullable":true,"format":"uri"},"coverLogoUrl":{"type":"string","nullable":true,"format":"uri"},"keywords":{"type":"array","items":{"type":"string"}},"startsAt":{"type":"string","nullable":true,"format":"date-time"},"endsAt":{"type":"string","nullable":true,"format":"date-time"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"},"author":{"type":"object","properties":{"brokerId":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string","nullable":true}},"required":["brokerId","name","logo"]},"publishedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","publisher","category","slug","title","summary","coverUrl","coverLogoUrl","keywords","startsAt","endsAt","ctaUrl","author","publishedAt","updatedAt"]},"maxItems":3}},"required":["data"]},"BlogPostRateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["BLOGPOST_PUBLIC_RATE_LIMITED"]},"retryAfter":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["error","code","retryAfter"]},"BlogPostPublicListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"publisher":{"type":"string","enum":["BUILDER","ORDERLY"]},"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"title":{"type":"string"},"summary":{"type":"string"},"coverUrl":{"type":"string","nullable":true,"format":"uri"},"coverLogoUrl":{"type":"string","nullable":true,"format":"uri"},"keywords":{"type":"array","items":{"type":"string"}},"startsAt":{"type":"string","nullable":true,"format":"date-time"},"endsAt":{"type":"string","nullable":true,"format":"date-time"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"},"author":{"type":"object","properties":{"brokerId":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string","nullable":true}},"required":["brokerId","name","logo"]},"publishedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","publisher","category","slug","title","summary","coverUrl","coverLogoUrl","keywords","startsAt","endsAt","ctaUrl","author","publishedAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]},"BlogPostPublicDetailResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"publisher":{"type":"string","enum":["BUILDER","ORDERLY"]},"category":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"slug":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"title":{"type":"string"},"summary":{"type":"string"},"coverUrl":{"type":"string","nullable":true,"format":"uri"},"coverLogoUrl":{"type":"string","nullable":true,"format":"uri"},"keywords":{"type":"array","items":{"type":"string"}},"startsAt":{"type":"string","nullable":true,"format":"date-time"},"endsAt":{"type":"string","nullable":true,"format":"date-time"},"ctaUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri"},"author":{"type":"object","properties":{"brokerId":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string","nullable":true}},"required":["brokerId","name","logo"]},"publishedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"html":{"type":"string"}},"required":["id","publisher","category","slug","title","summary","coverUrl","coverLogoUrl","keywords","startsAt","endsAt","ctaUrl","author","publishedAt","updatedAt","html"]}},"required":["data"]}},"parameters":{},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/auth/verify"}}},"paths":{"/api/dex":{"get":{"tags":["DEX"],"summary":"Get current user's DEX","description":"Retrieve the DEX information for the currently authenticated user","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"DEX information retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/DexNotFoundResponse"},{"type":"object","properties":{"exists":{"type":"boolean"}}}]},{"$ref":"#/components/schemas/DexResponse"}],"description":"DEX information or not found response"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}},"post":{"tags":["DEX"],"summary":"Create a new DEX","description":"Create a new DEX for the authenticated user with the provided configuration","security":[{"bearerAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"brokerName":{"type":"string","minLength":3,"maxLength":30,"pattern":"^[a-zA-Z0-9 .\\-_]*$"},"chainIds":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},{"type":"string"}]},"defaultChain":{"anyOf":[{"type":"integer","minimum":0,"exclusiveMinimum":true},{"type":"string"}]},"themeCSS":{"type":"string","nullable":true},"themeConfig":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":50},"mode":{"type":"string","enum":["dark","light"]},"cssVars":{"type":"object","additionalProperties":{"type":"string"}},"tradingViewColorConfig":{"anyOf":[{"type":"object","properties":{"chartBG":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"upColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"downColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlZeroColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"textColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"qtyTextColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"closeIconColor":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"chartBG":{"type":"string","minLength":1},"upColor":{"type":"string","minLength":1},"downColor":{"type":"string","minLength":1},"pnlUpColor":{"type":"string","minLength":1},"pnlDownColor":{"type":"string","minLength":1},"pnlZeroColor":{"type":"string","minLength":1},"textColor":{"type":"string","minLength":1},"qtyTextColor":{"type":"string","minLength":1},"volumeUpColor":{"type":"string","minLength":1},"volumeDownColor":{"type":"string","minLength":1},"closeIconColor":{"type":"string","minLength":1}},"additionalProperties":false}]},"isDefault":{"type":"boolean"}},"required":["id","displayName","mode"],"additionalProperties":false},"minItems":1,"maxItems":10},{"type":"string"}]},"primaryLogo":{"type":"string","format":"binary"},"secondaryLogo":{"type":"string","format":"binary"},"favicon":{"type":"string","format":"binary"},"pnlPosters":{"type":"array","items":{"type":"string","format":"binary"}},"telegramLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"discordLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"xLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"walletConnectProjectId":{"type":"string","nullable":true},"privyAppId":{"type":"string","nullable":true},"privyTermsOfUse":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"privyLoginMethods":{"type":"string","nullable":true},"enabledMenus":{"type":"string","nullable":true},"customMenus":{"type":"string","nullable":true},"enableAbstractWallet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableMainnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableTestnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableEvmWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableSolanaWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableServiceDisclaimerDialog":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableCampaigns":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"tradingViewColorConfig":{"type":"string","nullable":true},"availableLanguages":{"anyOf":[{"type":"array","items":{"type":"string","enum":["en","ar","fa","he","zh","ja","es","ko","vi","de","fr","ru","id","tr","it","pt","uk","pl","nl","tc"]}},{"type":"string","maxLength":512}]},"swapFeeBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"string"},{"nullable":true}]},"seoSiteName":{"type":"string","nullable":true,"maxLength":100},"seoSiteDescription":{"type":"string","nullable":true,"maxLength":300},"seoSiteLanguage":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2})?$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoSiteLocale":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}_[A-Z]{2}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoTwitterHandle":{"anyOf":[{"type":"string","pattern":"^@[a-zA-Z0-9_]+$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoThemeColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoKeywords":{"type":"string","nullable":true,"maxLength":500},"analyticsConfig":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["ga4"]},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["firebase"]},"apiKey":{"type":"string","maxLength":128,"pattern":"^AIza[0-9A-Za-z_-]{20,}$"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$"},"appId":{"type":"string","pattern":"^1:\\d{6,20}:web:[0-9a-fA-F]{6,64}$"},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","apiKey","projectId","appId","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["plausible"]}},"required":["version","provider"],"additionalProperties":false},{"type":"string"},{"nullable":true}]},"symbolList":{"type":"string","nullable":true},"restrictedRegions":{"type":"string","nullable":true,"maxLength":2000},"whitelistedIps":{"type":"string","nullable":true,"maxLength":2000},"integrationType":{"anyOf":[{"type":"string","enum":["low_code","custom"]},{"type":"string"}]}},"required":["brokerName"],"additionalProperties":{"anyOf":[{"type":"string","format":"binary"},{"type":"string"}]}}}}},"responses":{"201":{"description":"DEX created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DexResponse"}}}},"400":{"description":"Invalid DEX configuration","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"409":{"description":"User already has a DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Request body exceeds the 2 MiB limit","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"429":{"description":"Rate limited - too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/networks":{"get":{"tags":["DEX"],"summary":"Get available networks","description":"Retrieve a list of available blockchain networks for token selection","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Networks retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Network ID"},"name":{"type":"string","description":"Network name"}},"required":["id","name"]}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/broker-name":{"put":{"tags":["DEX"],"summary":"Update the current user's builder name","description":"Update only the brokerName field for the authenticated user's DEX","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerNameUpdate"}}}},"responses":{"200":{"description":"Builder name updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerNameUpdateSuccess"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}":{"get":{"tags":["DEX"],"summary":"Get DEX by ID","description":"Retrieve a specific DEX by its ID","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"DEX retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DexResponse"}}}},"403":{"description":"Unauthorized to access this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}},"put":{"tags":["DEX"],"summary":"Update a DEX","description":"Update an existing DEX's configuration","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"brokerName":{"type":"string","nullable":true,"minLength":3,"maxLength":30,"pattern":"^[a-zA-Z0-9 .\\-_]*$"},"chainIds":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},{"type":"string"}]},"defaultChain":{"anyOf":[{"type":"integer","minimum":0,"exclusiveMinimum":true},{"type":"string"}]},"themeCSS":{"type":"string","nullable":true},"themeConfig":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":50},"mode":{"type":"string","enum":["dark","light"]},"cssVars":{"type":"object","additionalProperties":{"type":"string"}},"tradingViewColorConfig":{"anyOf":[{"type":"object","properties":{"chartBG":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"upColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"downColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlZeroColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"textColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"qtyTextColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"closeIconColor":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"chartBG":{"type":"string","minLength":1},"upColor":{"type":"string","minLength":1},"downColor":{"type":"string","minLength":1},"pnlUpColor":{"type":"string","minLength":1},"pnlDownColor":{"type":"string","minLength":1},"pnlZeroColor":{"type":"string","minLength":1},"textColor":{"type":"string","minLength":1},"qtyTextColor":{"type":"string","minLength":1},"volumeUpColor":{"type":"string","minLength":1},"volumeDownColor":{"type":"string","minLength":1},"closeIconColor":{"type":"string","minLength":1}},"additionalProperties":false}]},"isDefault":{"type":"boolean"}},"required":["id","displayName","mode"],"additionalProperties":false},"minItems":1,"maxItems":10},{"type":"string"}]},"primaryLogo":{"type":"string","format":"binary"},"secondaryLogo":{"type":"string","format":"binary"},"favicon":{"type":"string","format":"binary"},"pnlPosters":{"type":"array","items":{"type":"string","format":"binary"}},"telegramLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"discordLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"xLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"walletConnectProjectId":{"type":"string","nullable":true},"privyAppId":{"type":"string","nullable":true},"privyTermsOfUse":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"privyLoginMethods":{"type":"string","nullable":true},"enabledMenus":{"type":"string","nullable":true},"customMenus":{"type":"string","nullable":true},"enableAbstractWallet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableMainnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableTestnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableEvmWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableSolanaWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableServiceDisclaimerDialog":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableCampaigns":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"tradingViewColorConfig":{"type":"string","nullable":true},"availableLanguages":{"anyOf":[{"type":"array","items":{"type":"string","enum":["en","ar","fa","he","zh","ja","es","ko","vi","de","fr","ru","id","tr","it","pt","uk","pl","nl","tc"]}},{"type":"string","maxLength":512}]},"swapFeeBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"string"},{"nullable":true}]},"seoSiteName":{"type":"string","nullable":true,"maxLength":100},"seoSiteDescription":{"type":"string","nullable":true,"maxLength":300},"seoSiteLanguage":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2})?$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoSiteLocale":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}_[A-Z]{2}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoTwitterHandle":{"anyOf":[{"type":"string","pattern":"^@[a-zA-Z0-9_]+$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoThemeColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoKeywords":{"type":"string","nullable":true,"maxLength":500},"analyticsConfig":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["ga4"]},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["firebase"]},"apiKey":{"type":"string","maxLength":128,"pattern":"^AIza[0-9A-Za-z_-]{20,}$"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$"},"appId":{"type":"string","pattern":"^1:\\d{6,20}:web:[0-9a-fA-F]{6,64}$"},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","apiKey","projectId","appId","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["plausible"]}},"required":["version","provider"],"additionalProperties":false},{"type":"string"},{"nullable":true}]},"symbolList":{"type":"string","nullable":true},"restrictedRegions":{"type":"string","nullable":true,"maxLength":2000},"whitelistedIps":{"type":"string","nullable":true,"maxLength":2000},"integrationType":{"anyOf":[{"type":"string","enum":["low_code","custom"]},{"type":"string"}]}},"additionalProperties":{"anyOf":[{"type":"string","format":"binary"},{"type":"string"}]}}}}},"responses":{"200":{"description":"DEX updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DexResponse"}}}},"400":{"description":"Invalid request - invalid TradingView color configuration","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"403":{"description":"User is not authorized to update this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"413":{"description":"Request body exceeds the 2 MiB limit","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}},"delete":{"tags":["DEX"],"summary":"Delete a DEX","description":"Delete a DEX and its associated resources","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"DEX deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSuccess"}}}},"403":{"description":"User is not authorized to delete this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/social-card":{"put":{"tags":["DEX"],"summary":"Update social card information","description":"Update the social media and branding information for the user's DEX","security":[{"bearerAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"brokerName":{"type":"string","minLength":3,"maxLength":30,"pattern":"^[a-zA-Z0-9 .\\-_]*$"},"description":{"type":"string","nullable":true,"maxLength":150},"banner":{"anyOf":[{"type":"string","format":"binary"},{"type":"string","enum":[""]}]},"logo":{"anyOf":[{"type":"string","format":"binary"},{"type":"string","enum":[""]}]},"tokenAddress":{"type":"string","nullable":true,"maxLength":100},"tokenChain":{"type":"string","nullable":true,"maxLength":50},"telegramLink":{"anyOf":[{"type":"string","maxLength":50,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"discordLink":{"anyOf":[{"type":"string","maxLength":50,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"xLink":{"anyOf":[{"type":"string","maxLength":50,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"websiteUrl":{"type":"string","nullable":true,"maxLength":50,"format":"uri"}}}}}},"responses":{"200":{"description":"Social card updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialCardUpdate"}}}},"400":{"description":"Invalid request - invalid token chain or token not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"403":{"description":"User is not authorized to update this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}}}}},"/api/dex/{id}/deployment-status":{"get":{"tags":["DEX"],"summary":"Get deployment status","description":"Get the hosting status and last deployment time for a DEX","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"Deployment status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"deployed":{"type":"boolean","description":"Whether the DEX shell exists in Cloudflare R2"},"lastDeployedAt":{"type":"string","nullable":true,"description":"ISO timestamp of the last deployment"},"url":{"type":"string","description":"Public URL of the DEX"}},"required":["deployed","lastDeployedAt","url"]}}}},"403":{"description":"Unauthorized to access this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/upgrade-status":{"get":{"tags":["DEX"],"summary":"Get upgrade status","description":"Check if template updates are available for the DEX","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"Upgrade status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"hasUpdates":{"type":"boolean","description":"Whether template updates are available"},"behindBy":{"type":"integer","description":"Number of commits behind"},"templateCommitSha":{"type":"string"},"userCommitSha":{"type":"string"},"commits":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string"},"message":{"type":"string"},"author":{"type":"string"},"date":{"type":"string"}},"required":["sha","message","author","date"]}}},"required":["hasUpdates","behindBy","templateCommitSha","userCommitSha"]}}}},"400":{"description":"Invalid request - DEX does not have a repository","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"403":{"description":"Unauthorized to access this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/upgrade":{"post":{"tags":["DEX"],"summary":"Upgrade DEX","description":"Trigger a redeployment of the DEX to apply template updates","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"DEX upgrade triggered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeSuccess"}}}},"400":{"description":"Invalid request - DEX does not have a repository","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"403":{"description":"Unauthorized to access this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/custom-domain":{"post":{"tags":["DEX"],"summary":"Set custom domain","description":"Set a custom domain for the DEX","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"Custom domain to set for the DEX"}},"required":["domain"]}}}},"responses":{"200":{"description":"Custom domain set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainSuccess"}}}},"400":{"description":"Invalid domain format","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryableErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"503":{"description":"DNS verification temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryableErrorResponse"}}}}}},"delete":{"tags":["DEX"],"summary":"Remove custom domain","description":"Remove the custom domain from a DEX","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"Custom domain removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainSuccess"}}}},"400":{"description":"DEX does not have a custom domain configured","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"403":{"description":"User is not authorized to modify this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/domain-status":{"get":{"tags":["DEX"],"summary":"Get custom domain status","description":"Check DNS records and hosting status for the DEX's custom domain","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"Domain status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true,"description":"The configured custom domain, if any"},"dns":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["ok","missing","wrong-target","unavailable"]},"cname":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"type":"string"}},"expectedTarget":{"type":"string"}},"required":["status","cname","addresses","expectedTarget"]},"hosting":{"type":"object","nullable":true,"properties":{"status":{"type":"string","nullable":true},"sslStatus":{"type":"string","nullable":true}},"required":["status","sslStatus"]}},"required":["domain","dns","hosting"]}}}},"403":{"description":"Unauthorized to access this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/swap-fee":{"put":{"tags":["DEX"],"summary":"Update swap fee","description":"Update the swap fee for a DEX. Accepts JSON body for programmatic/SDK usage.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"swapFeeBps":{"type":"integer","nullable":true,"minimum":0,"maximum":100,"description":"Swap fee in basis points (0-100). Set to null to remove."}},"required":["swapFeeBps"]}}}},"responses":{"200":{"description":"Swap fee updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapFeeSuccess"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Unauthorized to update this DEX","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/frontend":{"post":{"tags":["DEX"],"summary":"Create DEX frontend","description":"Create a frontend for a DEX by forking the template repository and pushing configuration. Auto-switches integration type to low_code.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"chainIds":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},{"type":"string"}]},"defaultChain":{"anyOf":[{"type":"integer","minimum":0,"exclusiveMinimum":true},{"type":"string"}]},"themeCSS":{"type":"string","nullable":true},"themeConfig":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":50},"mode":{"type":"string","enum":["dark","light"]},"cssVars":{"type":"object","additionalProperties":{"type":"string"}},"tradingViewColorConfig":{"anyOf":[{"type":"object","properties":{"chartBG":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"upColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"downColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlZeroColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"textColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"qtyTextColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"closeIconColor":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"chartBG":{"type":"string","minLength":1},"upColor":{"type":"string","minLength":1},"downColor":{"type":"string","minLength":1},"pnlUpColor":{"type":"string","minLength":1},"pnlDownColor":{"type":"string","minLength":1},"pnlZeroColor":{"type":"string","minLength":1},"textColor":{"type":"string","minLength":1},"qtyTextColor":{"type":"string","minLength":1},"volumeUpColor":{"type":"string","minLength":1},"volumeDownColor":{"type":"string","minLength":1},"closeIconColor":{"type":"string","minLength":1}},"additionalProperties":false}]},"isDefault":{"type":"boolean"}},"required":["id","displayName","mode"],"additionalProperties":false},"minItems":1,"maxItems":10},{"type":"string"}]},"primaryLogo":{"type":"string","format":"binary"},"secondaryLogo":{"type":"string","format":"binary"},"favicon":{"type":"string","format":"binary"},"pnlPosters":{"type":"array","items":{"type":"string","format":"binary"}},"telegramLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"discordLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"xLink":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"walletConnectProjectId":{"type":"string","nullable":true},"privyAppId":{"type":"string","nullable":true},"privyTermsOfUse":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","enum":[""]},{"nullable":true}]},"privyLoginMethods":{"type":"string","nullable":true},"enabledMenus":{"type":"string","nullable":true},"customMenus":{"type":"string","nullable":true},"enableAbstractWallet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableMainnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableTestnet":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableEvmWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"disableSolanaWallets":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableServiceDisclaimerDialog":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"enableCampaigns":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"tradingViewColorConfig":{"type":"string","nullable":true},"availableLanguages":{"anyOf":[{"type":"array","items":{"type":"string","enum":["en","ar","fa","he","zh","ja","es","ko","vi","de","fr","ru","id","tr","it","pt","uk","pl","nl","tc"]}},{"type":"string","maxLength":512}]},"swapFeeBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"string"},{"nullable":true}]},"seoSiteName":{"type":"string","nullable":true,"maxLength":100},"seoSiteDescription":{"type":"string","nullable":true,"maxLength":300},"seoSiteLanguage":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2})?$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoSiteLocale":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}_[A-Z]{2}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoTwitterHandle":{"anyOf":[{"type":"string","pattern":"^@[a-zA-Z0-9_]+$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoThemeColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","enum":[""]},{"nullable":true}]},"seoKeywords":{"type":"string","nullable":true,"maxLength":500},"analyticsConfig":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["ga4"]},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["firebase"]},"apiKey":{"type":"string","maxLength":128,"pattern":"^AIza[0-9A-Za-z_-]{20,}$"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$"},"appId":{"type":"string","pattern":"^1:\\d{6,20}:web:[0-9a-fA-F]{6,64}$"},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","apiKey","projectId","appId","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["plausible"]}},"required":["version","provider"],"additionalProperties":false},{"type":"string"},{"nullable":true}]},"symbolList":{"type":"string","nullable":true},"restrictedRegions":{"type":"string","nullable":true,"maxLength":2000},"whitelistedIps":{"type":"string","nullable":true,"maxLength":2000},"integrationType":{"anyOf":[{"type":"string","enum":["low_code","custom"]},{"type":"string"}]}},"additionalProperties":{"anyOf":[{"type":"string","format":"binary"},{"type":"string"}]}}}}},"responses":{"200":{"description":"Frontend created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"data":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name for the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"customDomainOverride":{"type":"string","nullable":true,"description":"Custom domain override URL"},"chainIds":{"type":"array","items":{"type":"number"},"description":"Supported chain IDs"},"defaultChain":{"type":"number","nullable":true,"description":"Default chain ID"},"themeCSS":{"type":"string","nullable":true,"description":"Canonical :root CSS containing supported Orderly theme tokens"},"themeConfig":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":50},"mode":{"type":"string","enum":["dark","light"]},"cssVars":{"type":"object","additionalProperties":{"type":"string"}},"tradingViewColorConfig":{"anyOf":[{"type":"object","properties":{"chartBG":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"upColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"downColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlZeroColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"textColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"qtyTextColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"closeIconColor":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"chartBG":{"type":"string","minLength":1},"upColor":{"type":"string","minLength":1},"downColor":{"type":"string","minLength":1},"pnlUpColor":{"type":"string","minLength":1},"pnlDownColor":{"type":"string","minLength":1},"pnlZeroColor":{"type":"string","minLength":1},"textColor":{"type":"string","minLength":1},"qtyTextColor":{"type":"string","minLength":1},"volumeUpColor":{"type":"string","minLength":1},"volumeDownColor":{"type":"string","minLength":1},"closeIconColor":{"type":"string","minLength":1}},"additionalProperties":false}]},"isDefault":{"type":"boolean"}},"required":["id","displayName","mode"],"additionalProperties":false},"minItems":1,"maxItems":10,"description":"SDK ThemeConfig array; legacy rows are represented as one default theme"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram link"},"discordLink":{"type":"string","nullable":true,"description":"Discord link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) link"},"walletConnectProjectId":{"type":"string","nullable":true,"description":"WalletConnect project ID"},"privyAppId":{"type":"string","nullable":true,"description":"Privy app ID"},"enabledMenus":{"type":"string","nullable":true,"description":"Enabled menu items"},"customMenus":{"type":"string","nullable":true,"description":"Custom menu configuration"},"enableAbstractWallet":{"type":"boolean","nullable":true,"description":"Whether Abstract wallet is enabled"},"disableMainnet":{"type":"boolean","nullable":true,"description":"Whether mainnet is disabled"},"disableTestnet":{"type":"boolean","nullable":true,"description":"Whether testnet is disabled"},"disableEvmWallets":{"type":"boolean","nullable":true,"description":"Whether EVM wallets are disabled"},"disableSolanaWallets":{"type":"boolean","nullable":true,"description":"Whether Solana wallets are disabled"},"enableServiceDisclaimerDialog":{"type":"boolean","nullable":true,"description":"Whether service disclaimer dialog is enabled"},"enableCampaigns":{"type":"boolean","nullable":true,"description":"Whether campaigns are enabled"},"tradingViewColorConfig":{"type":"string","nullable":true,"description":"TradingView color configuration JSON"},"availableLanguages":{"type":"array","items":{"type":"string"},"description":"Available language codes"},"seoSiteName":{"type":"string","nullable":true,"description":"SEO site name"},"seoSiteDescription":{"type":"string","nullable":true,"description":"SEO site description"},"seoSiteLanguage":{"type":"string","nullable":true,"description":"SEO site language"},"seoSiteLocale":{"type":"string","nullable":true,"description":"SEO site locale"},"seoTwitterHandle":{"type":"string","nullable":true,"description":"SEO Twitter handle"},"seoThemeColor":{"type":"string","nullable":true,"description":"SEO theme color"},"seoKeywords":{"type":"string","nullable":true,"description":"SEO keywords"},"analyticsConfig":{"oneOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["ga4"]},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["firebase"]},"apiKey":{"type":"string","maxLength":128,"pattern":"^AIza[0-9A-Za-z_-]{20,}$"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$"},"appId":{"type":"string","pattern":"^1:\\d{6,20}:web:[0-9a-fA-F]{6,64}$"},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","apiKey","projectId","appId","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["plausible"]}},"required":["version","provider"],"additionalProperties":false},{"nullable":true}],"description":"Validated fixed-provider analytics configuration"},"swapFeeBps":{"type":"number","nullable":true,"description":"Swap fee in basis points"},"symbolList":{"type":"string","nullable":true,"description":"Symbol list"},"restrictedRegions":{"type":"string","nullable":true,"description":"Restricted regions"},"whitelistedIps":{"type":"string","nullable":true,"description":"Whitelisted IPs"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token address"},"tokenChain":{"type":"string","nullable":true,"description":"Token chain"},"websiteUrl":{"type":"string","nullable":true,"description":"Website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated"},"graduationTxHash":{"type":"string","nullable":true,"description":"Graduation transaction hash"},"multisigChainId":{"type":"number","nullable":true,"description":"Multisig chain ID"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","brokerId","brokerName","repoUrl","customDomain","customDomainOverride","chainIds","defaultChain","themeCSS","themeConfig","telegramLink","discordLink","xLink","walletConnectProjectId","privyAppId","enabledMenus","customMenus","enableAbstractWallet","disableMainnet","disableTestnet","disableEvmWallets","disableSolanaWallets","enableServiceDisclaimerDialog","enableCampaigns","tradingViewColorConfig","availableLanguages","seoSiteName","seoSiteDescription","seoSiteLanguage","seoSiteLocale","seoTwitterHandle","seoThemeColor","seoKeywords","analyticsConfig","swapFeeBps","symbolList","restrictedRegions","whitelistedIps","description","banner","logo","tokenAddress","tokenChain","websiteUrl","isGraduated","graduationTxHash","multisigChainId","showOnBoard","createdAt","updatedAt"],"description":"DEX object"},"error":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}},"required":["success"],"description":"Frontend creation response"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"403":{"description":"User is not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}},"delete":{"tags":["DEX"],"summary":"Delete DEX frontend","description":"Delete the frontend for a DEX, removing the GitHub repository. Auto-switches integration type to custom.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"Frontend deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"data":{"type":"object","properties":{"id":{"type":"string","description":"DEX ID"},"brokerId":{"type":"string","description":"Broker ID"},"brokerName":{"type":"string","description":"Display name for the DEX"},"repoUrl":{"type":"string","nullable":true,"description":"GitHub repository URL"},"customDomain":{"type":"string","nullable":true,"description":"Custom domain for the DEX"},"customDomainOverride":{"type":"string","nullable":true,"description":"Custom domain override URL"},"chainIds":{"type":"array","items":{"type":"number"},"description":"Supported chain IDs"},"defaultChain":{"type":"number","nullable":true,"description":"Default chain ID"},"themeCSS":{"type":"string","nullable":true,"description":"Canonical :root CSS containing supported Orderly theme tokens"},"themeConfig":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":50},"mode":{"type":"string","enum":["dark","light"]},"cssVars":{"type":"object","additionalProperties":{"type":"string"}},"tradingViewColorConfig":{"anyOf":[{"type":"object","properties":{"chartBG":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"upColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"downColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"pnlZeroColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"textColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"qtyTextColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeUpColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"volumeDownColor":{"type":"string","pattern":"^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i"},"closeIconColor":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"chartBG":{"type":"string","minLength":1},"upColor":{"type":"string","minLength":1},"downColor":{"type":"string","minLength":1},"pnlUpColor":{"type":"string","minLength":1},"pnlDownColor":{"type":"string","minLength":1},"pnlZeroColor":{"type":"string","minLength":1},"textColor":{"type":"string","minLength":1},"qtyTextColor":{"type":"string","minLength":1},"volumeUpColor":{"type":"string","minLength":1},"volumeDownColor":{"type":"string","minLength":1},"closeIconColor":{"type":"string","minLength":1}},"additionalProperties":false}]},"isDefault":{"type":"boolean"}},"required":["id","displayName","mode"],"additionalProperties":false},"minItems":1,"maxItems":10,"description":"SDK ThemeConfig array; legacy rows are represented as one default theme"},"telegramLink":{"type":"string","nullable":true,"description":"Telegram link"},"discordLink":{"type":"string","nullable":true,"description":"Discord link"},"xLink":{"type":"string","nullable":true,"description":"X (Twitter) link"},"walletConnectProjectId":{"type":"string","nullable":true,"description":"WalletConnect project ID"},"privyAppId":{"type":"string","nullable":true,"description":"Privy app ID"},"enabledMenus":{"type":"string","nullable":true,"description":"Enabled menu items"},"customMenus":{"type":"string","nullable":true,"description":"Custom menu configuration"},"enableAbstractWallet":{"type":"boolean","nullable":true,"description":"Whether Abstract wallet is enabled"},"disableMainnet":{"type":"boolean","nullable":true,"description":"Whether mainnet is disabled"},"disableTestnet":{"type":"boolean","nullable":true,"description":"Whether testnet is disabled"},"disableEvmWallets":{"type":"boolean","nullable":true,"description":"Whether EVM wallets are disabled"},"disableSolanaWallets":{"type":"boolean","nullable":true,"description":"Whether Solana wallets are disabled"},"enableServiceDisclaimerDialog":{"type":"boolean","nullable":true,"description":"Whether service disclaimer dialog is enabled"},"enableCampaigns":{"type":"boolean","nullable":true,"description":"Whether campaigns are enabled"},"tradingViewColorConfig":{"type":"string","nullable":true,"description":"TradingView color configuration JSON"},"availableLanguages":{"type":"array","items":{"type":"string"},"description":"Available language codes"},"seoSiteName":{"type":"string","nullable":true,"description":"SEO site name"},"seoSiteDescription":{"type":"string","nullable":true,"description":"SEO site description"},"seoSiteLanguage":{"type":"string","nullable":true,"description":"SEO site language"},"seoSiteLocale":{"type":"string","nullable":true,"description":"SEO site locale"},"seoTwitterHandle":{"type":"string","nullable":true,"description":"SEO Twitter handle"},"seoThemeColor":{"type":"string","nullable":true,"description":"SEO theme color"},"seoKeywords":{"type":"string","nullable":true,"description":"SEO keywords"},"analyticsConfig":{"oneOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["ga4"]},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["firebase"]},"apiKey":{"type":"string","maxLength":128,"pattern":"^AIza[0-9A-Za-z_-]{20,}$"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$"},"appId":{"type":"string","pattern":"^1:\\d{6,20}:web:[0-9a-fA-F]{6,64}$"},"measurementId":{"type":"string","pattern":"^G-[A-Z0-9]{4,20}$"}},"required":["version","provider","apiKey","projectId","appId","measurementId"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"provider":{"type":"string","enum":["plausible"]}},"required":["version","provider"],"additionalProperties":false},{"nullable":true}],"description":"Validated fixed-provider analytics configuration"},"swapFeeBps":{"type":"number","nullable":true,"description":"Swap fee in basis points"},"symbolList":{"type":"string","nullable":true,"description":"Symbol list"},"restrictedRegions":{"type":"string","nullable":true,"description":"Restricted regions"},"whitelistedIps":{"type":"string","nullable":true,"description":"Whitelisted IPs"},"description":{"type":"string","nullable":true,"description":"DEX description"},"banner":{"type":"string","nullable":true,"description":"Banner image URL"},"logo":{"type":"string","nullable":true,"description":"Logo image URL"},"tokenAddress":{"type":"string","nullable":true,"description":"Token address"},"tokenChain":{"type":"string","nullable":true,"description":"Token chain"},"websiteUrl":{"type":"string","nullable":true,"description":"Website URL"},"isGraduated":{"type":"boolean","description":"Whether the DEX has graduated"},"graduationTxHash":{"type":"string","nullable":true,"description":"Graduation transaction hash"},"multisigChainId":{"type":"number","nullable":true,"description":"Multisig chain ID"},"showOnBoard":{"type":"boolean","description":"Whether to expose DEX identity on the public leaderboard"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}},"required":["id","brokerId","brokerName","repoUrl","customDomain","customDomainOverride","chainIds","defaultChain","themeCSS","themeConfig","telegramLink","discordLink","xLink","walletConnectProjectId","privyAppId","enabledMenus","customMenus","enableAbstractWallet","disableMainnet","disableTestnet","disableEvmWallets","disableSolanaWallets","enableServiceDisclaimerDialog","enableCampaigns","tradingViewColorConfig","availableLanguages","seoSiteName","seoSiteDescription","seoSiteLanguage","seoSiteLocale","seoTwitterHandle","seoThemeColor","seoKeywords","analyticsConfig","swapFeeBps","symbolList","restrictedRegions","whitelistedIps","description","banner","logo","tokenAddress","tokenChain","websiteUrl","isGraduated","graduationTxHash","multisigChainId","showOnBoard","createdAt","updatedAt"],"description":"DEX object"},"error":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}},"required":["success"],"description":"Frontend deletion response"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"403":{"description":"User is not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/plugins":{"get":{"tags":["DEX plugins"],"summary":"List enabled marketplace plugins for a DEX","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"}],"responses":{"200":{"description":"DEX plugins","content":{"application/json":{"schema":{"type":"object","properties":{"plugins":{"type":"array","items":{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9-]*$"},"npmName":{"type":"string","maxLength":214,"pattern":"^(?:@[a-z0-9-*~][a-z0-9-*._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"},"enabled":{"type":"boolean","default":true},"config":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},"default":{}},"orderlyVersion":{"type":"string","nullable":true,"maxLength":60},"updatedAt":{"type":"string"}},"required":["pluginId","npmName","version","orderlyVersion","updatedAt"]}}},"required":["plugins"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/dex/{id}/plugins/{pluginId}":{"put":{"tags":["DEX plugins"],"summary":"Enable or configure a marketplace plugin (triggers redeploy)","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9-]*$"},"required":true,"name":"pluginId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9-]*$"},"npmName":{"type":"string","maxLength":214,"pattern":"^(?:@[a-z0-9-*~][a-z0-9-*._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"},"enabled":{"type":"boolean","default":true},"config":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},"default":{}}},"required":["pluginId","npmName","version"]}}}},"responses":{"200":{"description":"Plugin saved","content":{"application/json":{"schema":{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9-]*$"},"npmName":{"type":"string","maxLength":214,"pattern":"^(?:@[a-z0-9-*~][a-z0-9-*._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"},"enabled":{"type":"boolean","default":true},"config":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},"default":{}},"orderlyVersion":{"type":"string","nullable":true,"maxLength":60},"updatedAt":{"type":"string"},"repositoryWarning":{"type":"string"}},"required":["pluginId","npmName","version","orderlyVersion","updatedAt"]}}}},"400":{"description":"Invalid plugin or config","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}},"delete":{"tags":["DEX plugins"],"summary":"Disable a plugin (triggers redeploy)","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"DEX ID","example":"cm3abc123def456"},"required":true,"description":"DEX ID","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9-]*$"},"required":true,"name":"pluginId","in":"path"}],"responses":{"200":{"description":"Plugin removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"repositoryWarning":{"type":"string"}},"required":["success"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}},"404":{"description":"DEX not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"description":"Error response"}}}}}}},"/api/auth/nonce":{"post":{"tags":["Authentication"],"summary":"Generate authentication nonce","description":"Generate a five-minute, server-signed challenge without creating a user record","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}}},"responses":{"200":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/auth/verify":{"post":{"tags":["Authentication"],"summary":"Verify signature and authenticate","description":"Verify the signed message and return an authentication token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthVerify"}}}},"responses":{"200":{"description":"Authentication successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}},"401":{"description":"Invalid, expired, or already used challenge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/auth/validate":{"post":{"tags":["Authentication"],"summary":"Validate authentication token","description":"Validate if an authentication token is still valid","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidation"}}}},"responses":{"200":{"description":"Token is valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidationResponse"}}}},"401":{"description":"Token invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidationResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidationResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidationResponse"}}}}}}},"/api/auth/cli-token":{"post":{"tags":["Authentication"],"summary":"Issue a CLI token pair","description":"Exchanges the current wallet bearer token for a CLI session with a rotating refresh token","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"CLI token pair issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/auth/refresh-cli":{"post":{"tags":["Authentication"],"summary":"Refresh CLI access token","description":"Rotates a CLI session: validates the refresh token and returns a fresh access/refresh pair","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenRequest"}}}},"responses":{"200":{"description":"CLI token refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenResponse"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/auth/revoke-cli":{"post":{"tags":["Authentication"],"summary":"Revoke a CLI session","description":"Revokes the CLI session owning the given refresh token (used by `orderly-devkit logout`)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenRequest"}}}},"responses":{"200":{"description":"Revocation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliRevokeResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/auth/revoke-cli-all":{"post":{"tags":["Authentication"],"summary":"Revoke all CLI sessions for the current user","description":"Panic button for suspected token leakage: revokes every CLI session of the authenticated user","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Revocation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliRevokeAllResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}},"/api/admin/check":{"get":{"tags":["Admin"],"summary":"Check admin status","description":"Check if the current user is an admin","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Admin status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCheckResponse"}}}}}}},"/api/theme/modify":{"post":{"tags":["Theme"],"summary":"Modify theme tokens","description":"Generate three token-only theme variants","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":100,"description":"Description of the desired theme modifications"},"currentTheme":{"type":"string","description":"Current canonical Orderly theme token CSS"},"currentMode":{"type":"string","enum":["dark","light"],"description":"Current theme color scheme"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Theme modified successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeModifyResponse"}}}},"413":{"description":"Theme request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeErrorResponse"}}}},"429":{"description":"Theme generation rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeErrorResponse"}}}}}}},"/api/graduation/verify-tx":{"post":{"tags":["Graduation"],"summary":"Verify graduation transaction","description":"Verify a graduation payment transaction and create the broker ID. Two ways to pay:\n\n1. **x402 (agent-friendly)** — call `POST /api/graduation/graduate` first, optionally with `brokerId` + fee query parameters and a Bearer token for **single-fetch auto-finalization** (the broker is registered automatically once the payment settles, no separate call needed). Otherwise, once the payment settles (200), read the settlement transaction hash from the `PAYMENT-RESPONSE` response header and pass it here as `txHash` together with the chain you paid on (`\"base\" | \"arbitrum\" | \"ethereum\"`) and `paymentType: \"usdc\"`. The paying wallet must belong to the Bearer-authenticated account.\n\n2. **Manual transfer** — send an ERC-20 transfer of USDC/ORDER/USDT to the receiver address from `GET /fee-options` on any accepted chain and pass its `txHash` here.\n\nIn both cases the broker ID is created by this call, but graduation is not finished: register your admin wallet via `POST /api/graduation/finalize-admin-wallet` (see its description for the registration recipe) and confirm with `GET /api/graduation/graduation-status` (`isGraduated: true`).\n\nIf verification permanently fails after an x402 payment, the fee can be reclaimed via `POST /api/graduation/refund`.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","minLength":10,"maxLength":100,"description":"Transaction hash to verify"},"chain":{"type":"string","minLength":1,"maxLength":50,"description":"Blockchain chain name"},"brokerId":{"type":"string","minLength":5,"maxLength":15,"pattern":"^[a-z0-9_-]+$","description":"Desired broker ID"},"makerFee":{"type":"number","minimum":-0.5,"maximum":15,"description":"Maker fee in basis points (-0.5 to 15), in 0.1 bps increments. Negative values indicate rebates."},"takerFee":{"type":"number","minimum":1,"maximum":15,"description":"Taker fee in basis points (1-15), in 0.1 bps increments"},"rwaMakerFee":{"type":"number","minimum":-0.5,"maximum":15,"description":"RWA maker fee in basis points (-0.5 to 15), in 0.1 bps increments. Negative values indicate rebates."},"rwaTakerFee":{"type":"number","minimum":1,"maximum":15,"description":"RWA taker fee in basis points (1-15), in 0.1 bps increments"},"paymentType":{"type":"string","enum":["usdc","order","usdt"],"default":"order","description":"Payment token type"},"paymentQuote":{"type":"string","maxLength":4096,"description":"Server-signed quote required for ORDER payments"}},"required":["txHash","chain","brokerId","makerFee","takerFee","rwaMakerFee","rwaTakerFee"]}}}},"responses":{"200":{"description":"Transaction verified and broker created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyTxSuccess"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/refund":{"post":{"tags":["Graduation"],"summary":"Refund an unused x402 graduation payment","description":"Refunds a settled x402 graduation payment that was not consumed by graduation. Use when POST /api/graduation/graduate returned 200 (payment settled) but POST /api/graduation/verify-tx failed or was never completed. The authenticated user must be the EIP-3009 payer of the settlement. Once refunded, the settlement transaction can no longer be used for graduation.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationRefund"}}}},"responses":{"200":{"description":"Refund transaction submitted on-chain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationRefundResponse"}}}},"400":{"description":"Invalid request, non-x402 transaction, or already used/refunded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"429":{"description":"Too many refund attempts — retry after the cooldown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error (refund transaction failed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/status":{"get":{"tags":["Graduation"],"summary":"Get graduation status","description":"Get the current graduation status for the user's DEX","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Graduation status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/rebind-permissionless-vault":{"post":{"tags":["Graduation"],"summary":"Rebind broker ID to permissionless vault","description":"Retry adding the current user's broker ID to the permissionless vault allowlist","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Permissionless vault allowlist updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebindPermissionlessVaultResponse"}}}},"400":{"description":"Invalid request or rebind failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/fees":{"get":{"tags":["Graduation"],"summary":"Get DEX fees","description":"Get the trading fees for the user's DEX","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"DEX fees retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DexFees"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/tier":{"get":{"tags":["Graduation"],"summary":"Get broker tier","description":"Get the broker tier information for the user's DEX","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Broker tier retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerTier"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"required":["message"],"description":"Message response"}}}}}}},"/api/graduation/finalize-admin-wallet":{"post":{"tags":["Graduation"],"summary":"Finalize admin wallet setup","description":"Finalize the admin wallet setup and mark DEX as graduated. This is the last step of graduation: it binds the admin wallet's Orderly account to the broker (on-chain FeeManager `setBrokerAccountId` + broker API `updateAdminAccount`) and sets `isGraduated: true`.\n\n**Prerequisite — register your wallet as an Orderly account first** (an EIP-712-signed registration against the Orderly API at `http://orderly-gateway-rest`):\n\n1. `GET http://orderly-gateway-rest/v1/registration_nonce?address={yourAddress}` → `data.registration_nonce`\n2. Sign EIP-712 typed data with your wallet:\n   - domain: `{ name: \"Orderly\", version: \"1\", chainId: <your EVM chainId, e.g. 421614>, verifyingContract: \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\" }`\n   - types: `Registration: [ { name: \"brokerId\", type: \"string\" }, { name: \"chainId\", type: \"uint256\" }, { name: \"timestamp\", type: \"uint64\" }, { name: \"registrationNonce\", type: \"uint256\" } ]`\n   - message: `{ brokerId, chainId, timestamp: <current time in ms>, registrationNonce: <nonce from step 1> }`\n3. `POST http://orderly-gateway-rest/v1/register_account` with JSON body `{ message, signature, userAddress }` → `data.account_id` (keep the same brokerId and address you graduated with)\n\nThen call this endpoint with an **empty JSON body** (`{}`) — the EOA path binds the Bearer-authenticated user's own wallet as the admin. The multisig/delegate fields are for browser users with an Orderly delegate contract; agents should omit both.\n\nIf the broker already has a **different** admin account configured, the request is rejected with `409` unless `overwrite: true` is supplied — this prevents silently replacing an existing admin wallet and its on-chain fee routing.\n\nCall `GET /api/graduation/graduation-status` afterwards to confirm `isGraduated: true`.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"multisigAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Multisig/delegate wallet address to bind as admin"},"multisigChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Chain ID for the multisig/delegate contract"},"overwrite":{"type":"boolean","description":"Explicit opt-in to replace an admin wallet that is already configured for this broker. Without it, finalization is refused when a different admin account already exists."}}}}}},"responses":{"200":{"description":"Admin wallet setup completed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeAdminWalletResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"403":{"description":"Forbidden - caller is not the authorized signer for the admin wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"409":{"description":"Conflict - the broker already has a different admin account bound and overwrite was not requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"503":{"description":"Service unavailable - the broker's current admin account could not be verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/graduation-status":{"get":{"tags":["Graduation"],"summary":"Get detailed graduation status","description":"Get detailed graduation status including multisig information. Poll this endpoint after paying the fee: `isGraduated` becomes `true` only after the admin wallet has been registered and bound via `POST /api/graduation/finalize-admin-wallet` — a broker ID alone (`brokerId != \"demo\"`) is not yet a finished graduation.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Graduation status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationStatusExtended"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/graduation/fee-options":{"get":{"tags":["Graduation"],"summary":"Get graduation fee options","description":"Get the available fee options for graduation (USDC, ORDER, or USDT), the receiver address for manual transfers, and the authenticated payer address required for graduation payment. Agents that prefer not to build transactions manually can instead pay the USDC fee via the x402 HTTP-native payment protocol — see `POST /api/graduation/graduate` (payment requirements are returned in its 402 response)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Fee options retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeOptions"}}}},"400":{"description":"DEX is not eligible for graduation payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"404":{"description":"Authenticated user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}},"500":{"description":"Graduation payment configuration unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraduationErrorResponse"}}}}}}},"/api/leaderboard":{"get":{"tags":["Leaderboard"],"summary":"Get leaderboard","description":"Get a paginated list of graduated DEXes sorted by trading metrics","parameters":[{"schema":{"type":"string","enum":["volume","pnl","fee"],"default":"volume","description":"Sort field for leaderboard","example":"volume"},"required":false,"description":"Sort field for leaderboard","name":"sort","in":"query"},{"schema":{"type":"string","enum":["today","daily","weekly","30d","90d"],"default":"weekly","description":"Time period for statistics","example":"weekly"},"required":false,"description":"Time period for statistics","name":"period","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":50,"default":20,"description":"Number of results to return","example":20},"required":false,"description":"Number of results to return","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"Number of results to skip","example":0},"required":false,"description":"Number of results to skip","name":"offset","in":"query"}],"responses":{"200":{"description":"Leaderboard retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardErrorResponse"}}}}}}},"/api/leaderboard/broker/{brokerId}":{"get":{"tags":["Leaderboard"],"summary":"Get broker stats","description":"Get detailed statistics for a specific broker/DEX","parameters":[{"schema":{"type":"string","minLength":1,"description":"Broker ID","example":"demo_dex"},"required":true,"description":"Broker ID","name":"brokerId","in":"path"},{"schema":{"type":"string","enum":["today","daily","weekly","30d","90d"],"default":"weekly","description":"Time period for statistics","example":"weekly"},"required":false,"description":"Time period for statistics","name":"period","in":"query"}],"responses":{"200":{"description":"Broker stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerStatsResponse"}}}},"404":{"description":"Broker not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardErrorResponse"}}}}}}},"/api/stats":{"get":{"tags":["Stats"],"summary":"Get DEX statistics","description":"Get aggregate statistics about DEX creation and graduation over a specified time period","parameters":[{"schema":{"type":"string","enum":["today","daily","weekly","30d","90d"],"default":"30d","description":"Time period for statistics","example":"30d"},"required":false,"description":"Time period for statistics","name":"period","in":"query"}],"responses":{"200":{"description":"Statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DexStats"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsErrorResponse"}}}}}}},"/api/stats/swap-fee-config":{"get":{"tags":["Stats"],"summary":"Get swap fee configurations","description":"Get the swap fee configuration for all graduated DEXes (cached for 5 minutes)","responses":{"200":{"description":"Swap fee configurations retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapFeeConfig"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsErrorResponse"}}}}}}},"/api/bd-application":{"post":{"tags":["Boosted Distributor"],"summary":"Create a Boosted Distributor application","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorApplication"}}}},"responses":{"200":{"description":"Application saved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorSuccess"}}}},"400":{"description":"Invalid verification challenge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostedDistributorError"}}}}}}},"/api/blogposts":{"get":{"tags":["Blogposts"],"summary":"List builder blogposts","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":1024},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["DRAFT","PUBLISHED","UNPUBLISHED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Blogposts retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}},"post":{"tags":["Blogposts"],"summary":"Create a blogpost draft","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostCreateRequest"}}}},"responses":{"201":{"description":"Draft created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}":{"get":{"tags":["Blogposts"],"summary":"Get an builder blogpost","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"}],"responses":{"200":{"description":"Blogpost retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}},"patch":{"tags":["Blogposts"],"summary":"Update an builder blogpost draft","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPatchRequest"}}}},"responses":{"200":{"description":"Draft updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}},"delete":{"tags":["Blogposts"],"summary":"Soft-delete an builder blogpost","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"responses":{"204":{"description":"Blogpost deleted successfully"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}/preview":{"post":{"tags":["Blogposts"],"summary":"Render a sanitized preview of the working draft","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPreviewRequest"}}}},"responses":{"200":{"description":"Preview rendered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPreviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}/publish":{"post":{"tags":["Blogposts"],"summary":"Publish the latest builder blogpost draft","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"responses":{"200":{"description":"Blogpost published successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}/unpublish":{"post":{"tags":["Blogposts"],"summary":"Immediately unpublish an builder blogpost","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"responses":{"200":{"description":"Blogpost unpublished successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderBlogPostResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}/assets":{"get":{"tags":["Blogpost Assets"],"summary":"List an builder blogpost's media assets","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"}],"responses":{"200":{"description":"Assets retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAssetListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}},"post":{"tags":["Blogpost Assets"],"summary":"Upload a private blogpost image","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BlogPostAssetUpload"}}}},"responses":{"201":{"description":"Asset uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAssetResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/blogposts/{postId}/assets/{assetId}":{"delete":{"tags":["Blogpost Assets"],"summary":"Delete an unreferenced private blogpost image","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"assetId","in":"path"},{"schema":{"type":"string","pattern":"^\"(?:0|[1-9]\\d*)\"$"},"required":false,"name":"if-match","in":"header"}],"responses":{"204":{"description":"Asset deleted successfully"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"403":{"description":"Builder is not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost or asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"428":{"description":"If-Match is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Authenticated user rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostAuthenticatedRateLimitErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"502":{"description":"Media storage operation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Required dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/public/v1/blogposts/featured":{"get":{"tags":["Blogposts - Public"],"summary":"List featured blogposts","parameters":[{"schema":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"required":false,"name":"category","in":"query"}],"responses":{"200":{"description":"Featured published blogposts in Marketing-defined order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPublicFeaturedResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Published revision is incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostRateLimitErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Blogpost database temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/public/v1/blogposts":{"get":{"tags":["Blogposts - Public"],"summary":"List published blogposts","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":1024},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":12},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["ANNOUNCEMENT","UPDATE","CAMPAIGN"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["BUILDER","ORDERLY"],"description":"ORDERLY returns official posts; BUILDER returns approved community posts"},"required":false,"description":"ORDERLY returns official posts; BUILDER returns approved community posts","name":"publisher","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"brokerId","in":"query"}],"responses":{"200":{"description":"Cursor-paginated published blogposts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPublicListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Published revision is incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostRateLimitErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Blogpost database temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/public/v1/blogposts/{slug}":{"get":{"tags":["Blogposts - Public"],"summary":"Get a published blogpost","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":165,"pattern":"^[a-z0-9_-]*[a-z0-9]$"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"brokerId","in":"query"}],"responses":{"200":{"description":"Current approved blogpost revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPublicDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"404":{"description":"Blogpost not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"409":{"description":"Published revision is incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostRateLimitErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}},"503":{"description":"Blogpost database temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostErrorResponse"}}}}}}},"/api/graduation/graduate":{"post":{"tags":["Graduation"],"summary":"Pay graduation fee via x402 (agent-friendly)","description":"Pay the graduation fee using the x402 native HTTP payment protocol — designed for AI agents. No Bearer token, account, or manual transaction submission required for this step.\n\nFlow: send a POST. If payment is required, the server responds 402 with a `payment-required` response header (base64-encoded JSON) containing one payment option per accepted network: base (chainId 8453), arbitrum (chainId 42161), ethereum (chainId 1). Each option is an EIP-3009 (ERC-3009) USDC `transferWithAuthorization`. Pick any network whose USDC your wallet holds; an x402-aware client (e.g. `@x402/fetch`) signs the EIP-712 authorization and retries the request with a `payment-signature` header. On success the server settles the on-chain transfer and responds 200.\n\n**Single-fetch auto-finalization (recommended for agents):** include the `brokerId` and fee **query parameters** plus your `Authorization: Bearer` header on the same POST. The server validates them before charging (invalid parameters return 400 and the payment is canceled, nothing is paid), and once the payment settles it registers the broker automatically — no second call needed. Poll `GET /api/graduation/status` afterwards to confirm.\n\n**Two-step fallback:** omit the query parameters; after a 200, read the settlement transaction hash from the `PAYMENT-RESPONSE` response header (base64 JSON, field `.transaction`), then call `POST /api/graduation/verify-tx` with `{ txHash, chain: \"base\" | \"arbitrum\" | \"ethereum\", paymentType: \"usdc\", brokerId, makerFee, takerFee, rwaMakerFee, rwaTakerFee }` — using the chain you paid on.\n\nIf verification fails or graduation is not completed, the payment can be reclaimed via `POST /api/graduation/refund` (Bearer auth, same wallet as the payer) with the settlement transaction hash — the fee is returned on-chain.\n\n**After the payment** (either flow), one step remains to finish graduation: register your paying wallet as the broker's admin account — `POST /api/graduation/finalize-admin-wallet` documents the exact Orderly registration recipe. Poll `GET /api/graduation/graduation-status` until `isGraduated: true`.\n\n**Important:** without query parameters this endpoint requires no Bearer auth — the payment itself is the authentication. For auto-finalization the Bearer token is required, and the EIP-3009 payer wallet must be the same wallet that owns the Bearer-authenticated account.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"brokerId","in":"query","required":false,"description":"Desired broker ID. Supply together with all fee parameters and a Bearer token to auto-finalize graduation in this single request.","schema":{"type":"string","minLength":5,"maxLength":15,"pattern":"^[a-z0-9_-]+$"}},{"name":"makerFee","in":"query","required":false,"description":"Maker fee in bps (-0.5 to 15, 0.1 increments). Auto-finalization only.","schema":{"type":"number"}},{"name":"takerFee","in":"query","required":false,"description":"Taker fee in bps (1 to 15, 0.1 increments). Auto-finalization only.","schema":{"type":"number"}},{"name":"rwaMakerFee","in":"query","required":false,"description":"RWA maker fee in bps (-0.5 to 15, 0.1 increments). Auto-finalization only.","schema":{"type":"number"}},{"name":"rwaTakerFee","in":"query","required":false,"description":"RWA taker fee in bps (1 to 15, 0.1 increments). Auto-finalization only.","schema":{"type":"number"}}],"responses":{"200":{"description":"Payment received and settled on-chain. The settlement transaction hash is in the `PAYMENT-RESPONSE` response header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded JSON settlement result containing the on-chain transaction hash.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"}}}}}},"400":{"description":"Invalid auto-finalization parameters (bad brokerId/fees, missing Bearer token, payer mismatch, no DEX, already graduated, broker ID taken). The payment is canceled — nothing is charged.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"401":{"description":"Auto-finalization query parameters supplied without a valid Bearer token. The payment is canceled.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required. Payment requirements are in the `payment-required` response header (base64-encoded JSON). Retry the request with a `payment-signature` header containing the signed EIP-3009 authorization.","headers":{"payment-required":{"description":"Base64-encoded JSON PaymentRequired payload (`accepts[].amount` in atomic USDC units, `payTo`, `asset`, `network`).","schema":{"type":"string"}}}}}}}}}