{"openapi":"3.0.0","paths":{"/auth/signing-message":{"get":{"description":"Returns a signing message with a randomly generated nonce for authentication purposes.","operationId":"AuthController_getSigningMessage","parameters":[],"responses":{"200":{"description":"A signing message containing a nonce has been successfully generated","content":{"application/json":{"schema":{"type":"string","example":"Welcome to Limitless.exchange! Please sign this message to verify your identity.\n\nNonce: 0xa1b2c3d4e5f67890..."}}}}},"summary":"Get signing message","tags":["Authentication"]}},"/auth/verify-auth":{"get":{"description":"Verifies if the user is authenticated by checking the session cookie","operationId":"AuthController_verifyAuth","parameters":[],"responses":{"200":{"description":"User is authenticated","content":{"application/json":{"schema":{"type":"string","description":"Ethereum address of the authenticated user","example":"0x1234567890123456789012345678901234567890"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"The token cookie is required"}}}}}}},"security":[{"limitless_session":[]}],"summary":"Verify authentication","tags":["Authentication"]}},"/auth/login":{"post":{"description":"Authenticates a user with a signed message and creates a session","operationId":"AuthController_login","parameters":[{"name":"x-account","in":"header","description":"The Ethereum address of the user","required":true,"schema":{"type":"string"}},{"name":"x-signing-message","in":"header","description":"The signing message generated by the server","required":true,"schema":{"type":"string"}},{"name":"x-signature","in":"header","description":"The signature generated by signing the message with the user's wallet","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"200":{"description":"User has been successfully logged in and a session cookie has been set","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","example":"0x1234567890123456789012345678901234567890"},"displayName":{"type":"string","example":"0x1234...7890"},"smartWallet":{"type":"string","nullable":true,"example":"0x0987654321098765432109876543210987654321"},"client":{"type":"string","example":"eoa"}}}}}},"400":{"description":"Bad request (missing or invalid parameters)","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Smart wallet is required"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Error creating JWT token"}}}}}}},"summary":"User login","tags":["Authentication"]}},"/auth/logout":{"post":{"description":"Logs out the user by clearing the session cookie","operationId":"AuthController_logout","parameters":[],"responses":{"200":{"description":"User has been successfully logged out","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Logged out successfully"}}}}}}},"security":[{"limitless_session":[]}],"summary":"User logout","tags":["Authentication"]}},"/amm/allowances/check":{"post":{"operationId":"AmmTradingController_checkAllowance","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmAllowanceRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmAllowanceResponseDto"}}}},"403":{"description":"Missing scopes or unauthorized target profile"}},"security":[{"limitless_session":[]}],"summary":"Check one server wallet allowance for a specific AMM","tags":["Trading"]}},"/amm/allowances/approve":{"post":{"operationId":"AmmTradingController_approveAllowance","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmAllowanceRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmAllowanceResponseDto"}}}},"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmAllowanceResponseDto"}}}},"403":{"description":"Missing scopes or unauthorized target profile"}},"security":[{"limitless_session":[]}],"summary":"Submit one server wallet approval for a specific AMM","tags":["Trading"]}},"/amm/buy":{"post":{"operationId":"AmmTradingController_buy","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmBuyRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmBuySubmittedResponseDto"}}}},"403":{"description":"Missing scopes or unauthorized target profile"},"409":{"description":"Market closed, duplicate operation, or key conflict"},"422":{"description":"Insufficient balance or invalid quote"}},"security":[{"limitless_session":[]}],"summary":"Buy outcome tokens on an AMM with a server-managed wallet","tags":["Trading"]}},"/amm/sell":{"post":{"operationId":"AmmTradingController_sell","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmSellRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmmSellSubmittedResponseDto"}}}},"403":{"description":"Missing scopes or unauthorized target profile"},"409":{"description":"Market closed, duplicate operation, or key conflict"},"422":{"description":"Insufficient balance or invalid quote"}},"security":[{"limitless_session":[]}],"summary":"Sell outcome tokens on an AMM with a server-managed wallet","tags":["Trading"]}},"/markets/active/{categoryId}":{"get":{"description":"Retrieves markets and groups that are active and not yet resolved, with optional category filtering","operationId":"MarketController_getActiveMarkets[0]","parameters":[{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by query parameter","schema":{"$ref":"#/components/schemas/Object"}},{"name":"tradeType","required":false,"in":"query","description":"Filter by trade type (amm, clob, or group)","schema":{"enum":["amm","clob","group"],"type":"string"}},{"name":"automationType","required":false,"in":"query","description":"Filter by automation type (manual, lumy, or sports)","schema":{"enum":["manual","lumy","sports"],"type":"string"}},{"name":"includeNextMarket","required":false,"in":"query","description":"Include upfront-scheduled successor navigation","schema":{"type":"boolean"}},{"name":"categoryId","required":false,"in":"path","description":"Filter markets by category ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Active markets and groups with volume and liquidity data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseActiveMarketsResponseDto"}}}},"500":{"description":"Server error when retrieving markets data"}},"summary":"Browse Active Markets","tags":["Markets"]}},"/markets/active":{"get":{"description":"Retrieves markets and groups that are active and not yet resolved, with optional category filtering","operationId":"MarketController_getActiveMarkets[1]","parameters":[{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by query parameter","schema":{"$ref":"#/components/schemas/Object"}},{"name":"tradeType","required":false,"in":"query","description":"Filter by trade type (amm, clob, or group)","schema":{"enum":["amm","clob","group"],"type":"string"}},{"name":"automationType","required":false,"in":"query","description":"Filter by automation type (manual, lumy, or sports)","schema":{"enum":["manual","lumy","sports"],"type":"string"}},{"name":"includeNextMarket","required":false,"in":"query","description":"Include upfront-scheduled successor navigation","schema":{"type":"boolean"}},{"name":"categoryId","required":false,"in":"path","description":"Filter markets by category ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Active markets and groups with volume and liquidity data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowseActiveMarketsResponseDto"}}}},"500":{"description":"Server error when retrieving markets data"}},"summary":"Browse Active Markets","tags":["Markets"]}},"/markets/categories/count":{"get":{"description":"Returns the number of active markets for each category and the total market count","operationId":"MarketController_getActiveMarketCountPerCategory","parameters":[],"responses":{"200":{"description":"Object containing category counts and total count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCountResponseDto"}}}},"500":{"description":"Server error when retrieving category count data"}},"summary":"Get active market count per category","tags":["Markets"]}},"/markets/active/slugs":{"get":{"description":"Retrieves slugs, strike prices, tickers, and deadlines for all active markets and groups. Group markets are nested under their parent group.","operationId":"MarketController_getActiveSlugs","parameters":[],"responses":{"200":{"description":"List of active market and group slugs with metadata","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Market slug identifier","example":"btc-price-prediction-2024"},"strikePrice":{"type":"string","nullable":true,"description":"Strike price extracted from market title","example":"50000"},"ticker":{"type":"string","nullable":true,"description":"Asset ticker symbol","example":"BTC"},"deadline":{"type":"string","nullable":true,"format":"date-time","description":"Market expiration deadline","example":"2024-12-31T23:59:59Z"}},"required":["slug"],"description":"Individual market entry"},{"type":"object","properties":{"slug":{"type":"string","description":"Group slug identifier","example":"crypto-predictions-2024"},"strikePrice":{"type":"null","description":"Groups do not have strike prices"},"ticker":{"type":"string","description":"Group asset ticker symbol","example":"USDC"},"deadline":{"type":"string","nullable":true,"format":"date-time","description":"Group expiration deadline","example":"2024-12-31T23:59:59Z"},"markets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Market slug within the group","example":"btc-50k-prediction"}},"required":["slug"]},"description":"Array of markets within this group"}},"required":["slug","deadline","markets"],"description":"Group entry with nested markets"}]}}}}},"500":{"description":"Server error when retrieving market slugs"}},"summary":"Get active market slugs with metadata","tags":["Markets"]}},"/markets/{addressOrSlug}/oracle-candles":{"get":{"description":"Returns Chainlink candlestick data for markets configured with Chainlink Data Streams chart metadata.","operationId":"MarketController_getOracleCandles","parameters":[{"name":"from","required":false,"in":"query","description":"Start timestamp (UNIX seconds). Defaults to market.createdAt - 15 minutes.","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"End timestamp (UNIX seconds). Defaults to now.","schema":{"type":"number"}},{"name":"interval","required":false,"in":"query","description":"Candlestick interval","schema":{"enum":["1m","5m","15m","1h","4h","1d"],"type":"string"}},{"name":"addressOrSlug","required":true,"in":"path","description":"Market address (0x...) or slug identifier","schema":{}}],"responses":{"200":{"description":""}},"summary":"Get underlying oracle candlesticks for market charting","tags":["Markets"]}},"/markets/{slug}/timeline":{"get":{"description":"Returns anchor/current/next/batch timeline slots for a market slug","operationId":"MarketController_getTimeline","parameters":[{"name":"before","required":false,"in":"query","schema":{"example":1,"type":"number"}},{"name":"after","required":false,"in":"query","schema":{"example":24,"type":"number"}},{"name":"slug","required":true,"in":"path","description":"Market slug","schema":{"example":"btc-5m-1771934700"}}],"responses":{"200":{"description":""}},"summary":"Get market timeline","tags":["Markets"]}},"/markets/timeline":{"get":{"description":"Returns past/future market slots for a symbol+frequency combo, anchored on current time","operationId":"MarketController_getTimelineBySymbol","parameters":[{"name":"symbol","required":true,"in":"query","schema":{"example":"BTC","type":"string"}},{"name":"frequency","required":true,"in":"query","schema":{"enum":["daily","hourly","minutely","weekly"],"type":"string"}},{"name":"subFrequency","required":false,"in":"query","schema":{"enum":["hours_1","hours_2","hours_3","hours_4","hours_5","hours_6","minutes_1","minutes_10","minutes_15","minutes_20","minutes_25","minutes_30","minutes_35","minutes_40","minutes_45","minutes_5","minutes_50","minutes_55"],"type":"string"}},{"name":"before","required":false,"in":"query","schema":{"example":10,"type":"number"}},{"name":"after","required":false,"in":"query","schema":{"example":10,"type":"number"}}],"responses":{"200":{"description":""}},"summary":"Get market timeline by ticker and duration","tags":["Markets"]}},"/markets/stable/{slug}":{"get":{"description":"Resolves a stable recurring URL slug to the current active market or ladder group","operationId":"MarketController_findByStableSlug","parameters":[{"name":"slug","required":true,"in":"path","description":"Stable slug identifier (e.g. btc-hourly-price)","schema":{"example":"btc-hourly-price","type":"string"}},{"name":"include","required":false,"in":"query","description":"Comma-separated extras: `timelinePreview`, `nextMarket`. Any value wraps the response in the `MarketDetailsEnvelopeDto` envelope (`{ market, navigation?, timelinePreview? }`).","schema":{"example":"timelinePreview,nextMarket","type":"string"}}],"responses":{"200":{"description":"Resolved market or group data (single market or ladder group)","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StandaloneClobMarketResponseDto","description":"CLOB market with position IDs and trading data"},{"$ref":"#/components/schemas/NegRiskGroupResponseDto","description":"NegRisk group with nested markets array"},{"$ref":"#/components/schemas/AmmMarketResponseDto","description":"AMM market with liquidity and volume data"},{"$ref":"#/components/schemas/MarketDetailsEnvelopeDto","description":"Envelope returned when `include` is non-empty"}]}}}},"404":{"description":"No market or group found for the given stable slug"}},"summary":"Resolve Stable Slug","tags":["Markets"]}},"/markets/{addressOrSlug}":{"get":{"description":"Retrieves market or group data using either an Ethereum address or a slug identifier","operationId":"MarketController_find","parameters":[{"name":"include","required":false,"in":"query","description":"Comma-separated extras: `timelinePreview`, `nextMarket`. Any value wraps the response in the `MarketDetailsEnvelopeDto` envelope (`{ market, navigation?, timelinePreview? }`).","schema":{"example":"timelinePreview,nextMarket","type":"string"}},{"name":"addressOrSlug","required":true,"in":"path","description":"Market/group address (0x...) or slug identifier (my-market-name)","schema":{"example":"crypto-predictions-2025"}}],"responses":{"200":{"description":"Market or group details with pricing and volume data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StandaloneClobMarketResponseDto","description":"CLOB market with position IDs and trading data"},{"$ref":"#/components/schemas/NegRiskGroupResponseDto","description":"NegRisk group with nested markets array"},{"$ref":"#/components/schemas/AmmMarketResponseDto","description":"AMM market with liquidity and volume data"},{"$ref":"#/components/schemas/MarketDetailsEnvelopeDto","description":"Envelope returned when `include` is non-empty"}]}}}},"404":{"description":"Market or group not found"},"500":{"description":"Server error when retrieving market/group data"}},"summary":"Get Market Details","tags":["Markets"]}},"/markets/{slug}/get-feed-events":{"get":{"description":"Retrieves the latest feed events related to a specific market with pagination support","operationId":"MarketController_getFeedEvent","parameters":[{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of events per page","schema":{"example":10,"type":"number"}},{"name":"slug","required":false,"in":"path","description":"Slug of the market","schema":{"example":"my-market-slug-123"}}],"responses":{"200":{"description":"List of feed events for the market","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedEventsResponseDto"}}}},"500":{"description":"Server error when retrieving feed events"}},"security":[{"bearer":[]}],"summary":"Get feed events for a market","tags":["Markets"]}},"/markets/{slug}/post-trade-recommendations":{"get":{"operationId":"PostTradeRecommendationController_getRecommendations","parameters":[{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTradeRecommendationResponseDto"}}}}},"summary":"Post-trade rail recommendations for a market detail page","tags":["Markets"]}},"/markets/{slug}/historical-price":{"get":{"description":"Retrieve newest-first historical YES-price data for an exact market slug or all visible children of a group slug. Interval values are lookback presets, not custom date bounds.","operationId":"MarketOrderbookController_getHistoricalPrice","parameters":[{"name":"interval","required":false,"in":"query","description":"Lookback preset. `1m` means one month (30 days). Defaults to `1d`.","schema":{"type":"string","default":"1d","example":"1d","enum":["5m","1h","6h","1d","1w","1m","all"]}},{"name":"slug","required":true,"in":"path","description":"Market slug identifier","schema":{"example":"presidential-election-2024"}}],"responses":{"200":{"description":"One series for an exact market slug, or an array of visible child series for a group slug","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HistoricalPriceSeries"},{"type":"array","description":"Visible child series for a group slug. Every series reports the group status; child ordering is not guaranteed.","items":{"$ref":"#/components/schemas/HistoricalPriceSeries"}}]}}}},"404":{"description":"Neither an exact market nor a visible group has the slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"500":{"description":"Historical price lookup failed unexpectedly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"summary":"Get Historical Prices","tags":["Trading"]}},"/markets/{slug}/orderbook":{"get":{"description":"Retrieve the current LIVE GTC YES-side order book for one exact active CLOB market slug. The separately produced last mined trade price may be null without failing the request.","operationId":"MarketOrderbookController_getOrderbook","parameters":[{"name":"slug","required":true,"in":"path","description":"Market slug identifier","schema":{"example":"presidential-election-2024"}}],"responses":{"200":{"description":"Current orderbook with bids and asks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketOrderbookResponse"}}}},"400":{"description":"The market is an AMM or its CLOB status is not CREATED or FUNDED","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","enum":["Market is not active","Market does not support orderbook (AMM market)"]}},"required":["message"]}}}},"404":{"description":"No exact market has the slug; group slugs are not aggregated","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","enum":["Market not found"]}},"required":["message"]}}}},"500":{"description":"Orderbook lookup failed unexpectedly; a last trade price lookup failure instead returns 200 with lastTradePrice null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"summary":"Get Orderbook","tags":["Trading"]}},"/markets/{slug}/user-orders":{"get":{"description":"Returns a bare, newest-first array of the effective profile's orders for one exact market slug. Omitted statuses default to LIVE. Partner HMAC tokens with `delegated_signing` may select an owned sub-account with `x-on-behalf-of`.","operationId":"MarketOrderbookController_getUserOrders","parameters":[{"name":"statuses","required":false,"in":"query","description":"Repeat to filter by one or more statuses. Values are case-insensitive and normalized to uppercase. Defaults to LIVE when omitted.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["LIVE","MATCHED","CANCELED","UNMATCHED"]}}},{"name":"limit","required":false,"in":"query","description":"Maximum newest orders to return. Must be 1–200 when supplied.","schema":{"type":"integer","minimum":1,"maximum":200,"example":100}},{"name":"slug","required":true,"in":"path","description":"Exact market slug. Group slugs and stable-slug aliases are not resolved.","schema":{"type":"string","example":"presidential-election-2024"}},{"name":"x-on-behalf-of","in":"header","description":"Managed sub-account profile ID. Requires an HMAC token with `delegated_signing` and a partner relationship with the target.","required":false,"schema":{"type":"integer","minimum":1,"maximum":2147483647,"example":326}}],"responses":{"200":{"description":"Bare newest-first array; an existing market with no matching orders returns `[]`","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserOrder"}}}}},"400":{"description":"Invalid slug/query parameter, unknown query field, or malformed delegation header","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Delegation lacks `delegated_signing` or the target is not owned by the partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"404":{"description":"Exact market slug or effective profile was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"500":{"description":"User-order lookup failed unexpectedly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"User Orders","tags":["Trading"]}},"/markets/{slug}/events":{"get":{"description":"Returns public, finalized MINED CLOB trades newest first. An exact market slug selects that market; if no market matches, an exact group slug combines all group markets. Stable-slug aliases are not resolved. No authentication is required.","operationId":"MarketOrderbookController_getMarketEvents","parameters":[{"name":"page","required":false,"in":"query","description":"One-based page number. Defaults to 1.","schema":{"type":"integer","minimum":1,"default":1,"example":1}},{"name":"limit","required":false,"in":"query","description":"Maximum trades per page. Defaults to 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"example":20}},{"name":"slug","required":true,"in":"path","description":"Exact market or market-group slug. Market lookup takes precedence; stable-slug aliases are not resolved.","schema":{"type":"string","example":"presidential-election-2024"}}],"responses":{"200":{"description":"Finalized CLOB trade page. A page with no events currently returns only `events` and `totalPages`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MarketEventsResponse"},{"$ref":"#/components/schemas/EmptyMarketEventsResponse"}]}}}},"400":{"description":"Invalid or unknown query parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Slug matches neither an exact market nor an exact market group. This response is publicly cacheable for 5 minutes with a further 5-minute stale-while-revalidate window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"500":{"description":"Market trade activity lookup failed unexpectedly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[],"summary":"Get Finalized Market Trades","tags":["Trading"]}},"/markets/search":{"get":{"operationId":"MarketSearchController_search","parameters":[{"name":"query","required":true,"in":"query","description":"Search query text","schema":{"example":"Sports betting markets with high odds","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of results to return","schema":{"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Number of page","schema":{"default":1,"example":0,"type":"number"}},{"name":"similarityThreshold","required":false,"in":"query","description":"Minimum similarity score (0-1)","schema":{"default":0.5,"example":0.5,"type":"number"}},{"name":"includeNextMarket","required":false,"in":"query","description":"Include upfront-scheduled successor navigation","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Returns markets matching the search query"},"400":{"description":"Invalid request parameters"},"500":{"description":"Internal server error"}},"summary":"Search for markets based on semantic similarity","tags":["Markets"]}},"/profiles/search":{"get":{"description":"Top-N, no pagination. Exact and prefix matching, plus mid-string matching over the usernames of profiles that have traded when the earlier stages have not filled the page. No fuzzy matching: a typo does not find the profile it was meant to. Results are ordered by match quality first — exact username, then username prefix, then X handle — then by whether the profile has traded, and within that by followers and traded volume. Queries shorter than two characters after trimming return an empty list.","operationId":"ProfileSearchController_search","parameters":[{"name":"query","required":true,"in":"query","description":"Free-text query. Matched case-insensitively against the username, the connected X handle, and, for queries that look like hex, the wallet addresses. Usernames of profiles that have traded also match mid-string, when the query holds three consecutive letters or digits and the exact and prefix stages have not filled the page. A leading `@` marks the query as a handle: it is stripped before matching, keeps the query out of wallet mode entirely, and ranks handle matches above username matches. Shorter than two characters after trimming returns an empty list.","schema":{"maxLength":100,"example":"ketchum","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":20,"default":5,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchProfilesResponseDto"}}}}},"summary":"Search users by wallet address, username, or connected X handle","tags":["profiles"]}},"/profiles/social":{"get":{"description":"Backs the People tab before anything is typed. Ranked by follower count; machine accounts are excluded, and the response carries the same badges search results do.","operationId":"ProfileSearchController_social","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":20,"default":10,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchProfilesResponseDto"}}}}},"summary":"The most-followed profiles","tags":["profiles"]}},"/profiles/partner-accounts/{profileId}/allowances":{"get":{"operationId":"PartnerAccountAllowanceController_getPartnerAccountAllowances","parameters":[{"name":"profileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get server-wallet allowance readiness for a partner subaccount","tags":["PartnerAccountAllowance"]}},"/profiles/partner-accounts/{profileId}/allowances/retry":{"post":{"operationId":"PartnerAccountAllowanceController_retryPartnerAccountAllowances","parameters":[{"name":"profileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Retry missing server-wallet approvals for a partner subaccount","tags":["PartnerAccountAllowance"]}},"/portfolio/trades":{"get":{"description":"Retrieve all trades executed by the authenticated user","operationId":"PortfolioController_getTrades","parameters":[],"responses":{"200":{"description":"List of user trades with details","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get Trades","tags":["Portfolio"]}},"/portfolio/positions":{"get":{"description":"Retrieve all active positions with P&L calculations and market values. Partner API tokens with `delegated_signing` scope may read a sub-account by sending the `x-on-behalf-of: <profileId>` header.","operationId":"PortfolioController_getPositions","parameters":[],"responses":{"200":{"description":"Complete portfolio positions with summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPositionsDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get Positions","tags":["Portfolio"]}},"/portfolio/pnl-chart":{"get":{"description":"Realised PnL series and current realised snapshot","operationId":"PortfolioController_getPnlChart","parameters":[{"name":"timeframe","required":false,"in":"query","description":"Timeframe window for percent change and chart series","schema":{"example":"7d","type":"string"}}],"responses":{"200":{"description":"PnL chart data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPnlChartDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get portfolio PnL chart","tags":["Portfolio"]}},"/portfolio/history":{"get":{"description":"Paginated history including AMM, CLOB trades, splits/merges, NegRisk conversions. Partner API tokens with `delegated_signing` scope may read a sub-account by sending the `x-on-behalf-of: <profileId>` header.","operationId":"PortfolioController_getHistory","parameters":[{"name":"cursor","required":false,"in":"query","description":"Opaque cursor for cursor-based pagination. Omit for first page.","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","description":"Market slug. When set, only history for that market is returned. Cursors are only valid together with the same market value they were issued for.","schema":{"type":"string"}},{"name":"limit","required":true,"in":"query","description":"Number of items per page","schema":{"example":20,"type":"number"}}],"responses":{"200":{"description":"Paginated history of all user actions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponseDto"}}}},"400":{"description":"Invalid pagination parameters"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get History","tags":["Portfolio"]}},"/portfolio/points":{"get":{"operationId":"PortfolioController_getPointsBreakdown","parameters":[],"responses":{"200":{"description":"Points breakdown"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get points breakdown","tags":["Portfolio"]}},"/portfolio/{account}/traded-volume":{"get":{"description":"Get total traded volume and statistics for a specific user","operationId":"PublicPortfolioController_tradedVolume","parameters":[{"name":"account","required":true,"in":"path","description":"User Ethereum address","schema":{"example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","type":"string"}}],"responses":{"200":{"description":"User trading volume statistics","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid Ethereum address"}},"summary":"User Total Volume","tags":["Public Portfolio"]}},"/portfolio/{account}/positions":{"get":{"description":"Retrieve all positions for a specific user address","operationId":"PublicPortfolioController_getPositions","parameters":[{"name":"account","required":true,"in":"path","description":"User Ethereum address","schema":{"example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","type":"string"}}],"responses":{"200":{"description":"Complete list of user positions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPositionsDto"}}}},"400":{"description":"Invalid Ethereum address"}},"summary":"Get All User Positions","tags":["Public Portfolio"]}},"/portfolio/{account}/pnl-chart":{"get":{"deprecated":true,"description":"Deprecated legacy aggregate realised-PnL series and current realised snapshot. Use /portfolio/:account/realized-pnl for public profile PnL.","operationId":"PublicPortfolioController_getPnlChart","parameters":[{"name":"account","required":true,"in":"path","description":"User Ethereum address","schema":{"example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","type":"string"}},{"name":"timeframe","required":false,"in":"query","description":"Timeframe window for percent change and chart series","schema":{"example":"7d","type":"string"}}],"responses":{"200":{"description":"PnL chart data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPnlChartDto"}}}},"400":{"description":"Invalid Ethereum address"},"404":{"description":"User not found"},"503":{"description":"Portfolio PnL is temporarily disabled"}},"summary":"Get portfolio PnL chart (public)","tags":["Public Portfolio"]}},"/portfolio/{account}/realized-pnl":{"get":{"description":"Projected realised PnL timeline. 1d, 1w, and 1m keep five-minute input with category grouping; all reads permanent hourly history without category breakdown.","operationId":"PublicPortfolioController_getRealizedPnl","parameters":[{"name":"account","required":true,"in":"path","description":"User Ethereum address","schema":{"example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","type":"string"}},{"name":"timeframe","required":false,"in":"query","description":"Best-effort realised PnL window. 1d, 1w, and 1m use closed five-minute buckets; all uses permanent hourly history.","schema":{"default":"1w","type":"string","enum":["all","1d","1m","1w"]}}],"responses":{"200":{"description":"Realized PnL timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPnlProfileDto"}}}},"400":{"description":"Invalid Ethereum address or timeframe"},"404":{"description":"User not found"},"503":{"description":"Portfolio PnL is temporarily disabled"}},"summary":"Get public profile realized PnL","tags":["Public Portfolio"]}},"/portfolio/{account}/history":{"get":{"description":"Retrieve trading history for a specific user with cursor-based pagination","operationId":"PublicPortfolioController_getHistory","parameters":[{"name":"account","required":true,"in":"path","description":"User Ethereum address","schema":{"example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor for cursor-based pagination. Omit for first page.","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","description":"Market slug. When set, only history for that market is returned. Cursors are only valid together with the same market value they were issued for.","schema":{"type":"string"}},{"name":"limit","required":true,"in":"query","description":"Number of items per page","schema":{"example":20,"type":"number"}}],"responses":{"200":{"description":"User history page","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid Ethereum address"},"404":{"description":"User not found"}},"summary":"Get user history (public)","tags":["Public Portfolio"]}},"/portfolio/trading/allowance":{"get":{"description":"Check USDC allowance for CLOB or NegRisk trading contracts","operationId":"TradingPortfolioController_getAllowance","parameters":[{"name":"spender","required":false,"in":"query","description":"Optional spender address override (e.g., venue exchange address)","schema":{"type":"string"}},{"name":"type","required":true,"in":"query","description":"Trading type: CLOB or NegRisk","schema":{"enum":["clob","negrisk"],"type":"string"}}],"responses":{"200":{"description":"User allowance information","content":{"application/json":{"schema":{"type":"object","properties":{"allowance":{"type":"string","example":"1000000000000"},"hasMinimumAllowance":{"type":"boolean","example":true},"type":{"type":"string","enum":["clob","negrisk"],"example":"clob"},"spender":{"type":"string","example":"0x..."},"checkedAddress":{"type":"string","example":"0x..."}}}}}},"400":{"description":"Invalid type parameter"},"401":{"description":"Unauthorized"},"404":{"description":"Profile not found"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get User Trading Allowance","tags":["Portfolio"]}},"/portfolio/redeem":{"post":{"description":"Submit an on-chain redeemPositions transaction for a resolved market. Server-managed wallets only. Use onBehalfOf for partner sub-accounts.","operationId":"PortfolioServerWalletController_redeemPositions","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemPositionsDto"}}}},"responses":{"200":{"description":"Redemption transaction submitted"},"400":{"description":"Market not resolved or no balance"},"401":{"description":"Unauthorized"},"403":{"description":"No server wallet or insufficient scopes"},"404":{"description":"Market not found"},"409":{"description":"Operation already in progress"}},"security":[{"limitless_session":[]}],"summary":"Redeem resolved positions","tags":["Portfolio"]}},"/portfolio/withdraw":{"post":{"description":"Transfer ERC20 tokens from a managed sub-account server wallet to the partner's own address. Requires \"withdrawal\" scope. Destination must be the authenticated account, smart wallet, or a whitelisted withdrawal address. When destination is omitted, Etherspot profiles withdraw to their smart wallet if one exists. When onBehalfOf is set, the whitelist used is the authenticated caller's whitelist, not the target sub-account's.","operationId":"PortfolioServerWalletController_withdraw","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawDto"}}}},"responses":{"200":{"description":"Withdrawal transaction submitted"},"400":{"description":"Insufficient balance or invalid amount"},"401":{"description":"Unauthorized"},"403":{"description":"No server wallet, missing scope, or unauthorized"},"409":{"description":"Operation already in progress"}},"security":[{"limitless_session":[]}],"summary":"Withdraw tokens from server wallet","tags":["Portfolio"]}},"/portfolio/split":{"post":{"description":"Submit an on-chain splitPosition transaction (USDC -> full set of outcome tokens). Pass venue from the market response: venue.exchange for simple/CLOB markets, venue.adapter for NegRisk markets. Single on-chain tx: required collateral allowances are provisioned ahead of time on the server wallet, so none is submitted here. Server-managed wallets only. Use onBehalfOf for partner sub-accounts.","operationId":"PortfolioServerWalletController_split","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionOperationDto"}}}},"responses":{"200":{"description":"Split transaction submitted"},"400":{"description":"Invalid amount, conditionId, or adapter address"},"401":{"description":"Unauthorized"},"403":{"description":"No server wallet or insufficient scopes"},"409":{"description":"Operation already in progress"}},"security":[{"limitless_session":[]}],"summary":"Split collateral into a full outcome set","tags":["Portfolio"]}},"/portfolio/merge":{"post":{"description":"Submit an on-chain mergePositions transaction (full set of outcome tokens -> USDC). Pass venue from the market response: venue.exchange for simple/CLOB markets, venue.adapter for NegRisk markets. Single on-chain tx: the NegRiskAdapter ERC-1155 approval is provisioned ahead of time on the server wallet, so none is submitted here. Server-managed wallets only. Use onBehalfOf for partner sub-accounts.","operationId":"PortfolioServerWalletController_merge","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionOperationDto"}}}},"responses":{"200":{"description":"Merge transaction submitted"},"400":{"description":"Invalid amount, conditionId, or adapter address"},"401":{"description":"Unauthorized"},"403":{"description":"No server wallet or insufficient scopes"},"409":{"description":"Operation already in progress"}},"security":[{"limitless_session":[]}],"summary":"Merge a full outcome set back into collateral","tags":["Portfolio"]}},"/portfolio/withdrawal-addresses":{"post":{"description":"Add an external withdrawal destination address. Only Privy-authenticated users can manage this list.","operationId":"PortfolioServerWalletController_addWithdrawalAddress","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWithdrawalAddressDto"}}}},"responses":{"201":{"description":"Withdrawal address added"},"400":{"description":"Invalid destination address"},"401":{"description":"Unauthorized"},"403":{"description":"Privy authentication required"}},"security":[{"limitless_session":[]}],"summary":"Add withdrawal address","tags":["Portfolio"]}},"/portfolio/withdrawal-addresses/{address}":{"delete":{"description":"Soft-delete an external withdrawal destination address by address. Only Privy-authenticated users can manage this list.","operationId":"PortfolioServerWalletController_deleteWithdrawalAddress","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Withdrawal address deleted"},"400":{"description":"Invalid withdrawal address"},"401":{"description":"Unauthorized"},"403":{"description":"Privy authentication required"},"404":{"description":"Withdrawal address not found"}},"security":[{"limitless_session":[]}],"summary":"Delete withdrawal address","tags":["Portfolio"]}},"/portfolio/fee-earnings/summary":{"get":{"description":"USDC earnings totals for Cashback, Referral, Share Fees, Maker Rebates, and Creator Fees over the last 30 days.","operationId":"PortfolioFeeEarningsController_getSummary","parameters":[],"responses":{"200":{"description":"Fee earnings summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEarningsSummaryDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get authenticated user fee earnings summary","tags":["Portfolio"]}},"/portfolio/fee-earnings/history":{"get":{"description":"Cursor-paginated USDC fee earning accruals and paid payout items, newest first.","operationId":"PortfolioFeeEarningsController_getHistory","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous fee earnings history page.","schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"description":"Fee earnings history page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEarningsHistoryDto"}}}},"400":{"description":"Invalid pagination parameters"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]},{"limitless_session":[]}],"summary":"Get authenticated user fee earnings history","tags":["Portfolio"]}},"/ugm/custom/config":{"get":{"operationId":"UgmCustomController_getConfig","parameters":[],"responses":{"200":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/markets/{marketId}/avatar":{"put":{"operationId":"UgmCustomController_updateMarketAvatar","parameters":[],"responses":{"200":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/can-create":{"get":{"operationId":"UgmCustomController_getCanCreate","parameters":[],"responses":{"200":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/moderate-content":{"post":{"operationId":"UgmCustomController_moderateContent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerateCustomMarketContentDto"}}}},"responses":{"201":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/prepare-market":{"post":{"operationId":"UgmCustomController_prepareMarket","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareCustomMarketDto"}}}},"responses":{"201":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/markets":{"post":{"operationId":"UgmCustomController_createMarket","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomMarketDto"}}}},"responses":{"201":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/markets/by-tx/{txHash}":{"get":{"operationId":"UgmCustomController_getMarketByTx","parameters":[],"responses":{"200":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/markets/{marketId}/settlement-plan":{"get":{"operationId":"UgmCustomController_getSettlementPlan","parameters":[],"responses":{"200":{"description":""}},"tags":["UGM Custom"]}},"/ugm/custom/markets/{marketId}/resolve":{"post":{"operationId":"UgmCustomController_resolveMarket","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveCustomMarketDto"}}}},"responses":{"201":{"description":""}},"tags":["UGM Custom"]}},"/clob-share-fee/share-rate":{"get":{"operationId":"ClobShareFeeController_getShareRate","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClobShareFeeRateResponseDto"}}}}},"summary":"Get the current CLOB share fee percentage after referral and creator deductions","tags":["CLOB share fees"]}},"/orders/cancel-replace":{"post":{"operationId":"OrderController_cancelReplace","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceDto"}}}},"responses":{"200":{"description":"Cancellation and replacement both succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceResponseDto"}}}},"400":{"description":"Request validation or cancel-replace preflight failed before mutation","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/FeeRateMismatchErrorResponse"}]}}}},"401":{"description":"Authentication or cancellation authorization failed before mutation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Required scope, delegated target authorization, or replacement ownership check failed","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"Replacement market or profile was not found during preflight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"409":{"description":"Cancellation or replacement did not succeed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceResponseDto"}}}},"425":{"description":"Request-wide receive-window or maintenance-mode preflight failure before cancellation","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/TradingModeErrorResponse"}]}}}},"500":{"description":"Unexpected request-wide server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel an order and place a replacement non-atomically","tags":["Trading"]}},"/orders/cancel-replace/batch":{"post":{"operationId":"OrderController_cancelReplaceBatch","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceBatchDto"}}}},"responses":{"200":{"description":"Every operation succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceBatchResponseDto"}}}},"207":{"description":"At least one operation did not succeed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReplaceBatchResponseDto"}}}},"400":{"description":"Request validation or any operation preflight failed before mutation","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/FeeRateMismatchErrorResponse"}]}}}},"401":{"description":"Authentication or cancellation authorization failed before mutation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Required scope, delegated target authorization, or replacement ownership check failed","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"A replacement market or profile was not found during preflight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"425":{"description":"Request-wide receive-window or maintenance-mode preflight failure before any cancellation","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/TradingModeErrorResponse"}]}}}},"500":{"description":"Unexpected request-wide server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel and replace orders sequentially and non-atomically","tags":["Trading"]}},"/orders":{"post":{"description":"Creates a buy/sell order for prediction market positions. Requires signed order data.","operationId":"OrderController_createOrder","parameters":[],"requestBody":{"required":true,"description":"Order creation data including signature and order parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"responses":{"201":{"description":"Order accepted. It may be resting, delayed, matched, settled, canceled by STP, or accepted with a settlement failure reported in execution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"400":{"description":"Validation, signature, ownership, amount, balance, allowance, market, delegated-signing, or matching-engine rejection","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/FeeRateMismatchErrorResponse"}]}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading scope or unauthorized onBehalfOf target","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}},"409":{"description":"clientOrderId already exists or is being processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"425":{"description":"Receive-window check failed, or order creation is temporarily blocked by maintenance mode. Use the response body to distinguish `reason` (receive-window) from `code` (maintenance).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/TradingModeErrorResponse"}]}}}},"500":{"description":"Unexpected order-creation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Create Order","tags":["Trading"]}},"/v2/orders":{"post":{"description":"Returns a compact placement result without waiting for settlement.","operationId":"OrderController_createAsyncOrder_v2","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"responses":{"201":{"description":"Order accepted by the API; delayed orders are pending OME submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncOrderResponseDto"}}}},"400":{"description":"Order rejected by the API or definitively rejected by OME","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AsyncOrderRejectionResponseDto"},{"$ref":"#/components/schemas/FeeRateMismatchErrorResponse"}]}}}},"409":{"description":"Order conflicts with an existing submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncOrderRejectionResponseDto"}}}},"500":{"description":"OME or durable-admission outcome is unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncOrderUnknownResponseDto"}}}}},"security":[{"HmacAuth":[]}],"summary":"Create Order Without Waiting for Settlement","tags":["Trading"]}},"/v2/orders/status/{id}":{"get":{"operationId":"OrderController_getAsyncOrderStatus_v2","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","maxLength":128},"description":"Internal orderId or client-provided clientOrderId. An owned internal UUID takes precedence."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncOrderStatusResponseDto"}}}},"404":{"description":"Order is missing or is not owned by the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"500":{"description":"Order status lookup failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Get Async Order Status","tags":["Trading"]}},"/orders/status/batch":{"post":{"description":"Fetches historical order statuses for multiple orders by internal order IDs and/or client-provided order IDs. Partner API tokens with `delegated_signing` scope may read a sub-account by sending the `x-on-behalf-of: <profileId>` header.","operationId":"OrderController_getOrderStatusBatch","parameters":[{"name":"x-on-behalf-of","in":"header","description":"Managed sub-account profile ID. Requires an HMAC token with `delegated_signing` and a partner relationship with the target.","required":false,"schema":{"type":"integer","minimum":1,"maximum":2147483647,"example":326}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchOrderStatusRequestDto"}}}},"responses":{"200":{"description":"Batch order statuses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchOrderStatusResponseDto"}}}},"400":{"description":"Whole-request validation failure, malformed delegation header, or unresolved authenticated profile","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/ErrorMessageResponse"}]}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Delegation lacks delegated_signing or the target is not owned by the partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"500":{"description":"Unexpected historical-status lookup failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Get Order Status Batch","tags":["Trading"]}},"/orders/cancel":{"post":{"description":"Cancel an open order by either internal orderId or client-provided clientOrderId.","operationId":"OrderController_cancelOrderCombined","parameters":[{"name":"onBehalfOf","required":false,"in":"query","description":"Partner sub-account profile ID. Requires delegated_signing in addition to trading.","schema":{"type":"integer","minimum":1,"example":326}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderCombinedDto"}}}},"responses":{"200":{"description":"Order successfully cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponseDto"}}}},"400":{"description":"Invalid identifiers, resolved market, or order missing or already canceled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"401":{"description":"Authentication failed or the resolved order is owned by another profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading or delegated_signing scope, or unauthorized delegation target","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"No order resolves from the supplied internal or client order ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"409":{"description":"Delayed order release overlapped cancellation; cancellation is not confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderFailure"}}}},"425":{"description":"Cancellation is temporarily blocked because trading is disabled by maintenance mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingDisabledErrorResponse"}}}},"500":{"description":"Unexpected cancellation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel Order","tags":["Trading"]}},"/orders/{orderId}":{"delete":{"description":"Cancel an open order and return locked funds","operationId":"OrderController_cancelOrder","parameters":[{"name":"orderId","required":true,"in":"path","description":"Unique identifier of the order to be cancelled","schema":{"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","type":"string"}},{"name":"onBehalfOf","required":false,"in":"query","description":"Partner sub-account profile ID. Requires delegated_signing in addition to trading.","schema":{"type":"integer","minimum":1,"example":326}}],"responses":{"200":{"description":"Order successfully cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponseDto"}}}},"400":{"description":"Invalid path or query input, resolved market, or order missing or already canceled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"401":{"description":"User not authenticated or not the order owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading or delegated_signing scope, or unauthorized delegation target","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"No order exists for the supplied orderId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"409":{"description":"Delayed order release overlapped cancellation; cancellation is not confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderFailure"}}}},"425":{"description":"Cancellation is temporarily blocked because trading is disabled by maintenance mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingDisabledErrorResponse"}}}},"500":{"description":"Unexpected cancellation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel Order","tags":["Trading"]}},"/orders/cancel-batch":{"post":{"operationId":"OrderController_cancelOrderBatch","parameters":[{"name":"onBehalfOf","required":false,"in":"query","description":"Partner sub-account profile ID. Requires delegated_signing in addition to trading.","schema":{"type":"integer","minimum":1,"example":326}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrderBatchDto"}}}},"responses":{"200":{"description":"All orders successfully cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderBatchResponseDto"}}}},"207":{"description":"Partial success - some orders cancelled, some failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderBatchPartialResponse"}}}},"400":{"description":"Orders from different markets, invalid order data, or no orders could be cancelled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/CancelOrderBatchAllFailedResponse"}]}}}},"401":{"description":"User not authenticated or not the owner of all orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading or delegated_signing scope, or unauthorized delegation target","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"None of the supplied internal order IDs resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"425":{"description":"Cancellation is temporarily blocked because trading is disabled by maintenance mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingDisabledErrorResponse"}}}},"500":{"description":"Unexpected batch cancellation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel multiple orders in batch","tags":["Trading"]}},"/orders/batch-cancel":{"post":{"description":"Cancel open orders by either internal orderIds or client-provided clientOrderIds.","operationId":"OrderController_batchCancelOrders","parameters":[{"name":"onBehalfOf","required":false,"in":"query","description":"Partner sub-account profile ID. Requires delegated_signing in addition to trading.","schema":{"type":"integer","minimum":1,"example":326}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderBatchCombinedDto"}}}},"responses":{"200":{"description":"All orders successfully cancelled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CancelOrderBatchResponseDto"},{"$ref":"#/components/schemas/CancelOrderBatchCombinedResponseDto"}]}}}},"207":{"description":"Partial success - some orders cancelled, some failed","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CancelOrderBatchPartialResponse"},{"$ref":"#/components/schemas/ClientOrderBatchPartialResponse"}]}}}},"400":{"description":"Orders from different markets, invalid order data, or no orders could be cancelled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/NestErrorResponse"},{"$ref":"#/components/schemas/CancelOrderBatchAllFailedResponse"},{"$ref":"#/components/schemas/ClientOrderBatchAllFailedResponse"}]}}}},"401":{"description":"User not authenticated or not the owner of all orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading or delegated_signing scope, or unauthorized delegation target","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"No supplied internal order ID resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"425":{"description":"Cancellation is temporarily blocked because trading is disabled by maintenance mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingDisabledErrorResponse"}}}},"500":{"description":"Unexpected batch cancellation failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Batch Cancel Orders","tags":["Trading"]}},"/orders/all/{slug}":{"delete":{"operationId":"OrderController_cancelAllOrders","parameters":[{"name":"onBehalfOf","required":false,"in":"query","description":"Partner sub-account profile ID. Requires delegated_signing in addition to trading.","schema":{"type":"integer","minimum":1,"example":326}}],"responses":{"200":{"description":"All orders successfully cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllOrdersResponseDto"}}}},"207":{"description":"Partial success - some orders cancelled, some failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderBatchPartialResponse"}}}},"400":{"description":"Invalid market slug or no orders could be cancelled","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorResponse"},{"$ref":"#/components/schemas/CancelOrderBatchAllFailedResponse"}]}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"403":{"description":"Missing trading or delegated_signing scope, or unauthorized delegation target","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessageResponse"},{"$ref":"#/components/schemas/NestErrorResponse"}]}}}},"404":{"description":"Profile missing, or slug matches neither a market nor a market group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NestErrorResponse"}}}},"425":{"description":"Cancellation is temporarily blocked because trading is disabled by maintenance mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingDisabledErrorResponse"}}}},"500":{"description":"Unexpected cancel-all failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"security":[{"HmacAuth":[]}],"summary":"Cancel all of a user's orders in a specific market","tags":["Trading"]}},"/tokens/lmts/summary":{"get":{"operationId":"LmtsController_getSummary","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LmtsSummaryResponseDto"}}}},"503":{"description":"LMTS indexer data is unavailable or stale"}},"summary":"Get the current LMTS supply and staking summary","tags":["LMTS"]}},"/tokens/lmts/holders":{"get":{"operationId":"LmtsController_getHolders","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LmtsHoldersResponseDto"}}}},"400":{"description":"Limit must be an integer from 1 to 50"},"503":{"description":"LMTS indexer data is unavailable or stale"}},"summary":"Get LMTS holders ranked by wallet plus staked balance","tags":["LMTS"]}},"/navigation":{"get":{"description":"Returns the hierarchical navigation structure for market pages","operationId":"MarketNavigationController_getNavigationTree","parameters":[],"responses":{"200":{"description":"Navigation tree retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NavigationNodeDto"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Get navigation tree","tags":["Market Navigation"]}},"/market-pages/by-path":{"get":{"description":"Resolves a URL path to a market page with its configuration, filters, and breadcrumb","operationId":"MarketNavigationController_byPath","parameters":[{"name":"path","required":true,"in":"query","description":"URL path to resolve (e.g., \"/sports/football\")","schema":{"example":"/sports/football","type":"string"}}],"responses":{"200":{"description":"Market page resolved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPageByPathResponseDto"}}}},"301":{"description":"Path has been redirected to a new location"},"400":{"description":"Invalid or missing path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Market page not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Get market page by path","tags":["Market Navigation"]}},"/market-pages/{id}/markets":{"get":{"description":"Returns paginated list of markets for a specific market page with filtering and sorting","operationId":"MarketNavigationController_listMarkets","parameters":[{"name":"id","required":true,"in":"path","description":"Market page ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}},{"name":"includeNextMarket","required":false,"in":"query","description":"Include upfront-scheduled successor navigation and activation-gap rows","schema":{"example":true}},{"name":"cursor","required":false,"in":"query","description":"Cursor token for cursor-based pagination (cannot be used with page)","schema":{}},{"name":"sort","required":false,"in":"query","description":"Sort field with optional - prefix for descending (e.g., -updatedAt, createdAt, deadline)","schema":{"example":"-updatedAt"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page (max 100)","schema":{"example":20}},{"name":"page","required":false,"in":"query","description":"Page number for offset pagination (cannot be used with cursor)","schema":{"example":1}}],"responses":{"200":{"description":"Markets retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMarketsResponseDto"}}}},"400":{"description":"Invalid parameters or pagination mode conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List markets for a page","tags":["Market Navigation"]}},"/property-keys":{"get":{"description":"Returns all property keys with their options, sorted by slug","operationId":"MarketNavigationController_listPropertyKeys","parameters":[],"responses":{"200":{"description":"Property keys retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyKeyResponseDto"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List property keys","tags":["Market Navigation"]}},"/property-keys/{id}":{"get":{"description":"Returns a specific property key with its options","operationId":"MarketNavigationController_getPropertyKey","parameters":[{"name":"id","required":true,"in":"path","description":"Property key ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"responses":{"200":{"description":"Property key retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyKeyResponseDto"}}}},"404":{"description":"Property key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Get property key by ID","tags":["Market Navigation"]}},"/property-keys/{id}/options":{"get":{"description":"Returns options for a specific property key, optionally filtered by parent option","operationId":"MarketNavigationController_listPropertyOptions","parameters":[{"name":"id","required":true,"in":"path","description":"Property key ID","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}},{"name":"parentId","required":false,"in":"query","description":"Parent option ID for hierarchical filtering","schema":{"type":"string"}}],"responses":{"200":{"description":"Property options retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PropertyOptionResponseDto"}}}}},"400":{"description":"Invalid property key ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List property options","tags":["Market Navigation"]}},"/heartbeats":{"post":{"description":"API tokens require the trading scope.","operationId":"HeartbeatController_update","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHeartbeatDto"}}}},"responses":{"200":{"description":"Heartbeat deadline updated"},"400":{"description":"cancelAt is invalid or less than five seconds after server time"},"401":{"description":"Authentication required"},"403":{"description":"The API token does not have the trading scope"},"409":{"description":"The deadline passed and cancellation is still in progress"}},"security":[{"HmacAuth":[]}],"summary":"Set, move, or disarm the profile-wide order cancellation deadline","tags":["heartbeats"]}}},"info":{"title":"Limitless Exchange API","description":"\n# Limitless Exchange Trading API\n\n*Production-ready API for prediction market trading, portfolio management, and market data*\n\n> 🎯 **Quick Navigation**: [Authentication](#tag/authentication) | [Markets](#tag/markets) | [Trading](#tag/trading) | [Portfolio](#tag/portfolio)\n\n---\n  \n\n\n## 🚀 Quick Start\n\nChoose your preferred programming language for complete end-to-end implementation:\n\n### Overview\n\nThe Limitless Exchange API offers both REST and WebSocket integration:\n\n**REST API (Trading)**:\n1. **🔐 Authentication**: Use API key for all programmatic access\n2. **📊 Fetch Market Data**: Get market info including venue contract addresses (once per market)\n3. **📋 Order Creation**: Build and sign orders using EIP-712 structured data\n4. **🚀 Order Submission**: Submit signed orders and receive confirmations\n\n**WebSocket API (Real-Time Data)**:\n1. **🔌 Connection**: Connect to `/markets` namespace for real-time updates\n2. **📊 Subscriptions**: Subscribe to market prices and position changes\n3. **📡 Events**: Handle live market data and transaction updates\n\n### 🔐 Authentication for API Users\n\n> **⚠️ DEPRECATION NOTICE**: Cookie-based session authentication is deprecated and will be removed within weeks. Please migrate to API keys immediately.\n\n| Method | Header | Status |\n|--------|--------|--------|\n| **API Key** | `X-API-Key: lmts_...` | ✅ Required for programmatic access |\n| Cookie Session | `Cookie: limitless_session=...` | ⚠️ Deprecated (removal imminent) |\n\n**Getting an API Key**\n\nAPI keys can only be created via the Limitless Exchange UI:\n1. Log in to [limitless.exchange](https://limitless.exchange) using your wallet\n2. Click your profile menu (top right)\n3. Select \"Api keys\"\n4. Generate a new key\n\n**Using Your API Key**\n\nInclude in all requests via the `X-API-Key` header:\n\n```bash\n# REST API\ncurl -H \"X-API-Key: lmts_your_key_here\" https://api.limitless.exchange/markets\n\n# WebSocket - pass X-API-Key header during connection handshake\n```\n\n### Migration from Cookie to API Key\n\nIf you're currently using cookie-based authentication, migrate by:\n\n1. **Generate an API key** via the UI (profile menu → Api keys)\n2. **Replace cookie header** with API key header:\n\n```diff\n# Before (deprecated)\n- Cookie: limitless_session=your_session_token\n\n# After\n+ X-API-Key: lmts_your_key_here\n```\n\n3. **Remove session management code** - no more login flow or cookie handling needed\n\n### Important: Venue System for CLOB Markets\n\nCLOB markets use a **venue system** where each market is associated with specific contract addresses. Before placing orders:\n\n1. **Fetch market data once**: `GET /markets/:slug` returns venue information\n2. **Use venue.exchange**: This is the `verifyingContract` for EIP-712 order signing\n3. **Cache the venue**: Venue data is static per market - fetch once and reuse\n\n**Sample venue response:**\n```json\n{\n  \"venue\": {\n    \"exchange\": \"0xA1b2C3...\",\n    \"adapter\": \"0xD4e5F6...\"\n  }\n}\n```\n\n### Required Approvals\n\nBefore trading, set up token approvals based on order type:\n\n| Order Type | Market Type | Approve To |\n|------------|-------------|------------|\n| BUY | All CLOB | USDC → `venue.exchange` |\n| SELL | Simple CLOB | CT → `venue.exchange` |\n| SELL | NegRisk/Grouped | CT → `venue.exchange` AND `venue.adapter` |\n\n### Checksummed Addresses\n\nAll addresses must use **checksummed format** (EIP-55 mixed-case):\n- Authentication: `x-account` header\n- Orders: `maker` and `signer` fields\n- Example: `0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed`\n\n### Implementation Guides\n\n**[🐍 Python Quick Start](#description/-python-quick-start)**\n- REST API: eth-account, requests, and web3.py libraries\n- WebSocket: python-socketio, asyncio integration\n\n**[☕ Java Quick Start](#description/-java-quick-start)**  \n- REST API: Web3j, OkHttp3, and Jackson libraries\n\n**[📦 Node.js/TypeScript Quick Start](#description/-nodejs-typescript-quick-start)**\n- REST API: viem, ethers, and cross-fetch libraries\n- WebSocket: socket.io-client for real-time trading\n- Full TypeScript support with end-to-end examples\n\n**[🔌 WebSocket Integration](#description/-websocket-integration)**\n- Real-time market data and position updates\n- Production-ready Python client with authentication\n\n---\n  \n\n\n## 🐍 Python Quick Start\n\nComplete end-to-end Python implementation for Limitless Exchange API integration.\n  \n\n\n### 🐍 Python E2E Order Creation Guide\n\nComplete Python implementation guide is being loaded from external documentation...\n\n**Guide Contents:**\n- 🔐 Complete authentication flow with eth-account\n- 📋 Order construction with Web3.py calculations\n- ✍️ EIP-712 structured data signing\n- 🚀 Order submission with requests library\n- ⚠️ Comprehensive error handling\n- 🛠️ Production deployment considerations\n\n*For the complete Python guide, ensure the file is available at docs/scripts-samples/python-e2e-order-creation.md*\n    \n\n\n## ☕ Java Quick Start\n\nComplete end-to-end Java implementation for Limitless Exchange API integration.\n  \n\n\n### ☕ Java E2E Order Creation Guide\n\nComplete Java enterprise implementation guide is being loaded from external documentation...\n\n**Guide Contents:**\n- 🔐 Complete authentication flow with Web3j\n- 📋 Order construction with BigInteger precision\n- ✍️ EIP-712 structured data signing\n- 🚀 Order submission with OkHttp3\n- ⚠️ Enterprise error handling patterns\n- 🏗️ Production Maven project structure\n\n*For the complete Java guide, ensure the file is available at docs/scripts-samples/java-e2e-order-creation.md*\n    \n\n\n## 📦 Node.js/TypeScript Quick Start\n\nComplete end-to-end Node.js/TypeScript implementation for trading and WebSocket subscriptions.\n  \n\n\n### 📦 Node.js/TypeScript Trading & WebSocket Guide\n\nComplete Node.js/TypeScript implementation guide is being loaded from external documentation...\n\n**Guide Contents:**\n- 🔐 **Authentication**: Wallet-based auth with ethers and viem\n- 📋 **Order Creation**: EIP-712 signing with viem WalletClient\n- 🚀 **Order Submission**: REST API integration with cross-fetch\n- 🔌 **WebSocket Subscriptions**: socket.io-client for real-time updates\n- 📊 **Market Data**: AMM prices and CLOB orderbook subscriptions\n- ⚠️ **Type Safety**: Full TypeScript support with proper types\n- 🛠️ **Production Ready**: Complete end-to-end working example\n\n**Key Features:**\n- **Combined Subscriptions**: Subscribe to both AMM and CLOB markets simultaneously\n- **Authentication Flow**: Complete wallet-based authentication with session management\n- **Trading Integration**: Place orders and receive real-time updates\n- **TypeScript First**: Type-safe implementation with proper interfaces\n\n*For the complete Node.js guide, ensure the file is available at docs/scripts-samples/node-socket-trading-and-subscribe.md*\n    \n\n\n## 🔌 WebSocket Integration\n\nReal-time market data and position updates using WebSocket connections.\n  \n\n\n### 🔌 WebSocket Real-Time Integration Guide\n\nComplete WebSocket implementation guide is being loaded from external documentation...\n\n**Guide Contents:**\n- 🔌 **WebSocket Connection**: python-socketio client with async support\n- 🔐 **Authentication**: JWT session cookie integration\n- 📊 **Market Subscriptions**: Real-time price updates and position changes\n- ⚡ **Event Handling**: Comprehensive event processing patterns\n- 🔄 **Auto-Reconnection**: Production-ready reconnection logic\n- 🛠️ **Error Recovery**: Robust error handling and fallback strategies\n\n**Key Features:**\n- **Public Mode**: Market price updates without authentication\n- **Authenticated Mode**: Full access to positions and transactions\n- **Multi-Market Support**: Subscribe to multiple markets simultaneously\n- **Production Ready**: Tested patterns for production deployment\n\n*For the complete WebSocket guide, ensure the file is available at docs/scripts-samples/python-socket-subscribe.md*\n    ","version":"1.0","contact":{"name":"API Support","url":"https://limitless.exchange","email":"hey@limitless.network"}},"tags":[{"name":"Authentication","description":"User authentication and session management"},{"name":"Markets","description":"Browse, search, and analyze prediction markets"},{"name":"Market Navigation","description":"Navigation tree, market pages, and property filters"},{"name":"Trading","description":"Create, manage, and cancel orders"},{"name":"Portfolio","description":"Position tracking, trade history, and performance"}],"servers":[{"url":"https://api.limitless.exchange","description":"Production API"}],"components":{"securitySchemes":{"HmacAuth":{"type":"apiKey","in":"header","name":"lmts-api-key","description":"Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details."},"cookie":{"type":"apiKey","in":"cookie","name":"limitless_session","description":"Session authentication cookie obtained from /auth/login"},"bearer":{"scheme":"bearer","bearerFormat":"JWT","description":"JWT token for API access (alternative to cookie auth)","name":"Authorization","type":"http","in":"Header"}},"schemas":{"CreateUserDto":{"type":"object","properties":{"client":{"type":"string","description":"Client type for authentication","enum":["eoa","etherspot","base"],"example":"eoa"},"smartWallet":{"type":"string","description":"Smart wallet address (required for Smart Wallet client)","example":"0x1234567890123456789012345678901234567890"},"r":{"type":"string","description":"Referral code associated with the user who referred (invited) this user"},"shareLinkId":{"type":"object","description":"Server-issued market share link ID"}},"required":["client"]},"AmmAllowanceRequestDto":{"type":"object","properties":{"market":{"type":"string","description":"Market slug or checksummed FPMM address","example":"will-btc-hit-150k-2026"},"side":{"type":"string","description":"Approval required for the intended AMM operation","enum":["BUY","SELL"]},"onBehalfOf":{"type":"number","description":"Owned server-wallet sub-account profile ID","minimum":1}},"required":["market","side"]},"AmmAllowanceResponseDto":{"type":"object","properties":{"transactionId":{"type":"string"},"userOperationHash":{"type":"string"},"txHash":{"type":"string"},"status":{"type":"string","enum":["confirmed","missing","submitted"]},"confirmed":{"type":"boolean"},"market":{"type":"string"},"marketAddress":{"type":"string"},"side":{"type":"string","enum":["BUY","SELL"]},"walletAddress":{"type":"string"},"tokenAddress":{"type":"string"},"spenderOrOperator":{"type":"string"},"currentAllowance":{"type":"string","description":"Current ERC20 allowance in collateral base units; BUY checks only"}},"required":["status","confirmed","market","marketAddress","side","walletAddress","tokenAddress","spenderOrOperator"]},"AmmBuyRequestDto":{"type":"object","properties":{"market":{"type":"string","description":"Market slug or checksummed FPMM address","example":"will-btc-hit-150k-2026"},"outcomeIndex":{"type":"number","description":"FPMM outcome index: 0 = YES, 1 = NO","enum":[0,1]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points","default":100,"maximum":1000},"idempotencyKey":{"type":"string","description":"Partner-provided idempotency key required for safe timeout retries.","maxLength":128},"onBehalfOf":{"type":"number","description":"Owned server-wallet sub-account profile ID","minimum":1},"collateralAmount":{"type":"string","description":"Collateral base units to spend","example":"1000000","maxLength":78}},"required":["market","outcomeIndex","idempotencyKey","collateralAmount"]},"AmmBuySubmittedResponseDto":{"type":"object","properties":{"transactionId":{"type":"string"},"userOperationHash":{"type":"string"},"txHash":{"type":"string"},"status":{"type":"string","enum":["SUBMITTED"]},"market":{"type":"string"},"outcomeIndex":{"type":"number","enum":[0,1]},"collateralAmount":{"type":"string"},"expectedShares":{"type":"string"},"minShares":{"type":"string"}},"required":["status","market","outcomeIndex","collateralAmount","expectedShares","minShares"]},"AmmSellRequestDto":{"type":"object","properties":{"market":{"type":"string","description":"Market slug or checksummed FPMM address","example":"will-btc-hit-150k-2026"},"outcomeIndex":{"type":"number","description":"FPMM outcome index: 0 = YES, 1 = NO","enum":[0,1]},"slippageBps":{"type":"number","description":"Slippage tolerance in basis points","default":100,"maximum":1000},"idempotencyKey":{"type":"string","description":"Partner-provided idempotency key required for safe timeout retries.","maxLength":128},"onBehalfOf":{"type":"number","description":"Owned server-wallet sub-account profile ID","minimum":1},"collateralReturnAmount":{"type":"string","description":"Collateral base units to receive","example":"992015","maxLength":78}},"required":["market","outcomeIndex","idempotencyKey","collateralReturnAmount"]},"AmmSellSubmittedResponseDto":{"type":"object","properties":{"transactionId":{"type":"string"},"userOperationHash":{"type":"string"},"txHash":{"type":"string"},"status":{"type":"string","enum":["SUBMITTED"]},"market":{"type":"string"},"outcomeIndex":{"type":"number","enum":[0,1]},"collateralReturnAmount":{"type":"string"},"expectedShares":{"type":"string"},"maxShares":{"type":"string"}},"required":["status","market","outcomeIndex","collateralReturnAmount","expectedShares","maxShares"]},"CollateralTokenDto":{"type":"object","properties":{"address":{"type":"string","description":"Token contract address","example":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"decimals":{"type":"number","description":"Token decimal places","example":6},"symbol":{"type":"string","description":"Token symbol","example":"USDC"}},"required":["address","decimals","symbol"]},"CreatorDto":{"type":"object","properties":{"name":{"type":"string","description":"Creator display name","example":"Limitless"},"imageURI":{"type":"string","description":"Creator profile image URI","example":"https://limitless.exchange/assets/images/logo.svg","nullable":true},"link":{"type":"string","description":"Creator social media link","example":"https://x.com/trylimitless","nullable":true},"address":{"type":"string","description":"Creator wallet address","example":"0x55257A9a03601B0587Ab4752FD42A87c4Bad2e1e"}},"required":["name","imageURI","link","address"]},"TokenPairDto":{"type":"object","properties":{"yes":{"type":"string","description":"YES token ID","example":"78695809706775235377718830617502491971378663350108823320552375535762230401980"},"no":{"type":"string","description":"NO token ID","example":"8642544735724967665477930445154251213223700833624811358896571351781151616445"}},"required":["yes","no"]},"TradePricesDto":{"type":"object","properties":{"buy":{"type":"object","description":"Buy prices for market and limit orders","properties":{"market":{"type":"array","items":{"type":"number"},"example":[0.997,0.997]},"limit":{"type":"array","items":{"type":"number"},"example":[0.003,0.003]}}},"sell":{"type":"object","description":"Sell prices for market and limit orders","properties":{"market":{"type":"array","items":{"type":"number"},"example":[0.003,0.003]},"limit":{"type":"array","items":{"type":"number"},"example":[0.997,0.997]}}}},"required":["buy","sell"]},"MetadataDto":{"type":"object","properties":{"fee":{"type":"boolean","description":"Whether market has fees enabled","example":true},"isBannered":{"type":"boolean","description":"Whether market is featured in banner","example":false},"isPolyArbitrage":{"type":"boolean","description":"Whether market supports Polygon arbitrage","example":false},"shouldMarketMake":{"type":"boolean","description":"Whether market should be market made","example":false}},"required":["fee","isBannered","isPolyArbitrage"]},"MarketSettingsDto":{"type":"object","properties":{"minSize":{"type":"string","description":"Minimum trade size in wei","example":"50000000"},"maxSpread":{"type":"number","description":"Maximum spread allowed","example":0.035},"dailyReward":{"type":"string","description":"Daily reward amount","example":"20"},"rewardsEpoch":{"type":"string","description":"Rewards epoch in decimal format","example":"0.013888888888888888"},"c":{"type":"string","description":"C parameter","example":"3"}},"required":["minSize","maxSpread","dailyReward","rewardsEpoch","c"]},"FeedEventUserDto":{"type":"object","properties":{"id":{"type":"number","description":"User ID","example":7080},"account":{"type":"string","description":"User wallet address","example":"0xea27f6788F083e6070961d3E52A2e596367E04CC"},"username":{"type":"string","description":"Username","example":null,"nullable":true},"displayName":{"type":"string","description":"Display name","example":"GG","nullable":true},"rankName":{"type":"string","description":"User ranking name","example":"Bronze"},"points":{"type":"string","description":"User points balance","example":"0.00000000"},"name":{"type":"string","description":"User display name for feed events","example":"GG"},"imageURI":{"type":"string","description":"User profile image URI","example":null,"nullable":true}},"required":["account","username","displayName","imageURI"]},"FeedEventDataDto":{"type":"object","properties":{"title":{"type":"string","description":"Market title","example":"DOGE Up or Down - Hourly"},"address":{"type":"string","description":"Market contract address","example":"0x76d3e2098Be66Aa7E15138F467390f0Eb7349B9b"},"slug":{"type":"string","description":"Market slug","example":"doge-up-or-down-1-hour-1756136880125"},"strategy":{"type":"string","description":"Trading strategy","example":"Buy","enum":["Buy","Sell"]},"outcome":{"type":"string","description":"Market outcome","example":"Down","enum":["YES","NO","Up","Down"]},"contracts":{"type":"string","description":"Number of contracts traded","example":"9.071313"},"txHash":{"type":"string","description":"Transaction hash","example":"0xe8a4464daf3561f6be5fef4d1bc64184c4f6fe9d6306ab7297fe7ed63a24df1c"},"symbol":{"type":"string","description":"Collateral token symbol","example":"USDC"},"tradeAmount":{"type":"string","description":"Trade amount in collateral token","example":"5"},"tradeAmountUSD":{"type":"string","description":"Trade amount in USD","example":"4.999525"},"marketId":{"type":"number","description":"Market ID","example":7495}},"required":["title","address","strategy","outcome","contracts","txHash","symbol","tradeAmount","tradeAmountUSD","marketId"]},"FeedEventDto":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of feed event","example":"NEW_TRADE","enum":["NEW_TRADE","MARKET_CREATED","MARKET_RESOLVED"]},"timestamp":{"type":"string","description":"Event timestamp in ISO format","example":"2025-09-01T11:30:31.000Z"},"user":{"description":"User who triggered the event","allOf":[{"$ref":"#/components/schemas/FeedEventUserDto"}]},"data":{"description":"Event-specific data","allOf":[{"$ref":"#/components/schemas/FeedEventDataDto"}]},"bodyHash":{"type":"string","description":"Unique hash for the event","example":"01100995"}},"required":["eventType","timestamp","user","data","bodyHash"]},"PublicMarketPropertyDto":{"type":"object","properties":{"propertyKeySlug":{"type":"string","description":"Property key slug","example":"domain"},"value":{"description":"Assigned property value","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"sports"}},"required":["propertyKeySlug","value"]},"StandaloneClobMarketResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Market ID","example":7494},"conditionId":{"type":"string","description":"Condition ID","example":"0x947b8e6812bf8ac27687fa25b642d6a25bf5c7292068e5aef129d9d26e9780b8"},"negRiskRequestId":{"type":"string","description":"NegRisk request ID","example":null,"nullable":true},"description":{"type":"string","description":"Market description"},"collateralToken":{"$ref":"#/components/schemas/CollateralTokenDto"},"title":{"type":"string","description":"Market title"},"proxyTitle":{"type":"string","description":"Proxy title","nullable":true},"expirationDate":{"type":"string","description":"Expiration date"},"expirationTimestamp":{"type":"number","description":"Expiration timestamp"},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Updated timestamp"},"categories":{"description":"Categories","type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Market status"},"expired":{"type":"boolean","description":"Is expired"},"creator":{"$ref":"#/components/schemas/CreatorDto"},"tags":{"description":"Tags","type":"array","items":{"type":"string"}},"frequency":{"type":"string","description":"Schedule frequency for timeline","example":"minutely"},"subFrequency":{"type":"string","description":"Schedule sub-frequency for timeline","nullable":true,"example":"minutes_5"},"volume":{"type":"string","description":"Volume"},"volumeFormatted":{"type":"string","description":"Formatted volume"},"tokens":{"$ref":"#/components/schemas/TokenPairDto"},"prices":{"description":"Prices","type":"array","items":{"type":"number"}},"tradePrices":{"$ref":"#/components/schemas/TradePricesDto"},"isRewardable":{"type":"boolean","description":"Is rewardable"},"slug":{"type":"string","description":"Market slug"},"tradeType":{"type":"string","description":"Trade type","example":"clob"},"marketType":{"type":"string","description":"Market type","example":"single"},"priorityIndex":{"type":"number","description":"Priority index"},"winningOutcomeIndex":{"type":"number","description":"Winning outcome index","nullable":true},"metadata":{"$ref":"#/components/schemas/MetadataDto"},"settings":{"$ref":"#/components/schemas/MarketSettingsDto"},"logo":{"type":"string","description":"Market logo","nullable":true},"source":{"type":"string","description":"Market source (e.g. ugm:crypto, ugm:sports)","nullable":true},"feedEvents":{"description":"Feed events","type":"array","items":{"$ref":"#/components/schemas/FeedEventDto"}},"groupSlug":{"type":"string","description":"Canonical slug of the immediate parent group, null for standalone markets","nullable":true},"properties":{"description":"Admin-assigned market analytics properties","type":"array","items":{"$ref":"#/components/schemas/PublicMarketPropertyDto"}}},"required":["id","conditionId","negRiskRequestId","description","collateralToken","title","proxyTitle","expirationDate","expirationTimestamp","createdAt","updatedAt","categories","status","expired","creator","tags","volume","volumeFormatted","tokens","prices","tradePrices","isRewardable","slug","tradeType","marketType","priorityIndex","winningOutcomeIndex","metadata","settings","logo","source","properties"]},"GroupMarketDto":{"type":"object","properties":{"id":{"type":"number","description":"Market ID","example":7494},"conditionId":{"type":"string","description":"Condition ID","example":"0x947b8e6812bf8ac27687fa25b642d6a25bf5c7292068e5aef129d9d26e9780b8"},"negRiskRequestId":{"type":"string","description":"NegRisk request ID","example":null,"nullable":true},"description":{"type":"string","description":"Market description"},"collateralToken":{"$ref":"#/components/schemas/CollateralTokenDto"},"title":{"type":"string","description":"Market title"},"proxyTitle":{"type":"string","description":"Proxy title","nullable":true},"expirationDate":{"type":"string","description":"Expiration date"},"expirationTimestamp":{"type":"number","description":"Expiration timestamp"},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Updated timestamp"},"categories":{"description":"Categories","type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Market status"},"expired":{"type":"boolean","description":"Is expired"},"creator":{"$ref":"#/components/schemas/CreatorDto"},"tags":{"description":"Tags","type":"array","items":{"type":"string"}},"frequency":{"type":"string","description":"Schedule frequency for timeline","example":"minutely"},"subFrequency":{"type":"string","description":"Schedule sub-frequency for timeline","nullable":true,"example":"minutes_5"},"volume":{"type":"string","description":"Volume"},"volumeFormatted":{"type":"string","description":"Formatted volume"},"tokens":{"$ref":"#/components/schemas/TokenPairDto"},"prices":{"description":"Prices","type":"array","items":{"type":"number"}},"tradePrices":{"$ref":"#/components/schemas/TradePricesDto"},"isRewardable":{"type":"boolean","description":"Is rewardable"},"slug":{"type":"string","description":"Market slug"},"tradeType":{"type":"string","description":"Trade type","example":"clob"},"marketType":{"type":"string","description":"Market type","example":"single"},"priorityIndex":{"type":"number","description":"Priority index"},"winningOutcomeIndex":{"type":"number","description":"Winning outcome index","nullable":true},"metadata":{"$ref":"#/components/schemas/MetadataDto"},"settings":{"$ref":"#/components/schemas/MarketSettingsDto"},"logo":{"type":"string","description":"Market logo","nullable":true},"source":{"type":"string","description":"Market source (e.g. ugm:crypto, ugm:sports)","nullable":true},"feedEvents":{"description":"Feed events","type":"array","items":{"$ref":"#/components/schemas/FeedEventDto"}},"orderInGroup":{"type":"number","description":"Order in group"}},"required":["id","conditionId","negRiskRequestId","description","collateralToken","title","proxyTitle","expirationDate","expirationTimestamp","createdAt","updatedAt","categories","status","expired","creator","tags","volume","volumeFormatted","tokens","prices","tradePrices","isRewardable","slug","tradeType","marketType","priorityIndex","winningOutcomeIndex","metadata","settings","logo","source"]},"NegRiskGroupResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Group ID","example":10000078},"slug":{"type":"string","description":"Group slug"},"outcomeTokens":{"description":"Outcome tokens","type":"array","items":{"type":"string"}},"title":{"type":"string","description":"Group title"},"ogImageURI":{"type":"string","description":"OG image URI"},"imageUrl":{"type":"string","description":"Group image URL","nullable":true},"expirationDate":{"type":"string","description":"Expiration date"},"expirationTimestamp":{"type":"number","description":"Expiration timestamp"},"expired":{"type":"boolean","description":"Is expired"},"creator":{"$ref":"#/components/schemas/CreatorDto"},"collateralToken":{"$ref":"#/components/schemas/CollateralTokenDto"},"tags":{"description":"Tags","type":"array","items":{"type":"string"}},"frequency":{"type":"string","description":"Schedule frequency for timeline","example":"minutely"},"subFrequency":{"type":"string","description":"Schedule sub-frequency for timeline","nullable":true,"example":"minutes_5"},"tradeType":{"type":"string","description":"Trade type","example":"clob"},"marketType":{"type":"string","description":"Market type","example":"group"},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Updated timestamp"},"categories":{"description":"Categories","type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Status"},"priorityIndex":{"type":"number","description":"Priority index"},"properties":{"description":"Admin-assigned group analytics properties","type":"array","items":{"$ref":"#/components/schemas/PublicMarketPropertyDto"}},"negRiskMarketId":{"type":"string","description":"NegRisk market ID"},"markets":{"description":"Markets in the group","type":"array","items":{"$ref":"#/components/schemas/GroupMarketDto"}},"metadata":{"$ref":"#/components/schemas/MetadataDto"},"volume":{"type":"string","description":"Volume"},"volumeFormatted":{"type":"string","description":"Formatted volume"},"dailyReward":{"type":"string","description":"Daily reward"},"source":{"type":"string","description":"Market source (e.g. ugm:crypto, ugm:sports)","nullable":true},"feedEvents":{"description":"Feed events","type":"array","items":{"$ref":"#/components/schemas/FeedEventDto"}}},"required":["id","slug","outcomeTokens","title","ogImageURI","imageUrl","expirationDate","expirationTimestamp","expired","creator","collateralToken","tags","tradeType","marketType","createdAt","updatedAt","categories","status","priorityIndex","properties","negRiskMarketId","markets","metadata","volume","volumeFormatted","dailyReward","source","feedEvents"]},"AmmMarketResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Market ID","example":7497},"properties":{"description":"Admin-assigned market analytics properties","type":"array","items":{"$ref":"#/components/schemas/PublicMarketPropertyDto"}},"address":{"type":"string","description":"Market address"},"conditionId":{"type":"string","description":"Condition ID"},"description":{"type":"string","description":"Market description"},"collateralToken":{"$ref":"#/components/schemas/CollateralTokenDto"},"title":{"type":"string","description":"Market title"},"proxyTitle":{"type":"string","description":"Proxy title","nullable":true},"positionIds":{"description":"Position IDs","type":"array","items":{"type":"string"}},"ogImageURI":{"type":"string","description":"OG image URI","nullable":true},"expirationDate":{"type":"string","description":"Expiration date"},"expirationTimestamp":{"type":"number","description":"Expiration timestamp"},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Updated timestamp"},"categories":{"description":"Categories","type":"array","items":{"type":"string"}},"winningOutcomeIndex":{"type":"number","description":"Winning outcome index","nullable":true},"status":{"type":"string","description":"Market status"},"expired":{"type":"boolean","description":"Is expired"},"creator":{"$ref":"#/components/schemas/CreatorDto"},"tags":{"description":"Tags","type":"array","items":{"type":"string"}},"openInterest":{"type":"string","description":"Open interest"},"openInterestFormatted":{"type":"string","description":"Formatted open interest"},"volume":{"type":"string","description":"Volume"},"volumeFormatted":{"type":"string","description":"Formatted volume"},"liquidity":{"type":"string","description":"Liquidity"},"liquidityFormatted":{"type":"string","description":"Formatted liquidity"},"slug":{"type":"string","description":"Market slug"},"tradeType":{"type":"string","description":"Trade type","example":"amm"},"marketType":{"type":"string","description":"Market type","example":"single"},"priorityIndex":{"type":"number","description":"Priority index"},"metadata":{"$ref":"#/components/schemas/MetadataDto"},"logo":{"type":"string","description":"Market logo","nullable":true},"source":{"type":"string","description":"Market source (e.g. ugm:crypto, ugm:sports)","nullable":true},"feedEvents":{"description":"Feed events","type":"array","items":{"$ref":"#/components/schemas/FeedEventDto"}}},"required":["id","properties","address","conditionId","description","collateralToken","title","proxyTitle","positionIds","ogImageURI","expirationDate","expirationTimestamp","createdAt","updatedAt","categories","winningOutcomeIndex","status","expired","creator","tags","openInterest","openInterestFormatted","volume","volumeFormatted","liquidity","liquidityFormatted","slug","tradeType","marketType","priorityIndex","metadata","logo","source","feedEvents"]},"MarketNavigationNextDto":{"type":"object","properties":{"slug":{"type":"string","description":"Successor market slug","example":"btc-up-or-down-daily-p-1789131915832"},"startAt":{"type":"string","description":"Slot open time (ISO 8601)","example":"2026-09-11T16:00:00.000Z"},"deadline":{"type":"string","description":"Slot end time, i.e. the successor deadline","example":"2026-09-12T16:00:00.000Z"},"tradable":{"type":"boolean","description":"Whether the successor is already tradable","example":false}},"required":["slug","startAt","deadline","tradable"]},"MarketNavigationDto":{"type":"object","properties":{"nextMarket":{"$ref":"#/components/schemas/MarketNavigationNextDto"}},"required":["nextMarket"]},"MarketTimelinePreviewSlotDto":{"type":"object","properties":{"slug":{"type":"string","example":"btc-up-or-down-daily-p-1789131915832"},"state":{"type":"string","enum":["PRE_OPEN","OPEN","SETTLING","SETTLED","FAILED"],"example":"OPEN"},"tradable":{"type":"boolean","example":true},"startAt":{"type":"string","example":"2026-09-11T16:00:00.000Z"},"endAt":{"type":"string","example":"2026-09-12T16:00:00.000Z"}},"required":["slug","state","tradable","startAt","endAt"]},"MarketTimelinePreviewDto":{"type":"object","properties":{"windowStartAt":{"type":"string","description":"Start of the first slot in the window","example":"2026-09-10T16:00:00.000Z"},"windowEndAt":{"type":"string","description":"End of the last slot in the window","example":"2026-09-13T16:00:00.000Z"},"slots":{"type":"array","items":{"$ref":"#/components/schemas/MarketTimelinePreviewSlotDto"}}},"required":["windowStartAt","windowEndAt","slots"]},"MarketDetailsEnvelopeDto":{"type":"object","properties":{"market":{"oneOf":[{"$ref":"#/components/schemas/StandaloneClobMarketResponseDto"},{"$ref":"#/components/schemas/NegRiskGroupResponseDto"},{"$ref":"#/components/schemas/AmmMarketResponseDto"}]},"navigation":{"description":"Present for include=nextMarket when a successor exists","allOf":[{"$ref":"#/components/schemas/MarketNavigationDto"}]},"timelinePreview":{"description":"Present for include=timelinePreview when the market has timeline slots","allOf":[{"$ref":"#/components/schemas/MarketTimelinePreviewDto"}]}},"required":["market"]},"Object":{"type":"object","properties":{}},"BrowseActiveMarketsResponseDto":{"type":"object","properties":{"data":{"type":"array","description":"Array of active markets with complete trading data including volume, liquidity, and recent feed events","example":[{"id":7495,"address":"0x76d3e2098Be66Aa7E15138F467390f0Eb7349B9b","conditionId":"0x812f578437dc536def1412e4e593ef310884262c22868b30c1e58582e5f3e9bf","title":"DOGE Up or Down - Hourly","description":"This market will resolve to \"Up\" if the price of DOGE is above the opening price...","collateralToken":{"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","decimals":6,"symbol":"USDC"},"creator":{"name":"Limitless","imageURI":"https://limitless.exchange/assets/images/logo.svg","link":"https://x.com/trylimitless"},"prices":[42.8,57.2],"categories":["Hourly"],"tags":["Lumy","Recurring","Hourly","Simple Mode"],"status":"FUNDED","expired":false,"expirationDate":"Sep 1, 2025","expirationTimestamp":1756728000000,"volume":"164109293","volumeFormatted":"164.109293","openInterest":"48310707","openInterestFormatted":"48.310707","liquidity":"50000000","liquidityFormatted":"50.000000","tradeType":"amm","marketType":"single","slug":"doge-up-or-down-1-hour-1756724413009","feedEvents":[{"eventType":"NEW_TRADE","timestamp":"2025-09-01T11:30:31.000Z","user":{"id":7080,"account":"0xea27f6788F083e6070961d3E52A2e596367E04CC","name":"GG","rankName":"Bronze","points":"0.00000000"},"data":{"title":"DOGE Up or Down - Hourly","address":"0x76d3e2098Be66Aa7E15138F467390f0Eb7349B9b","strategy":"Buy","outcome":"Down","contracts":"9.071313","tradeAmount":"5","tradeAmountUSD":"4.999525","marketId":7495}}]}],"items":{"type":"object","description":"Market object with complete trading data (FEMarket type)","additionalProperties":true}},"totalMarketsCount":{"type":"number","description":"Total number of active markets available for pagination","example":150}},"required":["data","totalMarketsCount"]},"CategoryCountResponseDto":{"type":"object","properties":{"category":{"type":"object","description":"Number of active markets per category","example":{"1":10,"2":5,"3":8},"additionalProperties":{"type":"number"}},"totalCount":{"type":"number","description":"Total number of active markets","example":23}},"required":["category","totalCount"]},"FeedEventsResponseDto":{"type":"object","properties":{"data":{"type":"object","description":"Array of feed events with pagination (FEFeedEvents type)","example":{"data":[{"eventType":"NEW_TRADE","timestamp":"2025-09-01T11:30:31.000Z","user":{"name":"GG","rankName":"Bronze"},"data":{"title":"Market Title","strategy":"Buy","outcome":"Up"}}],"totalPages":5},"additionalProperties":true}},"required":["data"]},"PostTradeRecommendationViewAllDto":{"type":"object","properties":{"href":{"type":"string","example":"/crypto"},"count":{"type":"number","example":18}},"required":["href","count"]},"RecommendationItemDto":{"type":"object","properties":{"marketId":{"type":"number","example":12345},"marketSlug":{"type":"string","example":"btc-up-or-down-daily-1760000000000"},"stableSlug":{"type":"string","example":"btc-up-or-down-daily","nullable":true},"marketTitle":{"type":"string","example":"BTC Up or Down - Daily"},"imageUrl":{"type":"string","nullable":true,"example":"https://cdn.example.com/btc.png"},"duration":{"type":"string","enum":["daily","hourly","15-min","weekly"],"example":"daily"},"yesPercent":{"type":"number","minimum":0,"maximum":100,"example":57.2}},"required":["marketId","marketSlug","stableSlug","marketTitle","imageUrl","duration","yesPercent"]},"RecommendationTabDto":{"type":"object","properties":{"count":{"type":"number","example":18},"durationSlug":{"type":"string","enum":["daily","hourly","15-min","weekly"],"example":"daily"},"items":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationItemDto"}}},"required":["count","durationSlug","items"]},"PostTradeRecommendationTabsDto":{"type":"object","properties":{"daily":{"$ref":"#/components/schemas/RecommendationTabDto"},"hourly":{"$ref":"#/components/schemas/RecommendationTabDto"},"min15":{"$ref":"#/components/schemas/RecommendationTabDto"},"weekly":{"$ref":"#/components/schemas/RecommendationTabDto"}},"required":["daily","hourly","min15","weekly"]},"NflRecommendationItemDto":{"type":"object","properties":{"marketId":{"type":"number","example":12345},"marketSlug":{"type":"string","example":"lions-vs-bills-1789041644228"},"stableSlug":{"type":"string","nullable":true},"marketTitle":{"type":"string","example":"Lions vs. Bills"},"imageUrl":{"type":"string","nullable":true,"example":"https://cdn.example.com/nfl.png"},"homeAcronym":{"type":"string","nullable":true,"example":"DET"},"awayAcronym":{"type":"string","nullable":true,"example":"BUF"},"homePercent":{"type":"number","minimum":0,"maximum":100,"example":45},"awayPercent":{"type":"number","minimum":0,"maximum":100,"example":55}},"required":["marketId","marketSlug","stableSlug","marketTitle","imageUrl","homeAcronym","awayAcronym","homePercent","awayPercent"]},"NflRecommendationListDto":{"type":"object","properties":{"count":{"type":"number","example":14},"items":{"type":"array","items":{"$ref":"#/components/schemas/NflRecommendationItemDto"}}},"required":["count","items"]},"PostTradeRecommendationResponseDto":{"type":"object","properties":{"eligible":{"type":"boolean","example":true},"viewAll":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PostTradeRecommendationViewAllDto"}]},"tabs":{"$ref":"#/components/schemas/PostTradeRecommendationTabsDto"},"nfl":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/NflRecommendationListDto"}]}},"required":["eligible","viewAll","tabs","nfl"]},"HistoricalPricePoint":{"type":"object","properties":{"price":{"type":"number","example":0.75},"timestamp":{"type":"string","pattern":"^[0-9]+$","description":"Unix epoch milliseconds encoded as a decimal string.","example":"1736944200000"}},"additionalProperties":false,"required":["price","timestamp"]},"HistoricalPriceSeries":{"type":"object","properties":{"title":{"type":"string","example":"Will the event happen?"},"prices":{"description":"Newest-first YES prices.","type":"array","items":{"$ref":"#/components/schemas/HistoricalPricePoint"}},"marketStatus":{"type":"string","enum":["CREATED","DRAFTED","FUNDED","LOCKED","RESOLVED"],"description":"Exact market status for a single response, or group status for every series in a group response.","example":"FUNDED"}},"additionalProperties":false,"required":["title","prices","marketStatus"]},"MarketOrderbookLevel":{"type":"object","properties":{"price":{"type":"number","example":0.74},"size":{"type":"number","example":150},"side":{"type":"string","enum":["BUY","SELL"],"example":"BUY"}},"additionalProperties":false,"required":["price","size","side"]},"MarketOrderbookResponse":{"type":"object","properties":{"adjustedMidpoint":{"type":"number","description":"Midpoint after excluding individual orders below minSize before price-level aggregation.","example":0.75},"asks":{"description":"YES asks in ascending price order. Each level has side SELL.","type":"array","items":{"$ref":"#/components/schemas/MarketOrderbookLevel"}},"bids":{"description":"YES bids in descending price order. Each level has side BUY.","type":"array","items":{"$ref":"#/components/schemas/MarketOrderbookLevel"}},"lastTradePrice":{"type":"number","nullable":true,"description":"Separately produced latest usable mined YES-equivalent trade price; null when no usable value is available, including when its lookup fails.","example":0.75},"maxSpread":{"type":"number","example":0.05},"midpoint":{"type":"number","description":"Midpoint from the best displayed bid and ask.","example":0.75},"minSize":{"type":"number","example":1},"tokenId":{"type":"string","description":"YES position token ID.","example":"19633204485790857949828516737993423758628930235371629943999544859324645414627"}},"additionalProperties":false,"required":["adjustedMidpoint","asks","bids","lastTradePrice","maxSpread","midpoint","minSize","tokenId"]},"UserOrder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal order ID."},"ownerId":{"type":"integer","description":"Profile that owns the order."},"marketId":{"type":"string","description":"Internal market ID serialized as text."},"token":{"type":"string","description":"Conditional position token ID."},"type":{"type":"string","enum":["GTC","FAK","FOK"]},"status":{"type":"string","enum":["LIVE","MATCHED","CANCELED","UNMATCHED"]},"side":{"type":"string","enum":["BUY","SELL"]},"makerAmount":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$","description":"Maker amount in raw 6-decimal units, serialized as a decimal string."},"takerAmount":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$","description":"Taker amount in raw 6-decimal units, serialized as a decimal string."},"price":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$","description":"Order price serialized as a decimal string.","example":"0.5"},"originalSize":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$","description":"Original contract size in raw 6-decimal units, serialized as a decimal string."},"remainingSize":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$","description":"Unfilled contract size in raw 6-decimal units, serialized as a decimal string."},"createdAt":{"type":"string","format":"date-time"},"clientOrderId":{"type":"string","description":"Caller-assigned identifier when the order was placed with one."}},"additionalProperties":false,"description":"Order returned by the market user-orders read. Numeric values are serialized as decimal strings.","required":["id","ownerId","marketId","token","type","status","side","makerAmount","takerAmount","price","originalSize","remainingSize","createdAt"]},"MarketEventProfile":{"type":"object","properties":{"username":{"type":"string","description":"Public username."},"displayName":{"type":"string","description":"Public display name."},"pfpUrl":{"type":"string","nullable":true,"description":"Public profile-picture URL."},"socialUrl":{"type":"string","nullable":true,"description":"Public social-profile URL."},"rankName":{"type":"string","enum":["Bronze","Silver","Gold","Platinum","Diamond"],"nullable":true,"description":"Public rank, or null when no rank is assigned."}},"description":"Approved public taker attribution. Additional runtime properties are permitted for response compatibility.","required":["username","displayName","pfpUrl","socialUrl","rankName"]},"MarketEvent":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","description":"Trade creation time."},"makerAmount":{"type":"string","pattern":"^[0-9]+$","description":"Trade collateral cost in raw 6-decimal units. Currently equal to takerAmount.","example":"1000000"},"matchedSize":{"type":"string","pattern":"^[0-9]+$","description":"Taker fill size in raw 6-decimal position-token units.","example":"2000000"},"price":{"type":"number","minimum":0,"maximum":1,"description":"Weighted average fill price.","example":0.5},"profile":{"$ref":"#/components/schemas/MarketEventProfile"},"side":{"type":"number","enum":[0,1],"description":"Taker side: 0 = BUY, 1 = SELL.","example":0},"takerAmount":{"type":"string","pattern":"^[0-9]+$","description":"Trade collateral cost in raw 6-decimal units. Currently equal to makerAmount.","example":"1000000"},"title":{"type":"string","description":"Title of the market where the trade occurred."},"tokenId":{"type":"string","pattern":"^[0-9]+$","description":"Taker position-token ID."},"txHash":{"type":"string","description":"Settlement transaction hash."}},"additionalProperties":false,"description":"One finalized MINED CLOB trade, attributed to its taker when a public profile is available.","required":["createdAt","makerAmount","matchedSize","price","side","takerAmount","title","tokenId","txHash"]},"MarketEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/MarketEvent"}},"limit":{"type":"integer","minimum":1,"maximum":100},"page":{"type":"integer","minimum":1},"totalPages":{"type":"integer","minimum":1},"totalRows":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["events","limit","page","totalPages","totalRows"]},"EmptyMarketEventsResponse":{"type":"object","properties":{"events":{"maxItems":0,"type":"array","items":{"$ref":"#/components/schemas/MarketEvent"}},"totalPages":{"type":"number","enum":[0]}},"additionalProperties":false,"description":"Current reduced response for an empty or out-of-range event page.","required":["events","totalPages"]},"ErrorMessageResponse":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]},"NestErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"},"statusCode":{"type":"integer"}},"additionalProperties":false,"required":["message","error","statusCode"]},"ValidationErrorItem":{"type":"object","properties":{"field":{"type":"string","example":"orderIds"},"message":{"type":"string","example":"orderIds should not be empty"}},"additionalProperties":false,"required":["field","message"]},"ValidationErrorResponse":{"type":"object","properties":{"message":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}},"error":{"type":"string","enum":["Bad Request"]},"statusCode":{"type":"number","enum":[400]}},"additionalProperties":false,"required":["message","error","statusCode"]},"ProfileSearchResultDto":{"type":"object","properties":{"account":{"type":"string","description":"Trade-wallet display address — the address `/profile/{account}` resolves.","example":"0xdeE652cB4DB561F7E18C346DdfE79dd4926551dc"},"username":{"type":"string","example":"KetchumNfts","nullable":true},"pfpUrl":{"type":"string","example":"https://…","nullable":true},"id":{"type":"number","example":4212,"description":"Profile id. `/follow/ids` is keyed by it, so follow state can be resolved client-side."},"xHandle":{"type":"string","example":"KetchumNfts","description":"Omitted when X is not connected."},"xVerified":{"type":"boolean","example":true,"description":"Omitted when X is not connected."},"rankName":{"type":"string","example":"Gold","description":"Profile rank. Omitted when unranked."},"volume":{"type":"number","example":12437.52,"description":"Lifetime traded volume in USD. Omitted when the profile has never traded."},"kix":{"type":"number","example":1240,"description":"KIX (Knowledge Index) score. Omitted when the profile has no score yet."},"followers":{"type":"number","example":22,"description":"Followers on Limitless. Omitted when the profile has none."}},"required":["account","username","pfpUrl","id"]},"SearchProfilesResponseDto":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSearchResultDto"}}},"required":["users"]},"PortfolioRewardsChartEntryDto":{"type":"object","properties":{"timestamp":{"type":"number","description":"Timestamp of the rewards entry","example":1672531200000},"userRewards":{"type":"string","description":"User rewards for this timestamp in token decimals","example":"25000000"},"totalRewards":{"type":"string","description":"Total rewards for this timestamp in token decimals","example":"60000000"}},"required":["timestamp","userRewards","totalRewards"]},"EpochRewardDataDto":{"type":"object","properties":{"epochId":{"type":"number","description":"Unique identifier of the epoch","example":1},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the epoch occurred","example":"2024-01-01T00:00:00.000Z"},"totalRewards":{"type":"string","description":"Total rewards distributed in this epoch in token decimals","example":"1500000"},"userRewards":{"type":"string","description":"User rewards earned in this epoch in token decimals","example":"150000"},"earnedPercent":{"type":"number","description":"Part of total rewards earned by the user - [0; 1]","example":0.1}},"required":["epochId","timestamp","totalRewards","userRewards","earnedPercent"]},"PortfolioRewardsDto":{"type":"object","properties":{"todaysRewards":{"type":"string","description":"Rewards earned today in token decimals","example":"50250000"},"totalUnpaidRewards":{"type":"string","description":"Total unpaid rewards in token decimals","example":"200750000"},"totalUserRewardsLastEpoch":{"type":"string","description":"Total user rewards from the last epoch in token decimals","example":"150500000"},"rewardsChartData":{"description":"Chart data showing rewards over time","type":"array","items":{"$ref":"#/components/schemas/PortfolioRewardsChartEntryDto"}},"rewardsByEpoch":{"description":"Rewards data by epoch","type":"array","items":{"$ref":"#/components/schemas/EpochRewardDataDto"}}},"required":["todaysRewards","totalUnpaidRewards","totalUserRewardsLastEpoch","rewardsByEpoch"]},"AmmPositionDto":{"type":"object","properties":{"collateralAmount":{"type":"string","description":"Amount of collateral invested in token decimals","example":"100500000"},"latestTrade":{"type":"object","description":"Latest trade associated with this position"},"market":{"type":"object","description":"Market information for this position"},"outcomeIndex":{"type":"number","description":"Index of the outcome token","example":0},"outcomeTokenAmount":{"type":"string","description":"Amount of outcome tokens held in token decimals","example":"50250000"},"account":{"type":"string","description":"Wallet address that was used to create this position","example":"0x1234567890123456789012345678901234567890"}},"required":["market","outcomeIndex"]},"Market":{"type":"object","properties":{"address":{"type":"object","description":"The address of the FixedProductMarketMaker contract.","minLength":42,"maxLength":42,"nullable":true,"uniqueItems":true},"title":{"type":"string","description":"Represents the question of the market, the title metadata of the market.","nullable":false,"uniqueItems":true},"proxyTitle":{"type":"string","maxLength":120,"default":null,"nullable":true,"uniqueItems":true},"description":{"type":"string","description":"The description of the market.","uniqueItems":false,"nullable":false},"question_id":{"type":"object","description":"The bytes32 parsed title of the market.","minLength":66,"maxLength":66,"uniqueItems":true,"nullable":true},"condition_id":{"type":"object","description":"The bytes32 conditionId of the market, representing the conditions defined on condition preparation.","minLength":66,"maxLength":66,"nullable":true,"uniqueItems":true},"position_ids":{"description":"Array of position IDs (max 2 elements)","maxItems":2,"nullable":true,"items":{"type":"array"},"type":"array"},"outcome_slot_count":{"type":"number","description":"The number of outcomes in the market.","minimum":2,"maximum":2,"nullable":false,"default":2},"winning_index":{"type":"number","description":"The outcome index that was reported by the oracle.","minimum":0,"maximum":1,"nullable":true},"payout_numerators":{"description":"The oracle payout numerators that the oracle reported.","nullable":true,"type":"array","items":{"type":"string"}},"status":{"type":"object","description":"Indicates the status of the market.","nullable":false},"og_url":{"type":"string","description":"The URL of the market OG image for SEO.","nullable":true},"image_url":{"type":"string","description":"The URL of the market logo image for SEO.","nullable":true},"deadline":{"type":"string","description":"The deadline of the market.","nullable":false},"startAt":{"format":"date-time","type":"string","description":"The start time of the market.","nullable":true},"hidden":{"type":"boolean","default":false},"txHash":{"type":"string","default":null},"resolutionTxHash":{"type":"string","default":null},"priority_index":{"type":"number","default":null}},"required":["address","title","proxyTitle","description","question_id","condition_id","position_ids","outcome_slot_count","winning_index","payout_numerators","status","og_url","image_url","deadline","startAt","hidden","txHash","resolutionTxHash","priority_index"]},"PositionDataDto":{"type":"object","properties":{"cost":{"type":"string","description":"Cost basis of the position in token decimals (e.g. 1 USDC = 1000000)","example":"75000000"},"fillPrice":{"type":"string","description":"Average fill price of the position (price per share in token decimals)","example":"750000"},"realisedPnl":{"type":"string","description":"Realized profit/loss from closed positions in token decimals","example":"0"},"unrealizedPnl":{"type":"string","description":"Unrealized profit/loss based on current market price in token decimals","example":"25000000"},"marketValue":{"type":"string","description":"Current market value of the position in token decimals","example":"100000000"}},"required":["cost","fillPrice","realisedPnl","unrealizedPnl","marketValue"]},"MarketPositionDataDto":{"type":"object","properties":{"yes":{"description":"Position data for YES outcome","example":{"cost":"75000000","fillPrice":"750000","realisedPnl":"0","unrealizedPnl":"25000000","marketValue":"100000000"},"allOf":[{"$ref":"#/components/schemas/PositionDataDto"}]},"no":{"description":"Position data for NO outcome","example":{"cost":"25000000","fillPrice":"250000","realisedPnl":"0","unrealizedPnl":"-5000000","marketValue":"20000000"},"allOf":[{"$ref":"#/components/schemas/PositionDataDto"}]}},"required":["yes","no"]},"ClobPositionDto":{"type":"object","properties":{"market":{"description":"Market information","allOf":[{"$ref":"#/components/schemas/Market"}]},"positions":{"description":"Position data for the market","allOf":[{"$ref":"#/components/schemas/MarketPositionDataDto"}]},"latestTrade":{"type":"object","description":"Latest trade prices"},"tokensBalance":{"type":"object","description":"Token balances in token decimals"},"orders":{"type":"object","description":"Order information"},"rewards":{"type":"object","description":"Rewards information for this position"}},"required":["market","positions","tokensBalance","orders"]},"PortfolioPositionsDto":{"type":"object","properties":{"rewards":{"description":"Rewards information for the portfolio","allOf":[{"$ref":"#/components/schemas/PortfolioRewardsDto"}]},"points":{"type":"number","description":"User points","example":123},"accumulativePoints":{"type":"number","description":"User accumulative points","example":456},"amm":{"description":"List of AMM positions","type":"array","items":{"$ref":"#/components/schemas/AmmPositionDto"}},"clob":{"description":"List of CLOB positions","type":"array","items":{"$ref":"#/components/schemas/ClobPositionDto"}},"group":{"description":"Grouped CLOB positions (if enabled)","type":"array","items":{"type":"object"}}},"required":["rewards","points","accumulativePoints","amm","clob"]},"PortfolioPnlChartPointDto":{"type":"object","properties":{"timestamp":{"type":"number","description":"Point timestamp (ms)","example":1700000000000},"value":{"type":"number","description":"Series value in USD (realised PnL)","example":123.45}},"required":["timestamp","value"]},"PortfolioPnlChartDto":{"type":"object","properties":{"timeframe":{"type":"string","description":"Timeframe window used for previous/current comparison","example":"7d"},"data":{"description":"Realised PnL series (USD) for the selected timeframe","type":"array","items":{"$ref":"#/components/schemas/PortfolioPnlChartPointDto"}},"currentValue":{"type":"number","description":"Current realised PnL (USD)","example":-7.04},"previousValue":{"type":"number","description":"Previous realised PnL (USD) at timeframe start","example":-6.5},"percentChange":{"type":"number","description":"Percent change between previousValue and currentValue (realised PnL)","example":8.24},"current":{"type":"object","description":"Current realised PnL snapshot","nullable":true}},"required":["timeframe","data","currentValue","previousValue","percentChange"]},"HistoryMarketGroupDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the group","example":10000037},"slug":{"type":"string","description":"Slug identifier of the group","example":"positionconverted-test-1744046422596"},"title":{"type":"string","description":"Title of the group","example":"PositionConverted test"},"imageUrl":{"type":"string","description":"Group logo image URL","nullable":true,"example":"https://storage.googleapis.com/limitless-exchange-assets/group.png"},"status":{"type":"string","description":"Status of the group","example":"FUNDED"},"deadline":{"type":"string","description":"Deadline for the group","example":"2025-04-11T22:34:56.000Z"},"hidden":{"type":"boolean","description":"Whether the group is hidden","example":false},"txHash":{"type":"string","description":"Transaction hash for the group","example":null},"resolutionTxHash":{"type":"string","description":"Resolution transaction hash","example":null},"priorityIndex":{"type":"number","description":"Priority index of the group","example":0},"metadata":{"type":"object","description":"Group metadata","example":{"isBannered":false}},"negRiskMarketId":{"type":"string","description":"Onchain NegRisk market ID as identified by the NegriskAdapter smart-contract","example":"0xe103633b40e9b664f8acc89e8cf7b7916475961ae1708a249fa5d6c933168c00"},"createdAt":{"type":"string","description":"Creation timestamp","example":"2025-04-07T17:20:22.135Z"},"updatedAt":{"type":"string","description":"Last update timestamp","example":"2025-04-07T17:22:08.464Z"}},"required":["id","slug","title","status","deadline","hidden","priorityIndex","metadata","negRiskMarketId","createdAt","updatedAt"]},"HistoryMarketDto":{"type":"object","properties":{"closed":{"type":"boolean","description":"Whether the market is closed","example":false},"collateral":{"type":"object","description":"Collateral token information","example":{"symbol":"USDC","id":7,"decimals":6}},"group":{"description":"Market group information","allOf":[{"$ref":"#/components/schemas/HistoryMarketGroupDto"}]},"condition_id":{"type":"string","description":"Condition ID of the market","example":"0x08518bc4bb8a3dbb89aac4425ace0876b94a5dfa77dee47a20737a19cf67e325"},"funding":{"type":"number","description":"Market funding amount","example":0},"id":{"type":"number","description":"Market ID","example":980},"slug":{"type":"string","description":"Market slug","example":"market-1-1744046422691"},"title":{"type":"string","description":"Market title","example":"Market 1"},"deadline":{"type":"string","description":"Market deadline","example":"2025-04-11T22:34:56.000Z"},"imageUrl":{"type":"string","description":"Market logo image URL","nullable":true,"example":"https://storage.googleapis.com/limitless-exchange-assets/market.png"}},"required":["closed","collateral","group","condition_id","funding","id","slug","title","deadline"]},"HistoryEntryDto":{"type":"object","properties":{"blockTimestamp":{"type":"number","description":"Block timestamp of the operation","example":1744115608},"tradeEventId":{"type":"string","description":"CLOB trade event ID"},"orderId":{"type":"string","description":"CLOB order ID"},"makerMatchId":{"type":"string","description":"CLOB maker match ID"},"collateralAmount":{"type":"string","description":"Collateral amount involved in the operation","example":"0"},"market":{"description":"Market information","allOf":[{"$ref":"#/components/schemas/HistoryMarketDto"}]},"outcomeTokenAmount":{"type":"string","description":"Amount of outcome tokens involved","example":"100"},"outcomeTokenAmounts":{"description":"Amounts of outcome tokens for each outcome","example":["100","0"],"type":"array","items":{"type":"string"}},"outcomeIndex":{"type":"number","description":"Index of the outcome","example":0},"outcomeTokenPrice":{"type":"number","description":"Price of the outcome token","example":0.5},"strategy":{"type":"string","description":"Type of operation","example":"Convert","enum":["Buy","Sell","Limit Buy","Limit Sell","Market Buy","Market Sell","Split","Merge","Convert"]},"transactionHash":{"type":"string","description":"Transaction hash of the operation","example":"0x992f36465f938b21a6a5fe3c417c98c3268a616a05479d2dc53870c6cd1a0761"}},"required":["blockTimestamp","collateralAmount","market","outcomeTokenAmount","outcomeTokenAmounts","outcomeIndex","outcomeTokenPrice","strategy"]},"HistoryResponseDto":{"type":"object","properties":{"data":{"description":"List of history entries","type":"array","items":{"$ref":"#/components/schemas/HistoryEntryDto"}},"totalCount":{"type":"number","description":"Total count of entries (null in cursor mode)","example":8,"nullable":true},"nextCursor":{"type":"string","description":"Opaque cursor for the next page (null when no more pages)","nullable":true}},"required":["data","totalCount"]},"PortfolioPnlValueDto":{"type":"object","properties":{"raw":{"type":"string","description":"PnL value in base units","example":"-7047204"},"formatted":{"type":"string","description":"PnL value formatted using token decimals","example":"-7.047204"},"usd":{"type":"string","description":"PnL value formatted in USD (if available)","example":"-7.047204","nullable":true}},"required":["raw","formatted"]},"PortfolioPnlProfileCategoryDto":{"type":"object","properties":{"id":{"type":"string","description":"Backend category id. The synthetic residual bucket uses \"other\".","example":"sport"},"name":{"type":"string","description":"Display name","example":"Sport"},"slug":{"type":"string","description":"Navigation slug, or null for synthetic categories","example":"sport","nullable":true},"path":{"type":"string","description":"Navigation path, or null for synthetic categories","example":"/markets/sport","nullable":true},"icon":{"type":"string","description":"Navigation icon URL/key, or null when not configured","example":null,"nullable":true},"realisedPnl":{"description":"Realised PnL for this category over the selected effective timeline","allOf":[{"$ref":"#/components/schemas/PortfolioPnlValueDto"}]}},"required":["id","name","slug","path","icon","realisedPnl"]},"PortfolioPnlProfileBreakdownDto":{"type":"object","properties":{"id":{"type":"string","description":"Backend category id. The synthetic residual bucket uses \"other\".","example":"sport"},"name":{"type":"string","description":"Display name","example":"Sport"},"slug":{"type":"string","description":"Navigation slug, or null for synthetic categories","example":"sport","nullable":true},"path":{"type":"string","description":"Navigation path, or null for synthetic categories","example":"/markets/sport","nullable":true},"icon":{"type":"string","description":"Navigation icon URL/key, or null when not configured","example":null,"nullable":true},"realisedPnl":{"description":"Realised PnL for this category over the selected effective timeline","allOf":[{"$ref":"#/components/schemas/PortfolioPnlValueDto"}]}},"required":["id","name","slug","path","icon","realisedPnl"]},"PortfolioPnlProfilePointDto":{"type":"object","properties":{"timestamp":{"type":"number","description":"Point timestamp (ms)","example":1700000000000},"value":{"type":"number","description":"Total realised PnL over the selected effective timeline at this point","example":123.45},"breakdown":{"description":"Point-in-time tooltip breakdown: top 3 named categories plus synthetic Other residual. Empty for all.","type":"array","items":{"$ref":"#/components/schemas/PortfolioPnlProfileBreakdownDto"}}},"required":["timestamp","value","breakdown"]},"PortfolioPnlProfileDto":{"type":"object","properties":{"timeframe":{"type":"string","description":"Requested timeframe","enum":["all","1d","1m","1w"],"example":"1w"},"windowStart":{"type":"string","description":"Window start relative to the closed UTC five-minute boundary; earliest available hourly bucket for all","example":"2026-08-05T21:50:00.000Z"},"current":{"description":"Current realised PnL over the selected effective timeline","allOf":[{"$ref":"#/components/schemas/PortfolioPnlValueDto"}]},"categories":{"description":"Period categories sorted by realised PnL descending; empty for all","type":"array","items":{"$ref":"#/components/schemas/PortfolioPnlProfileCategoryDto"}},"data":{"description":"Cumulative realised PnL timeline","type":"array","items":{"$ref":"#/components/schemas/PortfolioPnlProfilePointDto"}}},"required":["timeframe","windowStart","current","categories","data"]},"RedeemPositionsDto":{"type":"object","properties":{"conditionId":{"type":"string","description":"The bytes32 conditionId of the resolved market to redeem","example":"0xa0ba8fd0acc2b86585734c07eb3bef4133f584d5abde78a558a6b8bfc3bbdec0"},"onBehalfOf":{"type":"number","description":"Profile ID of the managed sub-account (partner flow). Must be a child of the authenticated partner."}},"required":["conditionId"]},"WithdrawDto":{"type":"object","properties":{"amount":{"type":"string","description":"Amount to withdraw in the smallest token unit (e.g. 1000000 = 1 USDC)","example":"1000000"},"token":{"type":"string","description":"ERC20 token address to withdraw. Defaults to USDC if omitted."},"destination":{"type":"string","description":"Destination address for the withdrawal. Must be the authenticated account, smart wallet, or an active whitelisted withdrawal address. Defaults to the Etherspot smart wallet when available, otherwise the authenticated account. When onBehalfOf is set, the whitelist used is the authenticated caller's whitelist, not the target sub-account's."},"onBehalfOf":{"type":"number","description":"Profile ID of the managed sub-account (partner flow). Must be a child of the authenticated partner."}},"required":["amount"]},"PositionOperationVenueDto":{"type":"object","properties":{"exchange":{"type":"string","description":"CLOB exchange address from the market response. Accepted for payload compatibility; split/merge routes simple/CLOB markets through ConditionalTokens.","example":"0xe3E00BA3a9888d1DE4834269f62ac008b4BB5C47"},"adapter":{"type":"string","description":"NegRiskAdapter address from the market response. When present, split/merge routes through this adapter.","example":"0x6151EF8368b6316c1aa3C68453EF083ad31E712D"}}},"PositionOperationDto":{"type":"object","properties":{"conditionId":{"type":"string","description":"The bytes32 conditionId of the market. For simple/CLOB markets this is the only market field required.","example":"0xa0ba8fd0acc2b86585734c07eb3bef4133f584d5abde78a558a6b8bfc3bbdec0"},"amount":{"type":"string","description":"Amount in collateral base units (USDC = 6 decimals). For split: collateral to convert into a full outcome set. For merge: number of complete sets to convert back.","example":"1000000"},"venue":{"description":"Venue object from the market response. Its adapter field routes through NegRiskAdapter; without adapter, exchange is required and the operation routes as simple/CLOB.","allOf":[{"$ref":"#/components/schemas/PositionOperationVenueDto"}]},"onBehalfOf":{"type":"number","description":"Profile ID of the managed sub-account (partner flow). Must be a child of the authenticated partner."}},"required":["conditionId","amount","venue"]},"CreateWithdrawalAddressDto":{"type":"object","properties":{"address":{"type":"string","description":"External withdrawal destination address. The API validates and stores the checksummed address.","example":"0x0F3262730c909408042F9Da345a916dc0e1F9787"},"label":{"type":"string","description":"Optional label for operators and clients.","example":"treasury"}},"required":["address"]},"FeeEarningsSummaryDto":{"type":"object","properties":{"currency":{"type":"string","example":"USDC"},"decimals":{"type":"number","example":6},"totalRaw":{"type":"string","example":"15000000"},"cashbackRaw":{"type":"string","example":"1000000"},"referralRaw":{"type":"string","example":"2000000"},"shareFeeRaw":{"type":"string","example":"3000000"},"makerRebateRaw":{"type":"string","example":"4000000"},"creatorFeeRaw":{"type":"string","example":"5000000"}},"required":["currency","decimals","totalRaw","cashbackRaw","referralRaw","shareFeeRaw","makerRebateRaw","creatorFeeRaw"]},"FeeEarningDto":{"type":"object","properties":{"id":{"type":"string","example":"pack:2b1e1bc8-e39a-4f32-92bf-6f122eae0d3c"},"type":{"type":"string","enum":["cashback","referral","share_fee","maker_rebate","creator_fee"]},"source":{"type":"string","enum":["pack","clob"]},"accountingBasis":{"type":"string","enum":["accrued","paid"]},"amountRaw":{"type":"string","example":"1250000"},"occurredAt":{"type":"string","example":"2026-10-01T12:34:56.123456Z"},"parlayId":{"type":"string","example":"9d5e9c24-2d8b-413a-bf0c-2a7f2cb31b08"},"marketId":{"type":"number","example":34733},"tradeEventId":{"type":"string","example":"7d38d83d-b7ca-4472-837c-007372e1deb8"},"makerMatchId":{"type":"string","example":"0848c353-3f72-45f4-9519-a5787f8e85b9"},"orderId":{"type":"string","example":"e7983113-8e54-40f5-bec6-b72b9d0d4506"},"payoutRunId":{"type":"string","example":"123456"}},"required":["id","type","source","accountingBasis","amountRaw","occurredAt"]},"FeeEarningsHistoryDto":{"type":"object","properties":{"currency":{"type":"string","example":"USDC"},"decimals":{"type":"number","example":6},"data":{"type":"array","items":{"$ref":"#/components/schemas/FeeEarningDto"}},"nextCursor":{"type":"string","nullable":true}},"required":["currency","decimals","data","nextCursor"]},"ModerateCustomMarketContentDto":{"type":"object","properties":{}},"PrepareCustomMarketDto":{"type":"object","properties":{}},"CreateCustomMarketDto":{"type":"object","properties":{}},"ResolveCustomMarketDto":{"type":"object","properties":{}},"ClobShareFeeRateResponseDto":{"type":"object","properties":{"shareRatePercent":{"type":"number","nullable":true,"minimum":0,"maximum":100,"example":25,"description":"Current share of the taker fee remaining after referral and creator deductions, in percent. Null when CLOB share fees are disabled."}},"required":["shareRatePercent"]},"TradingDisabledErrorResponse":{"type":"object","properties":{"code":{"type":"string","enum":["trading_disabled"]},"message":{"type":"string","enum":["Trading is currently disabled."]},"mode":{"type":"string","enum":["disabled"]},"resumeAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["code","message","mode"]},"TradingModeErrorResponse":{"type":"object","properties":{"code":{"type":"string","enum":["post_only_mode","cancel_only_mode","trading_disabled"]},"message":{"type":"string","example":"Trading is currently cancel-only. New orders are not accepted, but cancels are allowed."},"mode":{"type":"string","enum":["post_only","cancel_only","disabled"]},"resumeAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false,"required":["code","message","mode"]},"CancelOrderFailure":{"type":"object","properties":{"orderId":{"type":"string","description":"Order ID that failed to cancel","example":"b53f0e4b-1529-45cc-ad39-e27f4c6eab5a","format":"uuid"},"reason":{"type":"string","description":"Error code indicating the reason for failure","example":"ORDER_NOT_FOUND","enum":["ORDER_NOT_FOUND","ORDER_RELEASE_IN_PROGRESS","UNKNOWN_ERROR"]},"message":{"type":"string","description":"User-friendly error message","example":"Order not found or already canceled"},"retryable":{"type":"boolean","description":"Whether retrying cancellation later may succeed","example":true}},"required":["orderId","reason","message"]},"CancelOrderBatchPartialResponse":{"type":"object","properties":{"message":{"type":"string","example":"Orders canceled successfully"},"canceled":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}},"failed":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/CancelOrderFailure"}}},"required":["message","canceled","failed"]},"CancelOrderBatchAllFailedResponse":{"type":"object","properties":{"message":{"type":"string","enum":["Failed to cancel any orders"]},"failed":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/CancelOrderFailure"}}},"additionalProperties":false,"required":["message","failed"]},"ClientOrderCancelSuccess":{"type":"object","properties":{"clientOrderId":{"type":"string","description":"Client-provided order ID from order creation","example":"partner-order-001","maxLength":128},"orderId":{"type":"string","description":"Internal order ID","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","format":"uuid"}},"required":["clientOrderId","orderId"]},"ClientOrderCancelFailure":{"type":"object","properties":{"clientOrderId":{"type":"string","description":"Client-provided order ID from order creation","example":"partner-order-002","maxLength":128},"orderId":{"type":"string","description":"Internal order ID, when resolution succeeded before cancellation failed","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","format":"uuid"},"reason":{"type":"string","description":"Failure reason","example":"ORDER_NOT_FOUND","enum":["ORDER_NOT_FOUND","ORDER_RELEASE_IN_PROGRESS","UNKNOWN_ERROR"]},"message":{"type":"string","description":"Human-readable failure message","example":"Order not found"},"retryable":{"type":"boolean","description":"Whether retrying cancellation later may succeed","example":true}},"required":["clientOrderId","reason","message"]},"CancelOrderBatchCombinedResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Orders canceled successfully","enum":["Orders canceled successfully","No orders canceled"]},"canceled":{"description":"Canceled client-order-id records","type":"array","items":{"$ref":"#/components/schemas/ClientOrderCancelSuccess"}},"failed":{"description":"Client-order-id cancel failures","type":"array","items":{"$ref":"#/components/schemas/ClientOrderCancelFailure"}}},"required":["message"]},"ClientOrderBatchPartialResponse":{"type":"object","properties":{"message":{"type":"string","example":"Orders canceled successfully","enum":["Orders canceled successfully","No orders canceled"]},"canceled":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ClientOrderCancelSuccess"}},"failed":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ClientOrderCancelFailure"}}},"required":["message","canceled","failed"]},"ClientOrderBatchAllFailedResponse":{"type":"object","properties":{"message":{"type":"string","example":"No orders canceled","enum":["Orders canceled successfully","No orders canceled"]},"failed":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ClientOrderCancelFailure"}}},"required":["message","failed"]},"MarketGroupSlimDto":{"type":"object","properties":{"id":{"type":"integer","example":42},"slug":{"type":"string","example":"btc-price-markets"},"title":{"type":"string","example":"BTC Price Markets"}},"required":["id","slug","title"]},"MarketSlimDto":{"type":"object","properties":{"id":{"type":"integer","example":7348},"slug":{"type":"string","example":"btc-up-or-down-1-hour"},"title":{"type":"string","example":"BTC Up or Down - Hourly"},"status":{"type":"string","example":"FUNDED","enum":["CREATED","DRAFTED","FUNDED","LOCKED","RESOLVED"]},"yesPositionId":{"type":"string","example":"11514974713064423461...","nullable":true},"noPositionId":{"type":"string","example":"14525308260861904048...","nullable":true},"group":{"$ref":"#/components/schemas/MarketGroupSlimDto"}},"required":["id","slug","title","status","yesPositionId","noPositionId"]},"HistoricalOrderOwner":{"type":"object","properties":{"id":{"type":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"client":{"type":"string"},"tradeWalletOption":{"type":"string","nullable":true,"enum":["eoa","smartWallet"]},"smartWallet":{"type":"string","nullable":true},"points":{"type":"number","enum":[0]},"referredUsersCount":{"type":"number","enum":[0]}},"required":["id","account","client","tradeWalletOption","smartWallet","points","referredUsersCount"]},"HistoricalOrderDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal order ID"},"salt":{"type":"string","description":"Order salt as a decimal string","example":"1778155025318314496"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"taker":{"type":"string","nullable":true,"pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"string"},"expiration":{"type":"string","format":"date-time","nullable":true},"signatureType":{"type":"number","enum":[0,1,2,3]},"feeRateBps":{"type":"integer","nullable":true},"signature":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$"},"orderType":{"type":"string","enum":["GTC","FAK","FOK"]},"side":{"type":"number","enum":[0,1],"description":"0 = BUY, 1 = SELL"},"marketId":{"type":"string"},"ownerId":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"market":{"$ref":"#/components/schemas/MarketSlimDto"},"makerAmount":{"type":"string","description":"Raw 6-decimal amount as a decimal string","example":"5000000"},"takerAmount":{"type":"string","description":"Raw 6-decimal amount as a decimal string","example":"10000000"},"nonce":{"type":"string","enum":["0"],"description":"Numeric zero as a decimal string"},"price":{"type":"string","nullable":true,"example":"0.75"},"owner":{"$ref":"#/components/schemas/HistoricalOrderOwner"}},"required":["id","salt","maker","signer","tokenId","signatureType","signature","orderType","side","marketId","ownerId","createdAt","market","makerAmount","takerAmount","nonce","owner"]},"MakerMatchOwner":{"type":"object","properties":{"id":{"type":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"client":{"type":"string"},"tradeWalletOption":{"type":"string","nullable":true,"enum":["eoa","smartWallet"]},"smartWallet":{"type":"string","nullable":true},"username":{"type":"string"},"displayName":{"type":"string"},"pfpUrl":{"type":"string","nullable":true},"socialUrl":{"type":"string","nullable":true},"points":{"type":"number","enum":[0]},"referredUsersCount":{"type":"number","enum":[0]}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","points","referredUsersCount"]},"MakerMatchOrder":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"price":{"type":"string","nullable":true,"example":"0.55"},"side":{"type":"number","enum":[0,1]},"tokenId":{"type":"string"},"owner":{"$ref":"#/components/schemas/MakerMatchOwner"}},"required":["id","maker","price","side","tokenId","owner"]},"MakerMatch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"matchedSize":{"type":"string","description":"Matched contracts in raw 6-decimal units.","example":"1000000"},"fillPrice":{"type":"string","description":"Effective taker-perspective fill price.","example":"0.55"},"fillCost":{"type":"string","description":"Fill collateral cost in raw 6-decimal units.","example":"550000"},"orderId":{"type":"string","format":"uuid"},"order":{"$ref":"#/components/schemas/MakerMatchOrder"}},"required":["id","matchedSize","fillPrice","fillCost","orderId","order"]},"OrderExecutionTotalsRawDto":{"type":"object","properties":{"contractsGross":{"type":"string","example":"1000000"},"contractsFee":{"type":"string","example":"1000"},"contractsNet":{"type":"string","example":"999000"},"usdGross":{"type":"string","example":"500000"},"usdFee":{"type":"string","example":"500"},"usdNet":{"type":"string","example":"499500"}},"required":["contractsGross","contractsFee","contractsNet","usdGross","usdFee","usdNet"]},"OrderExecutionSummary":{"type":"object","properties":{"clientOrderId":{"type":"string"},"feeRateBps":{"type":"number","example":0},"effectiveFeeBps":{"type":"number","example":0},"matched":{"type":"boolean"},"settlementStatus":{"type":"string","enum":["UNMATCHED","DELAYED","MATCHED","MINED","CONFIRMED","RETRYING","FAILED"]},"eligibleAt":{"type":"string","format":"date-time"},"tradeEventId":{"type":"string"},"txHash":{"type":"string","nullable":true},"totalsRaw":{"$ref":"#/components/schemas/OrderExecutionTotalsRawDto"}},"required":["feeRateBps","effectiveFeeBps","matched","settlementStatus","totalsRaw"]},"HistoricalOrderResponseDto":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/HistoricalOrderDto"},"makerMatches":{"type":"array","items":{"$ref":"#/components/schemas/MakerMatch"}},"execution":{"$ref":"#/components/schemas/OrderExecutionSummary"}},"required":["order","execution"]},"CancelReplaceError":{"type":"object","properties":{"code":{"type":"string","description":"ORDER_NOT_FOUND, FEE_RATE_MISMATCH, a decimal HTTP status such as 400/404/409/425/500, or INTERNAL_ERROR.","example":"ORDER_NOT_FOUND"},"expectedFeeRateBps":{"type":"integer","minimum":0},"message":{"type":"string","example":"Order not found"}},"description":"Operation-level error. Code is not a closed enum: ORDER_NOT_FOUND identifies a missing cancellation target, FEE_RATE_MISMATCH identifies a stale replacement fee, decimal HTTP status strings identify captured HTTP failures, and INTERNAL_ERROR identifies uncategorized errors.","required":["code","message"]},"CancelReplaceCancelSuccess":{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"orderId":{"type":"string","format":"uuid"},"clientOrderId":{"type":"string"}},"required":["status","orderId"]},"CancelReplaceCancelError":{"type":"object","properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"]},"error":{"$ref":"#/components/schemas/CancelReplaceError"}},"description":"FAILURE covers a missing target or expected HTTP error below 500. UNKNOWN means the cancellation outcome could not be determined.","required":["status","error"]},"CancelReplaceCancelResult":{"type":"object","properties":{},"oneOf":[{"$ref":"#/components/schemas/CancelReplaceCancelSuccess"},{"$ref":"#/components/schemas/CancelReplaceCancelError"}]},"CreatedOrderOwner":{"type":"object","properties":{"id":{"type":"integer"},"account":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"client":{"type":"string"},"tradeWalletOption":{"type":"string","nullable":true,"enum":["eoa","smartWallet"]},"smartWallet":{"type":"string","nullable":true},"username":{"type":"string"},"displayName":{"type":"string"},"pfpUrl":{"type":"string","nullable":true},"socialUrl":{"type":"string","nullable":true},"rankName":{"type":"string"},"points":{"type":"number"},"isTop100":{"type":"boolean"},"leaderboardPosition":{"type":"integer"},"referredUsersCount":{"type":"integer"}},"required":["id","account","client","tradeWalletOption","smartWallet","username","displayName","pfpUrl","socialUrl","rankName","points","referredUsersCount"]},"CreatedOrderDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal order ID"},"salt":{"type":"string","description":"Order salt as a decimal string","example":"1778155025318314496"},"maker":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"taker":{"type":"string","nullable":true,"pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"string"},"expiration":{"type":"string","format":"date-time","nullable":true},"signatureType":{"type":"number","enum":[0,1,2,3]},"feeRateBps":{"type":"integer","nullable":true},"signature":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$"},"orderType":{"type":"string","enum":["GTC","FAK","FOK"]},"side":{"type":"number","enum":[0,1],"description":"0 = BUY, 1 = SELL"},"marketId":{"type":"string"},"ownerId":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"market":{"$ref":"#/components/schemas/MarketSlimDto"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":5000000},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount","example":10000000},"nonce":{"type":"number","enum":[0],"description":"Numeric zero"},"price":{"type":"number","example":0.75},"owner":{"$ref":"#/components/schemas/CreatedOrderOwner"}},"required":["id","salt","maker","signer","tokenId","signatureType","signature","orderType","side","marketId","ownerId","createdAt","market","makerAmount","takerAmount","nonce","owner"]},"OrderExecutionDto":{"type":"object","properties":{"matched":{"type":"boolean","example":true},"settlementStatus":{"type":"string","example":"MINED","enum":["UNMATCHED","MATCHED","MINED","CONFIRMED","RETRYING","FAILED","DELAYED","CANCELED"]},"reason":{"type":"string","example":"settlement transaction reverted"},"eligibleAt":{"type":"string","example":"2026-06-08T10:15:30.000Z","format":"date-time","nullable":true},"tradeEventId":{"type":"string","example":"4aa706dd-6c57-4f3c-945a-99818dfd95f1"},"txHash":{"type":"string","example":"0xabc123","nullable":true},"clientOrderId":{"type":"string","example":"client-order-001"},"stpMakerCancels":{"example":["4aa706dd-6c57-4f3c-945a-99818dfd95f1"],"type":"array","items":{"type":"string"}},"feeRateBps":{"type":"number","example":25},"effectiveFeeBps":{"type":"number","example":26},"totalsRaw":{"$ref":"#/components/schemas/OrderExecutionTotalsRawDto"}},"required":["matched","settlementStatus","feeRateBps","effectiveFeeBps","totalsRaw"]},"OrderResponseDto":{"type":"object","properties":{"order":{"description":"Order details including slim market and owner","allOf":[{"$ref":"#/components/schemas/CreatedOrderDto"}]},"makerMatches":{"description":"Maker matches if order was matched immediately","type":"array","items":{"$ref":"#/components/schemas/MakerMatch"}},"execution":{"description":"Execution and settlement summary","allOf":[{"$ref":"#/components/schemas/OrderExecutionDto"}]}},"required":["order","execution"]},"CancelReplacePlacementSuccess":{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"data":{"$ref":"#/components/schemas/OrderResponseDto"}},"description":"The matching engine accepted the replacement. The canonical created-order, owner, maker-match, and execution schemas are reused; nested settlementStatus may still be FAILED with a free-form reason.","required":["status","data"]},"CancelReplacePlacementError":{"type":"object","properties":{"status":{"type":"string","enum":["FAILURE","UNKNOWN"]},"error":{"$ref":"#/components/schemas/CancelReplaceError"}},"description":"FAILURE covers rejected and thrown placement errors, including balance or allowance rejection and an execution-time 425 after cancellation. UNKNOWN means placement reported an inconclusive result.","required":["status","error"]},"CancelReplacePlacementNotAttempted":{"type":"object","properties":{"status":{"type":"string","enum":["NOT_ATTEMPTED"]}},"required":["status"]},"CancelReplacePlacementResult":{"type":"object","properties":{},"oneOf":[{"$ref":"#/components/schemas/CancelReplacePlacementSuccess"},{"$ref":"#/components/schemas/CancelReplacePlacementError"},{"$ref":"#/components/schemas/CancelReplacePlacementNotAttempted"}]},"AsyncOrderResponseDto":{"type":"object","properties":{"orderId":{"type":"string","format":"uuid","example":"75ec28a0-65c2-46c9-b118-0b017e36dfb0"},"clientOrderId":{"type":"string","example":"client-order-124"},"status":{"type":"string","enum":["LIVE","MATCHED","UNMATCHED","DELAYED","CANCELED"],"example":"MATCHED"},"filledContracts":{"type":"string","description":"Filled contracts in raw 6-decimal units.","example":"1000000"},"filledCollateral":{"type":"string","description":"Filled collateral in raw 6-decimal units.","example":"500000"},"eligibleAt":{"type":"string","format":"date-time","example":"2026-09-02T12:00:00.000Z"},"reason":{"type":"string","example":"STP_TAKER_REJECTED"},"stpMakerCancels":{"example":["bbf3a2f1-f945-40de-b5ef-ea278732b224"],"type":"array","items":{"type":"string"}},"tradeEventId":{"type":"string","format":"uuid","example":"76be0adc-e77f-45fb-9eb9-a7bc06282ef8"},"statusUrl":{"type":"string","example":"/v2/orders/status/75ec28a0-65c2-46c9-b118-0b017e36dfb0"}},"required":["orderId","status","filledContracts","filledCollateral","statusUrl"]},"AsyncOrderRejectionResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Invalid order signature"},"code":{"type":"string","enum":["order_rejected"],"example":"order_rejected"}},"required":["message","code"]},"AsyncOrderUnknownResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Order submission outcome is unknown"},"code":{"type":"string","enum":["order_submission_outcome_unknown"]},"orderId":{"type":"string","format":"uuid","example":"75ec28a0-65c2-46c9-b118-0b017e36dfb0"},"clientOrderId":{"type":"string","example":"client-order-126"}},"required":["message","code"]},"AsyncSettlementFailureDto":{"type":"object","properties":{"code":{"type":"string","enum":["settlement_failed"],"example":"settlement_failed"},"message":{"type":"string","example":"Settlement transaction reverted"}},"required":["code","message"]},"AsyncSettlementStatusDto":{"type":"object","properties":{"settlementId":{"type":"string","format":"uuid","example":"76be0adc-e77f-45fb-9eb9-a7bc06282ef8"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED"],"example":"PENDING"},"txHash":{"type":"string","example":null,"nullable":true},"failure":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AsyncSettlementFailureDto"}]}},"required":["settlementId","status","txHash","failure"]},"AsyncOrderStatusResponseDto":{"type":"object","properties":{"orderId":{"type":"string","format":"uuid","example":"75ec28a0-65c2-46c9-b118-0b017e36dfb0"},"clientOrderId":{"type":"string","example":"client-order-124"},"status":{"type":"string","enum":["DELAYED","LIVE","MATCHED","UNMATCHED","CANCELED","FAILED"],"example":"LIVE"},"filledContracts":{"type":"string","description":"Cumulative filled contracts in raw 6-decimal units.","example":"1000000"},"filledCollateral":{"type":"string","description":"Cumulative filled collateral in raw 6-decimal units.","example":"500000"},"settlements":{"type":"array","items":{"$ref":"#/components/schemas/AsyncSettlementStatusDto"}}},"required":["orderId","status","filledContracts","filledCollateral","settlements"]},"FeeRateMismatchErrorResponse":{"type":"object","properties":{"code":{"type":"string","enum":["FEE_RATE_MISMATCH"]},"expectedFeeRateBps":{"type":"integer","minimum":0},"message":{"type":"string","example":"Fee rate does not match the effective profile fee"}},"additionalProperties":false,"required":["code","expectedFeeRateBps"]},"CancelOrderCombinedDto":{"type":"object","properties":{"orderId":{"type":"string","description":"Internal order ID. Provide exactly one of orderId or clientOrderId.","example":"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"clientOrderId":{"type":"string","description":"Client-provided order ID from order creation. Provide exactly one of orderId or clientOrderId.","example":"partner-order-001","maxLength":128}},"additionalProperties":false,"oneOf":[{"required":["orderId"]},{"required":["clientOrderId"]}]},"Order":{"type":"object","properties":{"salt":{"description":"Unique random value for signature uniqueness. Send unsafe integers as decimal strings to preserve EIP-712 bytes.","oneOf":[{"type":"string","pattern":"^\\d+$","example":"1778155025318314496"},{"type":"number","example":1234567890}]},"maker":{"type":"string","description":"Ethereum address of the maker (order creator)","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$"},"signer":{"type":"string","description":"Address that signed the order","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","pattern":"^0x[a-fA-F0-9]{40}$"},"taker":{"type":"string","description":"Specific taker address (optional for open orders)","example":"0x0000000000000000000000000000000000000000","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"type":"string","description":"Token ID being traded (YES or NO position ID from conditional token)","example":"19633204485790857949828516737993423758628930235371629943999544859324645414627"},"makerAmount":{"type":"integer","description":"Raw 6-decimal amount offered by the maker. For GTC/FAK: collateral for BUY or contracts for SELL. For FOK: maximum collateral for BUY or contracts for SELL.","example":5000000,"minimum":100},"takerAmount":{"type":"integer","description":"Raw 6-decimal amount requested. For GTC/FAK: contracts for BUY or collateral for SELL. For FOK this must equal 1.","example":10000000,"minimum":1},"expiration":{"type":"string","description":"Omission is signed as zero; if supplied, the value must represent zero because non-zero expiration is unsupported.","example":"0","pattern":"^0+$"},"nonce":{"type":"number","description":"Required numeric zero.","example":0,"enum":[0]},"price":{"type":"number","description":"Required for GTC/FAK and forbidden for FOK. Decimal price with at most three places; price × contracts must equal the collateral amount exactly as an integer.","example":0.75,"minimum":0.01,"maximum":0.99,"multipleOf":0.001},"feeRateBps":{"type":"number","description":"Fee rate in basis points (1% = 100)","example":0},"side":{"type":"number","description":"Order side: 0 = BUY, 1 = SELL","enum":[0,1],"example":0},"signature":{"type":"string","description":"EIP-712 signature of order details as a 0x-prefixed hex string with full-byte (even) length. Optional when using delegated signing.","example":"0x6e3a3f2c2c2bb1ce3a14c4f5e4ad6f3c8b1ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d4a36cc4ad9c44d4d5fa1c4cd5b6e74a4d41b","pattern":"^0x([a-fA-F0-9]{2})*$"},"signatureType":{"type":"number","description":"Signature type (0-3). Optional when using delegated signing.","enum":[0,1,2,3],"example":2}},"additionalProperties":false,"description":"EIP-712 order fields. Signature and signatureType must be supplied together for client signing or both omitted for delegated server signing.","oneOf":[{"required":["signature","signatureType"]},{"not":{"anyOf":[{"required":["signature"]},{"required":["signatureType"]}]}}],"required":["salt","maker","signer","tokenId","makerAmount","takerAmount","nonce","feeRateBps","side"]},"CancelReplaceOrderDto":{"type":"object","properties":{"order":{"description":"Order details including signature and amounts","allOf":[{"$ref":"#/components/schemas/Order"}]},"ownerId":{"type":"integer","description":"Required profile ID of the order owner. For delegated signing, send the target profile ID as both ownerId and onBehalfOf.","example":12345},"orderType":{"type":"string","description":"Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)","enum":["FAK","FOK","GTC"],"example":"GTC"},"marketSlug":{"type":"string","description":"Market identifier slug","example":"biden-vs-trump-2024"},"postOnly":{"type":"boolean","description":"Reject the order if it would match immediately. Supported only for GTC orders.","example":true},"clientOrderId":{"type":"string","description":"Optional owner-scoped uniqueness and deduplication key. The submitted value is limited to 128 characters, then trimmed; blank values are rejected. Reuse returns 409 rather than replaying an earlier response.","example":"client-order-001","maxLength":128},"timestamp":{"type":"integer","description":"Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.","example":1735689600000,"minimum":0},"recvWindow":{"type":"integer","description":"Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, no receive-window check is applied by default. Top-level request field; not part of the EIP-712 signed order payload.","example":1500,"maximum":10000,"minimum":1},"stpPolicy":{"type":"string","description":"Self-trade prevention policy. If omitted, OME defaults to cancel_maker. Top-level request field; not part of the EIP-712 signed order payload.","enum":["cancel_both","cancel_maker","cancel_taker"],"example":"cancel_maker"},"source":{"type":"object","description":"Optional attribution metadata for single POST /orders (including v2). source.shareLinkId is ignored for batch and cancel-replace; invalid values are ignored.","additionalProperties":true}},"additionalProperties":false,"description":"Replacement order fields. This is the POST /orders request shape without onBehalfOf; delegation is set on the enclosing cancel-replace operation.","required":["order","ownerId","orderType","marketSlug"]},"CancelReplaceDto":{"type":"object","properties":{"cancel":{"description":"Order to cancel; provide exactly one identifier","allOf":[{"$ref":"#/components/schemas/CancelOrderCombinedDto"}]},"replacement":{"$ref":"#/components/schemas/CancelReplaceOrderDto"},"mode":{"type":"string","enum":["ALLOW_FAILURE","STOP_ON_FAILURE"],"description":"Whether to stop this operation or attempt replacement after cancellation failure","example":"STOP_ON_FAILURE"},"onBehalfOf":{"type":"number","minimum":1,"description":"Authorized partner sub-account profile ID. Applies to both cancellation and replacement.","example":12345}},"additionalProperties":false,"required":["cancel","replacement","mode"]},"CancelReplaceResponseDto":{"type":"object","properties":{"cancel":{"$ref":"#/components/schemas/CancelReplaceCancelResult"},"replacement":{"$ref":"#/components/schemas/CancelReplacePlacementResult"}},"description":"Independent cancellation and replacement outcomes.","required":["cancel","replacement"]},"CancelReplaceBatchDto":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":4,"description":"Independent cancel-and-replace operations","type":"array","items":{"$ref":"#/components/schemas/CancelReplaceDto"}}},"additionalProperties":false,"required":["operations"]},"CancelReplaceBatchResponseDto":{"type":"object","properties":{"results":{"type":"array","description":"Outcomes in input order. Each item includes its zero-based input index.","items":{"allOf":[{"$ref":"#/components/schemas/CancelReplaceResponseDto"},{"type":"object","properties":{"index":{"type":"integer","minimum":0,"description":"Zero-based input operation index"}},"required":["index"]}]}}},"required":["results"]},"CreateOrderDto":{"type":"object","properties":{"order":{"description":"Order details including signature and amounts","allOf":[{"$ref":"#/components/schemas/Order"}]},"ownerId":{"type":"integer","description":"Required profile ID of the order owner. For delegated signing, send the target profile ID as both ownerId and onBehalfOf.","example":12345},"orderType":{"type":"string","description":"Order type (GTC=Good Till Cancelled, FAK=Fill And Kill, FOK=Fill Or Kill)","enum":["FAK","FOK","GTC"],"example":"GTC"},"marketSlug":{"type":"string","description":"Market identifier slug","example":"biden-vs-trump-2024"},"postOnly":{"type":"boolean","description":"Reject the order if it would match immediately. Supported only for GTC orders.","example":true},"clientOrderId":{"type":"string","description":"Optional owner-scoped uniqueness and deduplication key. The submitted value is limited to 128 characters, then trimmed; blank values are rejected. Reuse returns 409 rather than replaying an earlier response.","example":"client-order-001","maxLength":128},"onBehalfOf":{"type":"integer","description":"Managed profile ID for partner placement. Requires `trading` and a partner relationship; unsigned delegated placement also requires `delegated_signing`.","example":12345,"minimum":1},"timestamp":{"type":"integer","description":"Optional client-stamped order creation time, Unix ms epoch. Top-level request field; not part of the EIP-712 signed order payload.","example":1735689600000,"minimum":0},"recvWindow":{"type":"integer","description":"Optional maximum accepted order age in milliseconds. Valid range: 1 to 10000. If omitted, no receive-window check is applied by default. Top-level request field; not part of the EIP-712 signed order payload.","example":1500,"maximum":10000,"minimum":1},"stpPolicy":{"type":"string","description":"Self-trade prevention policy. If omitted, OME defaults to cancel_maker. Top-level request field; not part of the EIP-712 signed order payload.","enum":["cancel_both","cancel_maker","cancel_taker"],"example":"cancel_maker"},"source":{"type":"object","description":"Optional attribution metadata for single POST /orders (including v2). source.shareLinkId is ignored for batch and cancel-replace; invalid values are ignored.","additionalProperties":true}},"additionalProperties":false,"required":["order","ownerId","orderType","marketSlug"]},"BatchOrderStatusItemDto":{"type":"object","properties":{"orderId":{"type":"string","description":"Internal order ID. Provide either orderId or clientOrderId, not both.","example":"4aa706dd-6c57-4f3c-945a-99818dfd95f1","format":"uuid"},"clientOrderId":{"type":"string","description":"Client-provided order ID. Provide either orderId or clientOrderId, not both.","example":"client-order-001","maxLength":128}}},"BatchOrderStatusRequestDto":{"type":"object","properties":{"items":{"description":"List of status lookup queries","minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/BatchOrderStatusItemDto"}}},"additionalProperties":false,"required":["items"]},"BatchOrderStatusResultDto":{"type":"object","properties":{"index":{"type":"integer","example":0,"minimum":0},"status":{"type":"string","enum":["found","not_found","invalid"],"example":"found"},"error":{"type":"string","example":"Exactly one of orderId or clientOrderId is required"},"orderId":{"type":"string","example":"4aa706dd-6c57-4f3c-945a-99818dfd95f1","format":"uuid"},"clientOrderId":{"type":"string","example":"client-order-001","maxLength":128},"data":{"$ref":"#/components/schemas/HistoricalOrderResponseDto"}},"required":["index","status"]},"BatchOrderStatusResponseDto":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchOrderStatusResultDto"}}},"required":["results"]},"CancelOrderResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message for the cancelled order","example":"Order canceled successfully","enum":["Order canceled successfully","Delayed order canceled successfully"]}},"required":["message"]},"DeleteOrderBatchDto":{"type":"object","properties":{"orderIds":{"type":"array","description":"Array of order IDs to be cancelled in a single batch operation","example":["6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203","9e31c452-8a2b-42d1-b327-65f18d07dc96"],"minItems":1,"items":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}}},"additionalProperties":false,"required":["orderIds"]},"CancelOrderBatchResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message for the cancelled orders","example":"Orders canceled successfully"},"canceled":{"type":"array","description":"Array of successfully cancelled order IDs","example":["611badac-8dfc-48a0-b09e-59654adea1c5"],"items":{"type":"string","format":"uuid"}},"failed":{"description":"Array of orders that failed to cancel with reasons","type":"array","items":{"$ref":"#/components/schemas/CancelOrderFailure"}}},"required":["message"]},"CancelOrderBatchCombinedDto":{"type":"object","properties":{"orderIds":{"type":"array","description":"Internal order IDs. Provide exactly one of orderIds or clientOrderIds.","example":["6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203"],"minItems":1,"maxItems":50,"items":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}},"clientOrderIds":{"type":"array","description":"Client-provided order IDs from order creation. Provide exactly one of orderIds or clientOrderIds.","example":["partner-order-001","partner-order-002"],"minItems":1,"maxItems":50,"items":{"type":"string","maxLength":128}}},"additionalProperties":false,"oneOf":[{"required":["orderIds"]},{"required":["clientOrderIds"]}]},"CancelAllOrdersResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message for cancelling all orders","example":"Orders canceled successfully"},"canceled":{"type":"array","description":"Array of successfully cancelled order IDs","example":["611badac-8dfc-48a0-b09e-59654adea1c5"],"items":{"type":"string","format":"uuid"}},"failed":{"description":"Array of orders that failed to cancel with reasons","type":"array","items":{"$ref":"#/components/schemas/CancelOrderFailure"}}},"required":["message"]},"LmtsMetadataDto":{"type":"object","properties":{"indexedBlock":{"type":"number","example":37140000}},"required":["indexedBlock"]},"LmtsSummaryResponseDto":{"type":"object","properties":{"totalSupply":{"type":"string","example":"1000000.0"},"circulatingSupply":{"type":"string","example":"900000.0"},"holderCount":{"type":"number","example":5000},"totalStaked":{"type":"string","example":"250000.0"},"activeStakerCount":{"type":"number","example":250},"stakingRatioPercent":{"type":"number","example":12.5,"nullable":true},"apyPercent":{"type":"number","example":8.4,"nullable":true},"metadata":{"$ref":"#/components/schemas/LmtsMetadataDto"}},"required":["totalSupply","circulatingSupply","holderCount","totalStaked","activeStakerCount","stakingRatioPercent","apyPercent","metadata"]},"LmtsHolderDto":{"type":"object","properties":{"address":{"type":"string","example":"0x1111111111111111111111111111111111111111"},"balanceFormatted":{"type":"string","example":"1250000.0"},"percentageRelativeToTotalSupply":{"type":"number","example":1.25}},"required":["address","balanceFormatted","percentageRelativeToTotalSupply"]},"LmtsHoldersResponseDto":{"type":"object","properties":{"holders":{"type":"array","items":{"$ref":"#/components/schemas/LmtsHolderDto"}},"metadata":{"$ref":"#/components/schemas/LmtsMetadataDto"}},"required":["holders","metadata"]},"NavigationNodeDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the navigation node"},"name":{"type":"string","description":"Display name of the navigation item"},"slug":{"type":"string","description":"URL slug for the navigation item"},"path":{"type":"string","description":"Full path to this navigation item","example":"/sports/football"},"icon":{"type":"string","description":"Icon identifier for the navigation item"},"children":{"description":"Child navigation nodes","type":"array","items":{"$ref":"#/components/schemas/NavigationNodeDto"}},"count":{"type":"number","description":"Number of active markets in this navigation node"}},"required":["id","name","slug","path","children"]},"ErrorResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Invalid order data"}},"required":["message"]},"FilterGroupOptionDto":{"type":"object","properties":{"label":{"type":"string","description":"Display label for the option"},"value":{"type":"string","description":"Value identifier for the option"},"metadata":{"type":"object","description":"Optional metadata for the option (color, icon)"},"count":{"type":"number","description":"Number of active markets matching this option"}},"required":["label","value"]},"FilterGroupDto":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the filter group"},"slug":{"type":"string","description":"URL slug for the filter group"},"allowMultiple":{"type":"boolean","description":"Whether multiple options can be selected"},"expanded":{"type":"boolean","description":"Whether the filter group is expanded by default"},"presentation":{"type":"string","description":"Presentation style for the filter group"},"options":{"description":"Available filter options","type":"array","items":{"$ref":"#/components/schemas/FilterGroupOptionDto"}},"tabs":{"type":"object","description":"Tab configuration for sub-filtering within this filter group"}}},"BreadcrumbItemDto":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the breadcrumb item"},"slug":{"type":"string","description":"URL slug of the breadcrumb item"},"path":{"type":"string","description":"Full path to this breadcrumb item"}},"required":["name","slug","path"]},"MarketPageByPathResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the market page"},"name":{"type":"string","description":"Display name of the market page"},"slug":{"type":"string","description":"URL slug of the market page"},"description":{"type":"string","description":"Description of the market page","nullable":true},"fullPath":{"type":"string","description":"Full URL path to this market page"},"baseFilter":{"type":"object","description":"Base filter configuration for the page"},"filterGroups":{"description":"Available filter groups for the page","type":"array","items":{"$ref":"#/components/schemas/FilterGroupDto"}},"metadata":{"type":"object","description":"Additional metadata for the page"},"breadcrumb":{"description":"Breadcrumb trail to this page","type":"array","items":{"$ref":"#/components/schemas/BreadcrumbItemDto"}},"totalCount":{"type":"number","description":"Total number of active markets on this page"}},"required":["id","name","slug","fullPath","baseFilter","filterGroups","metadata","breadcrumb"]},"CursorPaginationDto":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Cursor for the next page of results","nullable":true}}},"OffsetPaginationDto":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total number of items"},"totalPages":{"type":"number","description":"Total number of pages"}},"required":["page","limit","total","totalPages"]},"ListMarketsResponseDto":{"type":"object","properties":{"data":{"description":"Array of market/group data","type":"array","items":{"type":"string"}},"cursor":{"description":"Cursor pagination info (when using cursor parameter)","allOf":[{"$ref":"#/components/schemas/CursorPaginationDto"}]},"pagination":{"description":"Offset pagination info (when using page parameter)","allOf":[{"$ref":"#/components/schemas/OffsetPaginationDto"}]},"counts":{"type":"object","description":"Counts per tab option for the active filter context","example":{"matches":45,"props":3}}},"required":["data"]},"PropertyOptionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the property option"},"propertyKeyId":{"type":"string","description":"Property key ID this option belongs to"},"value":{"type":"string","description":"Value identifier for the option"},"label":{"type":"string","description":"Display label for the option"},"sortOrder":{"type":"number","description":"Sort order for the option"},"parentOptionId":{"type":"string","description":"Parent option ID for hierarchical options","nullable":true},"metadata":{"type":"object","description":"Additional metadata for the option"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","propertyKeyId","value","label","sortOrder","metadata","createdAt","updatedAt"]},"PropertyKeyResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the property key"},"name":{"type":"string","description":"Display name of the property key"},"slug":{"type":"string","description":"URL slug of the property key"},"type":{"type":"string","description":"Type of property key","enum":["select","multi-select"]},"metadata":{"type":"object","description":"Additional metadata for the property key"},"isSystem":{"type":"boolean","description":"Whether this is a system-defined property key"},"sortOrder":{"type":"number","description":"Sort order for the property key"},"hidden":{"type":"boolean","description":"Whether this property key is hidden from public views"},"options":{"description":"Available options for this property key","type":"array","items":{"$ref":"#/components/schemas/PropertyOptionResponseDto"}},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","name","slug","type","metadata","isSystem","sortOrder","hidden","createdAt","updatedAt"]},"UpdateHeartbeatDto":{"type":"object","properties":{"cancelAt":{"type":"integer","description":"Future Unix timestamp in milliseconds. It must be an integer at least five seconds after current server time. Omit to disarm the heartbeat.","example":1790000010000}}}}}}