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.
GET
/
markets
/
{slug}
/
orderbook
Get Orderbook
curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/orderbook
For real-time orderbook updates, use the WebSocket API instead of polling this endpoint. Subscribe to subscribe_market_prices with marketSlugs. Subscribing also pushes this book once per slug as an initial orderbookUpdate, so you do not need this endpoint to seed local state.
Current snapshot only, one market per request. This endpoint returns the current LIVE GTC orderbook for one exact CLOB market slug. There is no batched form that accepts multiple slugs; to follow several markets at once use the WebSocket subscription above. It does not aggregate a group slug, and AMM markets do not have an orderbook. CLOB markets are available only while their status is CREATED or FUNDED.There is no historical orderbook endpoint. For past activity on a market, combine three sources:
Each level’s size is in raw 6-decimal position-token units: 1 share = 1,000,000, so "size": 150000000 is 150 shares. Divide by 1e6 to get shares. minSize uses the same units. price is a plain decimal between 0 and 1 and is not scaled.minSize and maxSpread are returned as decimal strings. The WebSocket orderbookUpdate frames, including the initial snapshot, use the same size units, but minSize and maxSpread can arrive there as JSON numbers, so accept either form.
lastTradePrice is a nullable YES-equivalent price and is not guaranteed to represent the same point in time as the order-book levels. No bound on response freshness is guaranteed.midpoint uses the best displayed bid and ask. adjustedMidpoint excludes individual orders smaller than minSize before price-level aggregation and midpoint calculation. Every bid level has side: "BUY"; every ask level has side: "SELL".
This endpoint returns a single, YES-side book. The tokenId in the response is the market’s YES position ID, and bids/asks are quoted in YES-token terms. The two outcome tokens are complementary: a YES share and a NO share always redeem together for exactly $1. Their prices therefore satisfy:
price(YES) + price(NO) = 1
The book you get back already merges all liquidity for the market: native NO orders are converted into their YES-side equivalent before aggregation, using the same identity:
NO bid @ P ≡ YES ask @ (1 - P) (someone bidding for NO is offering YES)NO ask @ P ≡ YES bid @ (1 - P) (someone offering NO is bidding for YES)
So you never lose NO liquidity by reading the YES book. It’s all there, expressed in YES prices.
To quote or trade the NO token, mirror the returned YES book: flip bids ↔ asks and replace every price p with 1 - p (sizes are unchanged).
NO book
Derived from
Best level
NO bids (orders to buy NO)
YES asks
best NO bid = 1 - bestYesAsk
NO asks (orders to sell NO)
YES bids
best NO ask = 1 - bestYesBid
The midpoint and spread carry over directly: noMidpoint = 1 - yesMidpoint, and the spread is identical.
type Level = { price: number; size: number; side: "BUY" | "SELL" };type Book = { bids: Level[]; asks: Level[] };// Mirror the YES-side book into the NO-side book.function deriveNoBook(yes: Book): Book { const invert = (l: Level): Level => ({ price: 1 - l.price, size: l.size, side: l.side === "BUY" ? "SELL" : "BUY", }); return { bids: yes.asks.map(invert).sort((a, b) => b.price - a.price), // best (highest) first asks: yes.bids.map(invert).sort((a, b) => a.price - b.price), // best (lowest) first };}// To SELL NO, hit the best NO bid: 1 - bestYesAsk// To BUY NO, lift the best NO ask: 1 - bestYesBid
def derive_no_book(yes: dict) -> dict: """Mirror the YES-side book into the NO-side book.""" invert = lambda l: { "price": 1 - l["price"], "size": l["size"], "side": "SELL" if l["side"] == "BUY" else "BUY", } return { "bids": sorted((invert(a) for a in yes["asks"]), key=lambda l: -l["price"]), # best first "asks": sorted((invert(b) for b in yes["bids"]), key=lambda l: l["price"]), # best first }# To SELL NO, hit the best NO bid: 1 - best_yes_ask# To BUY NO, lift the best NO ask: 1 - best_yes_bid
When you then place a NO order, sign it against the NO tokenId (noPositionId from Get Market) at the derived price. The price inversion only affects how you read the book, not how the order is signed.
In a NegRisk multi-outcome market, each outcome is its own market with its own slug, its own YES/NO tokens, and its own orderbook. Fetch each outcome’s book by its slug and derive that outcome’s NO book with the same inversion above. There is no single cross-outcome book to invert.What links the outcomes is a soft pricing constraint, not a shared book. Across the N outcomes, the YES prices tend toward summing to 1 (exactly one outcome resolves YES). All the NO contracts are linked for share conversion. To assemble a full picture of a multi-outcome market, request the orderbook for each outcome slug and mirror each one independently.
Maximum distance from the midpoint at which a resting order earns LP rewards, serialized as a decimal string. WebSocket orderbookUpdate frames send it as a JSON number.
Minimum order size for LP rewards and adjustedMidpoint, in the same raw 6-decimal units as level size (100000000 is 100 shares), serialized as a decimal string. WebSocket orderbookUpdate frames send it as a JSON number.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Limitless Exchange","colors":{"primary":"#9AB83A","light":"#DCF58C","dark":"#7A9A1E"},"logo":{"light":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b","dark":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=6500e01609e582f758db1a9610b63bd8"},"favicon":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/favicon.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=345f02206803d94b3b1911d2a80bf9c3","api":{"playground":{}},"navbar":{"links":[{"href":"mailto:help@limitless.network","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/trylimitless","discord":"https://discord.com/invite/yb4SscD8RZ"}},"seo":{"metatags":{"twitter:card":"summary_large_image"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"limitless","hasAudioNarration":false,"actualSubdomain":"limitless","customDomains":["docs.limitless.exchange"],"gitSource":{"type":"github","owner":"limitless-labs-group","repo":"limitless-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae2027fd6a250fd1db9a4f3","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"API Reference","count":81},{"language":"default","tag":"For Developers","count":67},{"language":"default","tag":"User Guide","count":26},{"language":"default","tag":"Portfolio","count":14},{"language":"default","tag":"Trading","count":14},{"language":"default","tag":"Getting Started","count":14},{"language":"default","tag":"Go SDK","count":11},{"language":"default","tag":"Python SDK","count":11},{"language":"default","tag":"Rust SDK","count":11},{"language":"default","tag":"TypeScript SDK","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/trading/orderbook","slug":"/api-reference/trading/orderbook","pageMetadata":{"title":"Get Orderbook","openapi":"GET /markets/{slug}/orderbook","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.","href":"/api-reference/trading/orderbook"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"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.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:_jsxs(_components.p,{children:[`For real-time orderbook updates, use the `,_jsx(_components.a,{href:`/developers/websocket/market-data`,children:`WebSocket API`}),` instead of polling this endpoint. Subscribe to `,_jsx(_components.code,{children:`subscribe_market_prices`}),` with `,_jsx(_components.code,{children:`marketSlugs`}),`. Subscribing also pushes this book once per slug as an initial `,_jsx(_components.code,{children:`orderbookUpdate`}),`, so you do not need this endpoint to seed local state.`]})}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Current snapshot only, one market per request.`}),` This endpoint returns the current LIVE GTC orderbook for one exact CLOB market slug. There is no batched form that accepts multiple slugs; to follow several markets at once use the WebSocket subscription above. It does not aggregate a group slug, and AMM markets do not have an orderbook. CLOB markets are available only while their status is `,_jsx(_components.code,{children:`CREATED`}),` or `,_jsx(_components.code,{children:`FUNDED`}),`.`]}),_jsx(_components.p,{children:`There is no historical orderbook endpoint. For past activity on a market, combine three sources:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/trading/historical-price`,children:`Get Historical Prices`}),` for price series.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/markets/feed-events`,children:`Get Feed Events`}),` for trade events.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/portfolio/history`,children:`Get History`}),` for your own CLOB fills (filter `,_jsx(_components.code,{children:`strategy`}),` on `,_jsx(_components.code,{children:`Limit Buy`}),` / `,_jsx(_components.code,{children:`Limit Sell`}),` / `,_jsx(_components.code,{children:`Market Buy`}),` / `,_jsx(_components.code,{children:`Market Sell`}),`).`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`units`,children:`Units`}),`\n`,_jsxs(_components.p,{children:[`Each level’s `,_jsx(_components.code,{children:`size`}),` is in raw 6-decimal position-token units: 1 share = 1,000,000, so `,_jsx(_components.code,{children:`\"size\": 150000000`}),` is 150 shares. Divide by `,_jsx(_components.code,{children:`1e6`}),` to get shares. `,_jsx(_components.code,{children:`minSize`}),` uses the same units. `,_jsx(_components.code,{children:`price`}),` is a plain decimal between 0 and 1 and is not scaled.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`minSize`}),` and `,_jsx(_components.code,{children:`maxSpread`}),` are returned as decimal strings. The WebSocket `,_jsx(_components.a,{href:`/developers/websocket/market-data#orderbookupdate`,children:_jsx(_components.code,{children:`orderbookUpdate`})}),` frames, including the initial snapshot, use the same size units, but `,_jsx(_components.code,{children:`minSize`}),` and `,_jsx(_components.code,{children:`maxSpread`}),` can arrive there as JSON numbers, so accept either form.`]}),`\n`,_jsx(Heading,{level:`2`,id:`snapshot-and-price-freshness`,children:`Snapshot and price freshness`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lastTradePrice`}),` is a nullable YES-equivalent price and is not guaranteed to represent the same point in time as the order-book levels. No bound on response freshness is guaranteed.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`midpoint`}),` uses the best displayed bid and ask. `,_jsx(_components.code,{children:`adjustedMidpoint`}),` excludes individual orders smaller than `,_jsx(_components.code,{children:`minSize`}),` before price-level aggregation and midpoint calculation. Every bid level has `,_jsx(_components.code,{children:`side: \"BUY\"`}),`; every ask level has `,_jsx(_components.code,{children:`side: \"SELL\"`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`complementary-token-prices-deriving-the-no-book`,children:`Complementary token prices (deriving the NO book)`}),`\n`,_jsxs(_components.p,{children:[`This endpoint returns a `,_jsx(_components.strong,{children:`single, YES-side book`}),`. The `,_jsx(_components.code,{children:`tokenId`}),` in the response is the market’s YES position ID, and `,_jsx(_components.code,{children:`bids`}),`/`,_jsx(_components.code,{children:`asks`}),` are quoted in YES-token terms. The two outcome tokens are complementary: a YES share and a NO share always redeem together for exactly $1. Their prices therefore satisfy:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`price(YES) + price(NO) = 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The book you get back already merges `,_jsx(_components.strong,{children:`all`}),` liquidity for the market: native NO orders are converted into their YES-side equivalent before aggregation, using the same identity:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`NO bid @ P ≡ YES ask @ (1 - P) (someone bidding for NO is offering YES)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`NO ask @ P ≡ YES bid @ (1 - P) (someone offering NO is bidding for YES)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`So you never lose NO liquidity by reading the YES book. It’s all there, expressed in YES prices.`}),`\n`,_jsx(Heading,{level:`3`,id:`deriving-the-no-orderbook`,children:`Deriving the NO orderbook`}),`\n`,_jsxs(_components.p,{children:[`To quote or trade the `,_jsx(_components.strong,{children:`NO`}),` token, mirror the returned YES book: flip bids ↔ asks and replace every price `,_jsx(_components.code,{children:`p`}),` with `,_jsx(_components.code,{children:`1 - p`}),` (sizes are unchanged).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`NO book`}),_jsx(_components.th,{children:`Derived from`}),_jsx(_components.th,{children:`Best level`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`NO bids`}),` (orders to buy NO)`]}),_jsxs(_components.td,{children:[`YES `,_jsx(_components.strong,{children:`asks`})]}),_jsxs(_components.td,{children:[`best NO bid = `,_jsx(_components.code,{children:`1 - bestYesAsk`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`NO asks`}),` (orders to sell NO)`]}),_jsxs(_components.td,{children:[`YES `,_jsx(_components.strong,{children:`bids`})]}),_jsxs(_components.td,{children:[`best NO ask = `,_jsx(_components.code,{children:`1 - bestYesBid`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The midpoint and spread carry over directly: `,_jsx(_components.code,{children:`noMidpoint = 1 - yesMidpoint`}),`, and the spread is identical.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`18`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Level`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`side`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BUY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"SELL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Book`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bids`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`asks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] };`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Mirror the YES-side book into the NO-side book.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` deriveNoBook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`yes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Book`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Book`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` invert`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`l`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Level`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` price:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` size:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`size`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` side:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`side`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BUY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"SELL\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bids:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` yes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`asks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// best (highest) first`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` asks:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` yes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bids`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// best (lowest) first`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// To SELL NO, hit the best NO bid: 1 - bestYesAsk`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// To BUY NO, lift the best NO ask: 1 - bestYesBid`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` derive_no_book`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`yes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Mirror the YES-side book into the NO-side book.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` invert `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` lambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` l[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: l[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELL\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` l[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BUY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`sorted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((invert(a) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` a `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` yes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"asks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`lambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`l[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# best first`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"asks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`sorted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((invert(b) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` yes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`lambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: l[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# best first`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# To SELL NO, hit the best NO bid: 1 - best_yes_ask`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# To BUY NO, lift the best NO ask: 1 - best_yes_bid`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`When you then place a NO order, sign it against the NO `,_jsx(_components.code,{children:`tokenId`}),` (`,_jsx(_components.code,{children:`noPositionId`}),` from `,_jsx(_components.a,{href:`/api-reference/markets/get-market`,children:`Get Market`}),`) at the derived price. The price inversion only affects how you `,_jsx(_components.em,{children:`read`}),` the book, not how the order is signed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`multi-outcome-negrisk-markets`,children:`Multi-outcome (NegRisk) markets`}),`\n`,_jsxs(_components.p,{children:[`In a `,_jsx(_components.a,{href:`/user-guide/negrisk-overview`,children:`NegRisk`}),` multi-outcome market, `,_jsx(_components.strong,{children:`each outcome is its own market`}),` with its own slug, its own YES/NO tokens, and its own orderbook. Fetch each outcome’s book by its slug and derive that outcome’s NO book with the same inversion above. There is no single cross-outcome book to invert.`]}),`\n`,_jsxs(_components.p,{children:[`What links the outcomes is a soft pricing constraint, not a shared book. Across the `,_jsx(_components.em,{children:`N`}),` outcomes, the YES prices tend toward summing to 1 (exactly one outcome resolves YES). All the NO contracts are linked for `,_jsx(_components.a,{href:`/user-guide/converting-shares`,children:`share conversion`}),`. To assemble a full picture of a multi-outcome market, request the orderbook for each outcome slug and mirror each one independently.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`The exact market is an AMM (`,_jsx(_components.code,{children:`Market does not support orderbook (AMM market)`}),`) or its CLOB status is not `,_jsx(_components.code,{children:`CREATED`}),` or `,_jsx(_components.code,{children:`FUNDED`}),` (`,_jsx(_components.code,{children:`Market is not active`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsxs(_components.td,{children:[`No exact market has the slug (`,_jsx(_components.code,{children:`Market not found`}),`). A group slug also produces this response.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`The orderbook could not be read unexpectedly.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Orderbook","openapi":"GET /markets/{slug}/orderbook","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.","href":"/api-reference/trading/orderbook"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Units","slug":"units","depth":2,"children":[]},{"title":"Snapshot and price freshness","slug":"snapshot-and-price-freshness","depth":2,"children":[]},{"title":"Complementary token prices (deriving the NO book)","slug":"complementary-token-prices-deriving-the-no-book","depth":2,"children":[{"title":"Deriving the NO orderbook","slug":"deriving-the-no-orderbook","depth":3,"children":[]}]},{"title":"Multi-outcome (NegRisk) markets","slug":"multi-outcome-negrisk-markets","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"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":["17f0087a-7be1-4402-9533-c723fc938931"],"responses":{"200":"89ddfd16-1d9d-4ed8-8d9b-3ffe7f812765","400":"9abe2ec0-8e03-4f88-82fe-fc0a9d45848e","404":"af859cef-675b-499d-8f52-92280fd61c3b","500":"3e78dc7e-0f26-4a64-8c4e-3cdccfa028d3"},"summary":"Get Orderbook","tags":["Trading"],"method":"get","type":"path","servers":["09c89b92-1b1b-488d-af55-0f936f286701"],"security":[],"path":"/markets/{slug}/orderbook","baseUrlOptions":["https://api.limitless.exchange"],"title":"Get Orderbook","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"17f0087a-7be1-4402-9533-c723fc938931":{"name":"slug","required":true,"in":"path","description":"Market slug identifier","schema":{"example":"presidential-election-2024"}}},"responses":{"89ddfd16-1d9d-4ed8-8d9b-3ffe7f812765":{"description":"Current orderbook with bids and asks","content":{"application/json":{"schema":{"type":"object","properties":{"adjustedMidpoint":{"type":"number","description":"Midpoint after excluding individual orders below minSize before price-level aggregation.","example":0.75,"isRequired":true,"uniqueKey":"adjustedMidpoint","typeLabel":"number"},"asks":{"description":"YES asks in ascending price order. Each level has side SELL.","type":"array","items":{"type":"object","properties":{"price":{"type":"number","description":"YES price of the level, between 0 and 1. Not scaled.","example":0.74,"isRequired":true,"uniqueKey":"asks.items.[INDEX].price","typeLabel":"number"},"size":{"type":"number","description":"Total resting size at this price level in raw 6-decimal position-token units: 1 share = 1,000,000, so 150000000 is 150 shares. Divide by 1e6 for shares. WebSocket orderbookUpdate frames use the same units.","example":150000000,"isRequired":true,"uniqueKey":"asks.items.[INDEX].size","typeLabel":"number"},"side":{"type":"string","enum":["BUY","SELL"],"example":"BUY","isRequired":true,"uniqueKey":"asks.items.[INDEX].side","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"required":["price","size","side"],"uniqueKey":"asks.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"asks","typeLabel":"object[]"},"bids":{"description":"YES bids in descending price order. Each level has side BUY.","type":"array","items":{"type":"object","properties":{"price":{"type":"number","description":"YES price of the level, between 0 and 1. Not scaled.","example":0.74,"isRequired":true,"uniqueKey":"bids.items.[INDEX].price","typeLabel":"number"},"size":{"type":"number","description":"Total resting size at this price level in raw 6-decimal position-token units: 1 share = 1,000,000, so 150000000 is 150 shares. Divide by 1e6 for shares. WebSocket orderbookUpdate frames use the same units.","example":150000000,"isRequired":true,"uniqueKey":"bids.items.[INDEX].size","typeLabel":"number"},"side":{"type":"string","enum":["BUY","SELL"],"example":"BUY","isRequired":true,"uniqueKey":"bids.items.[INDEX].side","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"required":["price","size","side"],"uniqueKey":"bids.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"bids","typeLabel":"object[]"},"lastTradePrice":{"oneOf":[{"type":"number","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,"isRequired":true,"uniqueKey":"lastTradePrice.oneOf.0","typeLabel":"number"},{"type":"null","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,"isRequired":true,"uniqueKey":"lastTradePrice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lastTradePrice","typeLabel":"number | null"},"maxSpread":{"type":"string","description":"Maximum distance from the midpoint at which a resting order earns LP rewards, serialized as a decimal string. WebSocket orderbookUpdate frames send it as a JSON number.","example":"0.035","isRequired":true,"uniqueKey":"maxSpread","typeLabel":"string"},"midpoint":{"type":"number","description":"Midpoint from the best displayed bid and ask.","example":0.75,"isRequired":true,"uniqueKey":"midpoint","typeLabel":"number"},"minSize":{"type":"string","description":"Minimum order size for LP rewards and adjustedMidpoint, in the same raw 6-decimal units as level size (100000000 is 100 shares), serialized as a decimal string. WebSocket orderbookUpdate frames send it as a JSON number.","example":"100000000","isRequired":true,"uniqueKey":"minSize","typeLabel":"string"},"tokenId":{"type":"string","description":"YES position token ID.","example":"19633204485790857949828516737993423758628930235371629943999544859324645414627","isRequired":true,"uniqueKey":"tokenId","typeLabel":"string"}},"additionalProperties":false,"required":["adjustedMidpoint","asks","bids","lastTradePrice","maxSpread","midpoint","minSize","tokenId"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"adjustedMidpoint":0.75,"asks":[{"price":0.74,"size":150000000,"side":"BUY"}],"bids":[{"price":0.74,"size":150000000,"side":"BUY"}],"lastTradePrice":0.75,"maxSpread":"0.035","midpoint":0.75,"minSize":"100000000","tokenId":"19633204485790857949828516737993423758628930235371629943999544859324645414627"}}},"exampleType":"generated"}},"exampleType":"generated"},"9abe2ec0-8e03-4f88-82fe-fc0a9d45848e":{"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)"],"isRequired":true,"uniqueKey":"message","typeLabel":"enum\u003cstring>"}},"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Market is not active"}}},"exampleType":"generated"}},"exampleType":"generated"},"af859cef-675b-499d-8f52-92280fd61c3b":{"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"],"isRequired":true,"uniqueKey":"message","typeLabel":"enum\u003cstring>"}},"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Market not found"}}},"exampleType":"generated"}},"exampleType":"generated"},"3e78dc7e-0f26-4a64-8c4e-3cdccfa028d3":{"description":"Orderbook lookup failed unexpectedly; a last trade price lookup failure instead returns 200 with lastTradePrice null","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"additionalProperties":false,"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"09c89b92-1b1b-488d-af55-0f936f286701":{"url":"https://api.limitless.exchange","description":"Production API"}}},"originalFileLocation":"openapi.json"},"subdomain":"limitless","siteName":"Limitless Exchange","title":"Get Orderbook - Limitless Exchange","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T08:00:45.724Z","originalFileLocation":"api-reference/trading/orderbook.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"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.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Orderbook - Limitless Exchange\">\u003cmeta data-mint-head property=\"og:description\" content=\"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.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.limitless.exchange/api-reference/trading/orderbook\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=Get+Orderbook\u0026amp;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+fail\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=df576bbd871c6af079a873948606e87f5b86101ea26ed6eb1f07b78a7945b9e9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get Orderbook - Limitless Exchange\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"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.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=Trading\u0026amp;title=Get+Orderbook\u0026amp;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+fail\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=df576bbd871c6af079a873948606e87f5b86101ea26ed6eb1f07b78a7945b9e9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9AB83A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.limitless.exchange/api-reference/trading/orderbook\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/trading/orderbook.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.limitless.exchange/#organization\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.limitless.exchange#website\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.limitless.exchange/api-reference/trading/orderbook#webpage\",\"url\":\"https://docs.limitless.exchange/api-reference/trading/orderbook\",\"name\":\"Get Orderbook\",\"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.\",\"dateModified\":\"2026-10-02T08:00:45.724Z\",\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"},\"breadcrumb\":{\"@id\":\"https://docs.limitless.exchange/api-reference/trading/orderbook#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.limitless.exchange/api-reference/trading/orderbook#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trading\",\"item\":\"https://docs.limitless.exchange/api-reference/trading/create-order\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Orderbook\",\"item\":\"https://docs.limitless.exchange/api-reference/trading/orderbook\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.limitless.exchange/api-reference/trading/orderbook#apireference\",\"headline\":\"Get Orderbook\",\"name\":\"Get Orderbook\",\"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.\",\"url\":\"https://docs.limitless.exchange/api-reference/trading/orderbook\",\"mainEntityOfPage\":{\"@id\":\"https://docs.limitless.exchange/api-reference/trading/orderbook#webpage\"},\"dateModified\":\"2026-10-02T08:00:45.724Z\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Limitless Exchange\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Limitless Exchange\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/trading/orderbook.md","siteName":"Limitless Exchange","nav":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":""}]},{"tab":"For Developers","pages":[{"title":"For Developers","href":"/developers/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"System","pages":[{"title":"Maintenance Status","openapi":"GET /maintenance/status","href":"/api-reference/system/maintenance-status"}]},{"group":"Authentication","pages":[{"title":"User Logout","openapi":"POST /auth/logout","href":"/api-reference/auth/logout"},{"title":"Create API Key","openapi":"POST /auth/api-keys","href":"/api-reference/auth/create-api-key"},{"title":"Get Active API Key","openapi":"GET /auth/api-keys","href":"/api-reference/auth/get-api-key"},{"title":"Revoke API Key","openapi":"DELETE /auth/api-keys","href":"/api-reference/auth/revoke-api-key"}]},{"group":"Markets","pages":[{"title":"Browse Active Markets","openapi":"GET /markets/active","href":"/api-reference/markets/browse-active"},{"title":"Browse Active Markets by Category","openapi":"GET /markets/active/{categoryId}","href":"/api-reference/markets/browse-active-category"},{"title":"Get Category Counts","openapi":"GET /markets/categories/count","href":"/api-reference/markets/category-count"},{"title":"Get Active Market Slugs","openapi":"GET /markets/active/slugs","href":"/api-reference/markets/active-slugs"},{"title":"Market Timeline","href":"/api-reference/markets/timeline"},{"title":"Get Market Details","openapi":"GET /markets/{addressOrSlug}","href":"/api-reference/markets/get-market"},{"title":"Resolve Stable Slug","openapi":"GET /markets/stable/{slug}","href":"/api-reference/markets/resolve-stable-slug"},{"title":"Get Oracle Candlesticks","openapi":"GET /markets/{addressOrSlug}/oracle-candles","href":"/api-reference/markets/oracle-candles"},{"title":"Get Feed Events","openapi":"GET /markets/{slug}/get-feed-events","href":"/api-reference/markets/feed-events"},{"title":"Search Markets","openapi":"GET /markets/search","href":"/api-reference/markets/search"}]},{"group":"Packs","pages":[{"title":"List Packs","openapi":"GET /parlay/packs","href":"/api-reference/packs/list-packs"},{"title":"Search Active Packs","openapi":"GET /parlay/packs/search","href":"/api-reference/packs/search-packs"},{"title":"Get Pack","openapi":"GET /parlay/packs/{id}","href":"/api-reference/packs/get-pack"},{"title":"Quote Partner Pack","openapi":"POST /parlay/partner/quote","href":"/api-reference/packs/quote-pack"},{"title":"Buy Partner Pack","openapi":"POST /parlay/partner/buy","href":"/api-reference/packs/buy-pack"},{"title":"List Partner Pack Positions","openapi":"GET /parlay/partner/positions","href":"/api-reference/packs/list-positions"},{"title":"Get Partner Pack Position","openapi":"GET /parlay/partner/positions/{id}","href":"/api-reference/packs/get-position"},{"title":"Claim Partner Pack","openapi":"POST /parlay/partner/positions/{id}/claim","href":"/api-reference/packs/claim-position"},{"title":"Confirm Partner Pack Claim","openapi":"POST /parlay/partner/positions/{id}/claim/confirm","href":"/api-reference/packs/confirm-claim"}]},{"group":"Trading","pages":[{"title":"Create Order","openapi":"POST /orders","href":"/api-reference/trading/create-order"},{"title":"Get Order Status (Batch)","openapi":"POST /orders/status/batch","href":"/api-reference/trading/order-status-batch"},{"title":"Cancel Order (Combined)","openapi":"POST /orders/cancel","href":"/api-reference/trading/cancel"},{"title":"Batch Cancel Orders (Combined)","openapi":"POST /orders/batch-cancel","href":"/api-reference/trading/batch-cancel"},{"title":"Cancel and Replace Order","openapi":"POST /orders/cancel-replace","href":"/api-reference/trading/cancel-replace"},{"title":"Cancel and Replace Orders (Batch)","openapi":"POST /orders/cancel-replace/batch","href":"/api-reference/trading/cancel-replace-batch"},{"title":"Cancel Order","openapi":"DELETE /orders/{orderId}","href":"/api-reference/trading/cancel-order"},{"title":"Cancel Orders (Batch)","openapi":"POST /orders/cancel-batch","href":"/api-reference/trading/cancel-batch"},{"title":"Cancel All Orders","openapi":"DELETE /orders/all/{slug}","href":"/api-reference/trading/cancel-all"},{"title":"Market Maker Heartbeat","openapi":"POST /heartbeats","description":"A safety timer for your orders. Set a deadline, then keep extending it while your trading service runs. If updates stop and the deadline passes, Limitless starts canceling your open orders across all markets. This does not block new orders, so stop placing them if an update fails.","href":"/api-reference/trading/heartbeats"},{"title":"Get Orderbook","openapi":"GET /markets/{slug}/orderbook","href":"/api-reference/trading/orderbook"},{"title":"Get Historical Prices","openapi":"GET /markets/{slug}/historical-price","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.","href":"/api-reference/trading/historical-price"},{"title":"Get User Orders","openapi":"GET /markets/{slug}/user-orders","href":"/api-reference/trading/user-orders"},{"title":"Get Market Events","openapi":"GET /markets/{slug}/events","href":"/api-reference/trading/market-events"}]},{"group":"Portfolio","pages":[{"title":"Get Current Profile","openapi":"GET /profiles/me","href":"/api-reference/portfolio/get-current-profile"},{"title":"Get Your Profile","openapi":"GET /profiles/{account}","href":"/api-reference/portfolio/get-profile"},{"title":"Get Trades","openapi":"GET /portfolio/trades","href":"/api-reference/portfolio/trades"},{"title":"Get Positions","openapi":"GET /portfolio/positions","href":"/api-reference/portfolio/positions"},{"title":"Redeem Resolved Positions","href":"/api-reference/portfolio/redeem"},{"title":"Split Collateral Into Outcome Set","href":"/api-reference/portfolio/split"},{"title":"Merge Outcome Set Into Collateral","href":"/api-reference/portfolio/merge"},{"title":"Withdraw From Server Wallet","href":"/api-reference/portfolio/withdraw"},{"title":"Add Withdrawal Address","href":"/api-reference/portfolio/add-withdrawal-address"},{"title":"Delete Withdrawal Address","href":"/api-reference/portfolio/delete-withdrawal-address"},{"title":"Get PnL Chart","openapi":"GET /portfolio/pnl-chart","href":"/api-reference/portfolio/pnl-chart"},{"title":"Get History","openapi":"GET /portfolio/history","href":"/api-reference/portfolio/history"},{"title":"Get Points Breakdown","openapi":"GET /portfolio/points","href":"/api-reference/portfolio/points"},{"title":"Get Trading Allowance","openapi":"GET /portfolio/trading/allowance","href":"/api-reference/portfolio/allowance"}]},{"group":"Market Pages \u0026 Navigation","pages":[{"title":"Get Navigation Tree","openapi":"GET /navigation","href":"/api-reference/navigation/get-navigation"},{"title":"Get Market Page by Path","openapi":"GET /market-pages/by-path","href":"/api-reference/navigation/get-page-by-path"},{"title":"List Markets for a Page","openapi":"GET /market-pages/{id}/markets","href":"/api-reference/navigation/list-page-markets"},{"title":"List Property Keys","openapi":"GET /property-keys","href":"/api-reference/navigation/list-property-keys"},{"title":"Get Property Key","openapi":"GET /property-keys/{id}","href":"/api-reference/navigation/get-property-key"},{"title":"List Property Options","openapi":"GET /property-keys/{id}/options","href":"/api-reference/navigation/list-property-options"}]},{"group":"API Tokens","pages":[{"title":"Get Partner Capabilities","openapi":"GET /auth/api-tokens/capabilities","href":"/api-reference/api-tokens/get-capabilities"},{"title":"Derive Scoped Token","openapi":"POST /auth/api-tokens/derive","href":"/api-reference/api-tokens/derive-token"},{"title":"List Active Tokens","openapi":"GET /auth/api-tokens","href":"/api-reference/api-tokens/list-tokens"},{"title":"Revoke Token","openapi":"DELETE /auth/api-tokens/{tokenId}","href":"/api-reference/api-tokens/revoke-token"}]},{"group":"Partner Accounts","pages":[{"title":"Create Partner Sub-Account","openapi":"POST /profiles/partner-accounts","href":"/api-reference/partner-accounts/create-partner-account"},{"title":"List Partner Sub-Accounts","openapi":"GET /profiles/partner-accounts","href":"/api-reference/partner-accounts/list-partner-accounts"},{"title":"Check Partner Account Allowances","openapi":"GET /profiles/partner-accounts/{profileId}/allowances","href":"/api-reference/partner-accounts/check-allowances"},{"title":"Retry Partner Account Allowances","openapi":"POST /profiles/partner-accounts/{profileId}/allowances/retry","href":"/api-reference/partner-accounts/retry-allowances"}]},{"group":"Public Portfolio","pages":[{"title":"Get User Traded Volume","openapi":"GET /portfolio/{account}/traded-volume","href":"/api-reference/public-portfolio/traded-volume"},{"title":"Get User Positions (Public)","openapi":"GET /portfolio/{account}/positions","href":"/api-reference/public-portfolio/positions"},{"title":"Get Realized PnL (Public)","openapi":"GET /portfolio/{account}/realized-pnl","href":"/api-reference/public-portfolio/realized-pnl"},{"title":"Get PnL Chart (Public)","openapi":"GET /portfolio/{account}/pnl-chart","href":"/api-reference/public-portfolio/pnl-chart"},{"title":"Get User History (Public)","openapi":"GET /portfolio/{account}/history","href":"/api-reference/public-portfolio/history"},{"title":"Get User Accuracy (Public)","openapi":"GET /user-stats/accuracy/{account}","href":"/api-reference/public-portfolio/accuracy"},{"title":"Get User Pack Positions (Public)","openapi":"GET /parlay/{account}/positions","href":"/api-reference/public-portfolio/pack-positions"}]},{"group":"Feed","pages":[{"title":"Get Trading Activity Feed","openapi":"GET /feed/trading","href":"/api-reference/feed/trading-feed"}]},{"group":"Referral","pages":[{"title":"Get My Referral Stats","openapi":"GET /referral/usdc/me","href":"/api-reference/referral/my-stats"},{"title":"Get My Referred Users","openapi":"GET /referral/usdc/referrals","href":"/api-reference/referral/my-referrals"},{"title":"Get Referral Leaderboard","openapi":"GET /referral/usdc/leaderboard","href":"/api-reference/referral/leaderboard"},{"title":"Get Friends Leaderboard","openapi":"GET /referral/usdc/leaderboard/friends","href":"/api-reference/referral/leaderboard-friends"}]},{"group":"Leaderboard","pages":[{"title":"Unrealized PnL Leaderboard by Market","openapi":"GET /leaderboard/pnl/unrealized/markets/{marketId}","href":"/api-reference/leaderboard/unrealized-pnl-market"},{"title":"Biggest Open Positions","openapi":"GET /leaderboard/pnl/unrealized/biggest-positions","href":"/api-reference/leaderboard/biggest-positions"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Get Orderbook - Limitless Exchange","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CDiBsYGW.js","utils-KF9rPlmF.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C26urKTX.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BdjmJAC1.js","snippetPresets-3IpDBjt3.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-D4x_2vvo.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BIWdc5Pa.js","shallow-LQqfiMNd.js","getApiPlaygroundDisplay-DryzlOZG.js","CodeSnippet-tcJujU4r.js","CodeSnippets-BHp0nVLL.js","Page-1CZdsdAn.js","getPastedJson-DU-1ayUv.js","icon-CZK2hPr4.js","MethodPill-DOaqmTFC.js","DuplicateIcon-B5-nUxxl.js","createIcon-CDP_U77G.js","DynamicMarkdown-GHvayGOn.js","SectionHeading-BYvpkmUD.js","axios-vUo_bRtp.js","Markdown-uxhlayGT.js","clsx-B35qUV0p.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BvrGG8gU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CAf0yVYe.js"]}