# Table of Contents - [Get PnL Chart - Limitless Exchange](#get-pnl-chart-limitless-exchange) - [Get Points Breakdown - Limitless Exchange](#get-points-breakdown-limitless-exchange) - [Get History - Limitless Exchange](#get-history-limitless-exchange) - [Get Positions - Limitless Exchange](#get-positions-limitless-exchange) - [Changelog - Limitless Exchange](#changelog-limitless-exchange) - [Withdraw From Server Wallet - Limitless Exchange](#withdraw-from-server-wallet-limitless-exchange) - [Get Trades - Limitless Exchange](#get-trades-limitless-exchange) - [Get PnL Chart (Public) - Limitless Exchange](#get-pnl-chart-public-limitless-exchange) - [Get User Traded Volume - Limitless Exchange](#get-user-traded-volume-limitless-exchange) - [Get Market Events - Limitless Exchange](#get-market-events-limitless-exchange) - [Cancel Order - Limitless Exchange](#cancel-order-limitless-exchange) - [Get Historical Prices - Limitless Exchange](#get-historical-prices-limitless-exchange) - [Cancel Orders (Batch) - Limitless Exchange](#cancel-orders-batch-limitless-exchange) - [Get User Positions (Public) - Limitless Exchange](#get-user-positions-public-limitless-exchange) - [Get Locked Balance - Limitless Exchange](#get-locked-balance-limitless-exchange) - [Cancel All Orders - Limitless Exchange](#cancel-all-orders-limitless-exchange) - [Get Orderbook - Limitless Exchange](#get-orderbook-limitless-exchange) - [Create Order - Limitless Exchange](#create-order-limitless-exchange) - [Get User Orders - Limitless Exchange](#get-user-orders-limitless-exchange) - [Redeem Resolved Positions - Limitless Exchange](#redeem-resolved-positions-limitless-exchange) - [For Developers - Limitless Exchange](#for-developers-limitless-exchange) - [EIP-712 Order Signing - Limitless Exchange](#eip-712-order-signing-limitless-exchange) - [Get Order Status (Batch) - Limitless Exchange](#get-order-status-batch-limitless-exchange) - [Authentication - Limitless Exchange](#authentication-limitless-exchange) - [Migrate from Polymarket - Limitless Exchange](#migrate-from-polymarket-limitless-exchange) - [Analytics - Limitless Exchange](#analytics-limitless-exchange) - [LP Rewards - Limitless Exchange](#lp-rewards-limitless-exchange) - [Market Orders - Limitless Exchange](#market-orders-limitless-exchange) - [CLOB Overview - Limitless Exchange](#clob-overview-limitless-exchange) - [Negrisk / Category Markets - Limitless Exchange](#negrisk-category-markets-limitless-exchange) - [Converting Shares - Limitless Exchange](#converting-shares-limitless-exchange) - [Making Your First Trade - Limitless Exchange](#making-your-first-trade-limitless-exchange) - [Limit Orders - Limitless Exchange](#limit-orders-limitless-exchange) - [Market Resolution - Limitless Exchange](#market-resolution-limitless-exchange) - [Merging & Splitting Shares - Limitless Exchange](#merging-splitting-shares-limitless-exchange) - [Fees - Limitless Exchange](#fees-limitless-exchange) - [Refund Policy - Limitless Exchange](#refund-policy-limitless-exchange) - [Managing Orders - Limitless Exchange](#managing-orders-limitless-exchange) - [Maker rebates - Limitless Exchange](#maker-rebates-limitless-exchange) - [Privacy Policy - Limitless Exchange](#privacy-policy-limitless-exchange) - [Partner Accounts - Limitless Exchange](#partner-accounts-limitless-exchange) - [Python SDK - Limitless Exchange](#python-sdk-limitless-exchange) - [Smart Contracts - Limitless Exchange](#smart-contracts-limitless-exchange) - [Terms of Service - Limitless Exchange](#terms-of-service-limitless-exchange) - [WebSocket Streaming - Limitless Exchange](#websocket-streaming-limitless-exchange) - [API Tokens - Limitless Exchange](#api-tokens-limitless-exchange) - [What is Limitless? - Limitless Exchange](#what-is-limitless-limitless-exchange) - [Wallet Types - Limitless Exchange](#wallet-types-limitless-exchange) - [Portfolio & Positions - Limitless Exchange](#portfolio-positions-limitless-exchange) - [Markets - Limitless Exchange](#markets-limitless-exchange) - [Market Pages - Limitless Exchange](#market-pages-limitless-exchange) - [Partner Accounts - Limitless Exchange](#partner-accounts-limitless-exchange) - [Trading & Orders - Limitless Exchange](#trading-orders-limitless-exchange) - [Venue System - Limitless Exchange](#venue-system-limitless-exchange) - [Delegated Orders - Limitless Exchange](#delegated-orders-limitless-exchange) - [Portfolio & Positions - Limitless Exchange](#portfolio-positions-limitless-exchange) - [WebSocket Events - Limitless Exchange](#websocket-events-limitless-exchange) - [Market Pages - Limitless Exchange](#market-pages-limitless-exchange) - [Markets - Limitless Exchange](#markets-limitless-exchange) - [Error Handling & Retry - Limitless Exchange](#error-handling-retry-limitless-exchange) - [Trading & Orders - Limitless Exchange](#trading-orders-limitless-exchange) - [WebSocket Streaming - Limitless Exchange](#websocket-streaming-limitless-exchange) - [TypeScript SDK - Limitless Exchange](#typescript-sdk-limitless-exchange) - [Error Handling & Retry - Limitless Exchange](#error-handling-retry-limitless-exchange) --- # Get PnL Chart - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Get PnL Chart [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get portfolio PnL chart cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/pnl-chart \ --header 'X-API-Key: ' 200 { "timeframe": "7d", "data": [\ {\ "timestamp": 1700000000000,\ "value": 123.45\ }\ ], "currentValue": -7.04, "previousValue": -6.5, "percentChange": 8.24, "current": {} } GET / portfolio / pnl-chart Try it Get portfolio PnL chart cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/pnl-chart \ --header 'X-API-Key: ' 200 { "timeframe": "7d", "data": [\ {\ "timestamp": 1700000000000,\ "value": 123.45\ }\ ], "currentValue": -7.04, "previousValue": -6.5, "percentChange": 8.24, "current": {} } #### Authorizations [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Query Parameters [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#parameter-timeframe) timeframe string Timeframe window for percent change and chart series Example: `"7d"` #### Response 200 application/json PnL chart data [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-timeframe) timeframe string required Timeframe window used for previous/current comparison Example: `"7d"` [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-data) data object\[\] required Realised PnL series (USD) for the selected timeframe Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-current-value) currentValue number required Current realised PnL (USD) Example: `-7.04` [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-previous-value) previousValue number required Previous realised PnL (USD) at timeframe start Example: `-6.5` [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-percent-change) percentChange number required Percent change between previousValue and currentValue (realised PnL) Example: `8.24` [​](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart#response-current-one-of-0) current object Current PnL snapshot (hybrid: realised + unrealized + total) [Withdraw From Server Wallet](https://docs.limitless.exchange/api-reference/portfolio/withdraw) [Get History](https://docs.limitless.exchange/api-reference/portfolio/history) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Points Breakdown - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/points#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Get Points Breakdown [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get points breakdown cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/points \ --header 'X-API-Key: ' GET / portfolio / points Try it Get points breakdown cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/points \ --header 'X-API-Key: ' #### Authorizations [​](https://docs.limitless.exchange/api-reference/portfolio/points#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Response 200 Points breakdown [Get History](https://docs.limitless.exchange/api-reference/portfolio/history) [Get Trading Allowance](https://docs.limitless.exchange/api-reference/portfolio/allowance) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get History - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/history#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Get History [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get History cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/history \ --header 'X-API-Key: ' 200 { "data": [\ {\ "blockTimestamp": 1744115608,\ "collateralAmount": "25.5",\ "market": {\ "closed": false,\ "collateral": {\ "symbol": "USDC",\ "id": 7,\ "decimals": 6\ },\ "group": {\ "id": 10000037,\ "slug": "positionconverted-test-1744046422596",\ "title": "PositionConverted test",\ "status": "FUNDED",\ "deadline": "2025-04-11T22:34:56.000Z",\ "hidden": false,\ "priorityIndex": 0,\ "metadata": {\ "isBannered": false\ },\ "negRiskMarketId": "0xe103633b40e9b664f8acc89e8cf7b7916475961ae1708a249fa5d6c933168c00",\ "createdAt": "2025-04-07T17:20:22.135Z",\ "updatedAt": "2025-04-07T17:22:08.464Z",\ "txHash": null,\ "resolutionTxHash": null\ },\ "condition_id": "0x08518bc4bb8a3dbb89aac4425ace0876b94a5dfa77dee47a20737a19cf67e325",\ "funding": 0,\ "id": 980,\ "slug": "btc-above-100k-jul-4",\ "title": "$BTC above $100k on Jul 4?",\ "deadline": "2025-07-04T23:59:59.000Z"\ },\ "outcomeTokenAmount": "50",\ "outcomeTokenAmounts": [\ "50",\ "0"\ ],\ "outcomeIndex": 0,\ "outcomeTokenPrice": 0.51,\ "strategy": "Limit Buy",\ "transactionHash": "0x992f36465f938b21a6a5fe3c417c98c3268a616a05479d2dc53870c6cd1a0761"\ }\ ], "totalCount": 8 } GET / portfolio / history Try it Get History cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/history \ --header 'X-API-Key: ' 200 { "data": [\ {\ "blockTimestamp": 1744115608,\ "collateralAmount": "25.5",\ "market": {\ "closed": false,\ "collateral": {\ "symbol": "USDC",\ "id": 7,\ "decimals": 6\ },\ "group": {\ "id": 10000037,\ "slug": "positionconverted-test-1744046422596",\ "title": "PositionConverted test",\ "status": "FUNDED",\ "deadline": "2025-04-11T22:34:56.000Z",\ "hidden": false,\ "priorityIndex": 0,\ "metadata": {\ "isBannered": false\ },\ "negRiskMarketId": "0xe103633b40e9b664f8acc89e8cf7b7916475961ae1708a249fa5d6c933168c00",\ "createdAt": "2025-04-07T17:20:22.135Z",\ "updatedAt": "2025-04-07T17:22:08.464Z",\ "txHash": null,\ "resolutionTxHash": null\ },\ "condition_id": "0x08518bc4bb8a3dbb89aac4425ace0876b94a5dfa77dee47a20737a19cf67e325",\ "funding": 0,\ "id": 980,\ "slug": "btc-above-100k-jul-4",\ "title": "$BTC above $100k on Jul 4?",\ "deadline": "2025-07-04T23:59:59.000Z"\ },\ "outcomeTokenAmount": "50",\ "outcomeTokenAmounts": [\ "50",\ "0"\ ],\ "outcomeIndex": 0,\ "outcomeTokenPrice": 0.51,\ "strategy": "Limit Buy",\ "transactionHash": "0x992f36465f938b21a6a5fe3c417c98c3268a616a05479d2dc53870c6cd1a0761"\ }\ ], "totalCount": 8 } #### Authorizations [​](https://docs.limitless.exchange/api-reference/portfolio/history#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Query Parameters [​](https://docs.limitless.exchange/api-reference/portfolio/history#parameter-page) page number required Page number Example: `1` [​](https://docs.limitless.exchange/api-reference/portfolio/history#parameter-limit) limit number required Number of items per page Example: `10` [​](https://docs.limitless.exchange/api-reference/portfolio/history#parameter-from) from string Start date for filtering (ISO 8601 format) Example: `"2024-01-01T00:00:00.000Z"` [​](https://docs.limitless.exchange/api-reference/portfolio/history#parameter-to) to string End date for filtering (ISO 8601 format) Example: `"2024-12-31T23:59:59.999Z"` #### Response 200 application/json Paginated history of all user actions [​](https://docs.limitless.exchange/api-reference/portfolio/history#response-data) data object\[\] required List of history entries Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/history#response-total-count) totalCount number required Total count of entries Example: `8` [Get PnL Chart](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart) [Get Points Breakdown](https://docs.limitless.exchange/api-reference/portfolio/points) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Positions - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/positions#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Get Positions [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get Positions cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/positions \ --header 'X-API-Key: ' 200 { "rewards": { "todaysRewards": "50250000", "totalUnpaidRewards": "200750000", "totalUserRewardsLastEpoch": "150500000", "rewardsByEpoch": [\ {\ "epochId": 1,\ "timestamp": "2024-01-01T00:00:00.000Z",\ "totalRewards": "1500000",\ "userRewards": "150000",\ "earnedPercent": 0.1\ }\ ], "rewardsChartData": [\ {\ "timestamp": 1672531200000,\ "userRewards": "25000000",\ "totalRewards": "60000000"\ }\ ] }, "points": 123, "accumulativePoints": 456, "amm": [\ {\ "market": {},\ "outcomeIndex": 0,\ "collateralAmount": "100500000",\ "latestTrade": {},\ "outcomeTokenAmount": "50250000",\ "account": "0x1234567890123456789012345678901234567890"\ }\ ], "clob": [\ {\ "market": {\ "address": "",\ "title": "",\ "proxyTitle": null,\ "description": "",\ "question_id": {},\ "condition_id": {},\ "position_ids": [\ ""\ ],\ "outcome_slot_count": 2,\ "winning_index": 0.5,\ "payout_numerators": [\ ""\ ],\ "status": "",\ "og_url": "",\ "image_url": "",\ "deadline": "",\ "hidden": false,\ "txHash": null,\ "resolutionTxHash": null,\ "priority_index": null\ },\ "positions": {\ "yes": {\ "cost": "75000000",\ "fillPrice": "750000",\ "realisedPnl": "0",\ "unrealizedPnl": "25000000",\ "marketValue": "100000000"\ },\ "no": {\ "cost": "25000000",\ "fillPrice": "250000",\ "realisedPnl": "0",\ "unrealizedPnl": "-5000000",\ "marketValue": "20000000"\ }\ },\ "tokensBalance": {},\ "orders": {},\ "latestTrade": {},\ "rewards": {}\ }\ ], "group": [\ {}\ ] } GET / portfolio / positions Try it Get Positions cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/positions \ --header 'X-API-Key: ' 200 { "rewards": { "todaysRewards": "50250000", "totalUnpaidRewards": "200750000", "totalUserRewardsLastEpoch": "150500000", "rewardsByEpoch": [\ {\ "epochId": 1,\ "timestamp": "2024-01-01T00:00:00.000Z",\ "totalRewards": "1500000",\ "userRewards": "150000",\ "earnedPercent": 0.1\ }\ ], "rewardsChartData": [\ {\ "timestamp": 1672531200000,\ "userRewards": "25000000",\ "totalRewards": "60000000"\ }\ ] }, "points": 123, "accumulativePoints": 456, "amm": [\ {\ "market": {},\ "outcomeIndex": 0,\ "collateralAmount": "100500000",\ "latestTrade": {},\ "outcomeTokenAmount": "50250000",\ "account": "0x1234567890123456789012345678901234567890"\ }\ ], "clob": [\ {\ "market": {\ "address": "",\ "title": "",\ "proxyTitle": null,\ "description": "",\ "question_id": {},\ "condition_id": {},\ "position_ids": [\ ""\ ],\ "outcome_slot_count": 2,\ "winning_index": 0.5,\ "payout_numerators": [\ ""\ ],\ "status": "",\ "og_url": "",\ "image_url": "",\ "deadline": "",\ "hidden": false,\ "txHash": null,\ "resolutionTxHash": null,\ "priority_index": null\ },\ "positions": {\ "yes": {\ "cost": "75000000",\ "fillPrice": "750000",\ "realisedPnl": "0",\ "unrealizedPnl": "25000000",\ "marketValue": "100000000"\ },\ "no": {\ "cost": "25000000",\ "fillPrice": "250000",\ "realisedPnl": "0",\ "unrealizedPnl": "-5000000",\ "marketValue": "20000000"\ }\ },\ "tokensBalance": {},\ "orders": {},\ "latestTrade": {},\ "rewards": {}\ }\ ], "group": [\ {}\ ] } For real-time position updates, use the [WebSocket API](https://docs.limitless.exchange/developers/websocket-events) — subscribe to `subscribe_positions`. `status: RESOLVED` and `winningOutcomeIndex` indicate that the winning outcome is known in the API response. They do **not** guarantee that the underlying conditional token payout has already been settled on-chain or that the position is immediately redeemable. See [Programmatic API - Lifecycle after a trade](https://docs.limitless.exchange/developers/programmatic-api#lifecycle-after-a-trade) . #### Authorizations [​](https://docs.limitless.exchange/api-reference/portfolio/positions#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Response 200 application/json Complete portfolio positions with summary [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-rewards) rewards object required Rewards information for the portfolio Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-points) points number required User points Example: `123` [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-accumulative-points) accumulativePoints number required User accumulative points Example: `456` [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-amm) amm object\[\] required List of AMM positions Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-clob) clob object\[\] required List of CLOB positions Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/positions#response-group) group object\[\] Grouped CLOB positions (if enabled) [Get Trades](https://docs.limitless.exchange/api-reference/portfolio/trades) [Redeem Resolved Positions](https://docs.limitless.exchange/api-reference/portfolio/redeem) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Changelog - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/changelog#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Changelog [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Apr 14, 2026](https://docs.limitless.exchange/changelog#apr-14-2026) * [SDK v1.0.6: Server Wallet Claim & 100% Maker Rebates](https://docs.limitless.exchange/changelog#sdk-v1-0-6-server-wallet-claim-%26-100%25-maker-rebates) * [Apr 2, 2026](https://docs.limitless.exchange/changelog#apr-2-2026) * [Programmatic API: Partner Integrations, Delegated Signing & FOK Orders](https://docs.limitless.exchange/changelog#programmatic-api-partner-integrations-delegated-signing-%26-fok-orders) * [SDK v1.0.4–1.0.5: Programmatic API Support (TypeScript, Python, Go)](https://docs.limitless.exchange/changelog#sdk-v1-0-4%E2%80%931-0-5-programmatic-api-support-typescript-python-go) * [Mar 23, 2026](https://docs.limitless.exchange/changelog#mar-23-2026) * [SDK v1.0.3: Market Pages Navigation](https://docs.limitless.exchange/changelog#sdk-v1-0-3-market-pages-navigation) * [Go SDK v1.0.3: Initial Stable Release](https://docs.limitless.exchange/changelog#go-sdk-v1-0-3-initial-stable-release) * [Mar 2026](https://docs.limitless.exchange/changelog#mar-2026) * [WebSocket Market Lifecycle Events](https://docs.limitless.exchange/changelog#websocket-market-lifecycle-events) * [Feb 2026](https://docs.limitless.exchange/changelog#feb-2026) * [SDK v1.0.2: Stable LTS Release (TypeScript & Python)](https://docs.limitless.exchange/changelog#sdk-v1-0-2-stable-lts-release-typescript-%26-python) * [Python SDK v1.0.2: Float Precision Fix](https://docs.limitless.exchange/changelog#python-sdk-v1-0-2-float-precision-fix) * [Dec 2025](https://docs.limitless.exchange/changelog#dec-2025) * [API: Cookie-Based Authentication Removed](https://docs.limitless.exchange/changelog#api-cookie-based-authentication-removed) * [Nov 2025](https://docs.limitless.exchange/changelog#nov-2025) * [Initial SDK Releases (Pre-release)](https://docs.limitless.exchange/changelog#initial-sdk-releases-pre-release) Welcome to the Limitless Changelog. Here you’ll find important changes to the Limitless Exchange platform including API updates, SDK releases, and new features. [​](https://docs.limitless.exchange/changelog#apr-14-2026) Apr 14, 2026 -------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#sdk-v1-0-6-server-wallet-claim-&-100%-maker-rebates) SDK v1.0.6: Server Wallet Claim & 100% Maker Rebates **Server wallet claim (all SDKs):** * All three SDKs (TypeScript, Python, Go) now include helper methods for server wallet redemption and withdrawal * `redeem` — claim resolved conditional-token positions from managed sub-accounts * `withdraw` — transfer ERC20 funds from managed sub-accounts to partner wallets * Previously these operations required direct REST calls; now fully supported in the SDK **Maker Rebates program update:** * Rebate rate increased to **100%** across all market types (daily, hourly crypto, 15-minute crypto) **Documentation:** [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) | [TypeScript SDK](https://docs.limitless.exchange/developers/sdk/typescript/getting-started) | [Python SDK](https://docs.limitless.exchange/developers/sdk/python/getting-started) | [Go SDK](https://docs.limitless.exchange/developers/sdk/go/getting-started) | [Maker Rebates](https://docs.limitless.exchange/user-guide/maker-rebates) [​](https://docs.limitless.exchange/changelog#apr-2-2026) Apr 2, 2026 ------------------------------------------------------------------------ ### [​](https://docs.limitless.exchange/changelog#programmatic-api-partner-integrations-delegated-signing-&-fok-orders) Programmatic API: Partner Integrations, Delegated Signing & FOK Orders Major new capability for partners building on Limitless. The Programmatic API enables platform integrations with sub-account management, server-side order signing, and both GTC and FOK order types — all through HMAC-authenticated scoped tokens. **New API endpoints:** * `POST /auth/api-tokens/derive` — Create scoped HMAC tokens with granular permissions (`trading`, `account_creation`, `delegated_signing`) * `GET /auth/api-tokens/capabilities` — Check partner capability configuration * `GET /auth/api-tokens` — List active tokens * `DELETE /auth/api-tokens/:tokenId` — Revoke a token * `POST /profiles/partner-accounts` — Create sub-accounts with server-managed wallets or EOA verification **Delegated signing:** * Partners with the `delegated_signing` scope can submit unsigned orders on behalf of sub-accounts * The server signs orders using Privy-managed wallets — no private key management needed on the partner side * Both **GTC** (limit) and **FOK** (market) order types are supported for delegated orders * FOK orders use `makerAmount` (USDC to spend for BUY, shares to sell for SELL) instead of `price` + `size` **Recommended architecture:** * Store HMAC credentials on your backend — never expose them to frontends * Use the SDK server-side to sign partner-authenticated requests * Expose only your own app-specific endpoints to the frontend **Documentation:** [Programmatic API guide](https://docs.limitless.exchange/developers/programmatic-api) | [Authentication](https://docs.limitless.exchange/developers/authentication#scoped-api-tokens-hmac) | [API Tokens reference](https://docs.limitless.exchange/api-reference/api-tokens/derive-token) ### [​](https://docs.limitless.exchange/changelog#sdk-v1-0-4%E2%80%931-0-5-programmatic-api-support-typescript-python-go) SDK v1.0.4–1.0.5: Programmatic API Support (TypeScript, Python, Go) All three official SDKs now include full support for the Programmatic API: **New services across all SDKs:** * `ApiTokenService` — Derive, list, and revoke scoped HMAC tokens * `PartnerAccountService` — Create sub-accounts with server wallets or EOA verification * `DelegatedOrderService` — Place GTC and FOK orders on behalf of sub-accounts, cancel orders **New root `Client` entrypoint:** * Composes all domain services (markets, portfolio, orders, API tokens, partner accounts, delegated orders) behind a single constructor * HMAC credentials are configured once and applied to all requests automatically **TypeScript SDK:** * `Client` with `hmacCredentials` option * `client.apiTokens`, `client.partnerAccounts`, `client.delegatedOrders` * WebSocket HMAC authentication support * [TypeScript SDK docs](https://docs.limitless.exchange/developers/sdk/typescript/getting-started) **Python SDK:** * `Client` with `hmac_credentials` option * `client.api_tokens`, `client.partner_accounts`, `client.delegated_orders` * WebSocket HMAC handshake support * [Python SDK docs](https://docs.limitless.exchange/developers/sdk/python/getting-started) **Go SDK:** * `NewClient(limitless.WithHMACCredentials(...))` * `client.ApiTokens`, `client.PartnerAccounts`, `client.DelegatedOrders` * WebSocket HMAC authentication support * [Go SDK docs](https://docs.limitless.exchange/developers/sdk/go/getting-started) [​](https://docs.limitless.exchange/changelog#mar-23-2026) Mar 23, 2026 -------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#sdk-v1-0-3-market-pages-navigation) SDK v1.0.3: Market Pages Navigation All three SDKs now support the market pages navigation API for browsing markets by category. **New capabilities:** * Navigation tree discovery * Market page resolution by path with automatic redirect handling * Market listing with filters, pagination, and cursor support * Property keys and options for dynamic filtering **TypeScript:** [Market Pages](https://docs.limitless.exchange/developers/sdk/typescript/market-pages) | **Python:** [Market Pages](https://docs.limitless.exchange/developers/sdk/python/market-pages) | **Go:** [Market Pages](https://docs.limitless.exchange/developers/sdk/go/market-pages) ### [​](https://docs.limitless.exchange/changelog#go-sdk-v1-0-3-initial-stable-release) Go SDK v1.0.3: Initial Stable Release First stable, production-ready release of the Go SDK with full feature parity. **Highlights:** * EIP-712 order signing with private key (Base mainnet) * GTC and FOK order support * WebSocket streaming with Socket.IO protocol, auto-reconnect, and typed event handlers * Configurable retry with exponential backoff * Functional options pattern throughout (`WithBaseURL`, `WithAPIKey`, `WithLogger`, etc.) * Zero external dependencies beyond `go-ethereum` and `gorilla/websocket` **Documentation:** [Go SDK](https://docs.limitless.exchange/developers/sdk/go/getting-started) [​](https://docs.limitless.exchange/changelog#mar-2026) Mar 2026 ------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#websocket-market-lifecycle-events) WebSocket Market Lifecycle Events New WebSocket events for market creation and resolution, enabling real-time monitoring of market lifecycle changes. * `market.created` — Fires when a new market is created * `market.resolved` — Fires when a market resolves **Documentation:** [WebSocket Events](https://docs.limitless.exchange/developers/websocket-events) [​](https://docs.limitless.exchange/changelog#feb-2026) Feb 2026 ------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#sdk-v1-0-2-stable-lts-release-typescript-&-python) SDK v1.0.2: Stable LTS Release (TypeScript & Python) First stable, long-term support releases of the TypeScript and Python SDKs. **Core features across both SDKs:** * API key authentication with `X-API-Key` header * EIP-712 order signing with venue-aware contract resolution * GTC and FOK order creation with automatic signing * Market data fetching with intelligent venue caching * Portfolio and position tracking * WebSocket streaming with auto-reconnect * Retry mechanisms with configurable backoff strategies * NegRisk market support with dual approval system **TypeScript SDK highlights:** * Full TypeScript type safety with comprehensive type definitions * 17 production-ready code samples * `@retryOnErrors` decorator and `withRetry` wrapper * [TypeScript SDK docs](https://docs.limitless.exchange/developers/sdk/typescript/getting-started) **Python SDK highlights:** * Async-first architecture built on aiohttp * Pydantic models for type-safe request/response handling * `@retry_on_errors` decorator * [Python SDK docs](https://docs.limitless.exchange/developers/sdk/python/getting-started) ### [​](https://docs.limitless.exchange/changelog#python-sdk-v1-0-2-float-precision-fix) Python SDK v1.0.2: Float Precision Fix Fixed IEEE 754 float precision issues in order pricing that could cause incorrect `makerAmount`/`takerAmount` calculations (e.g., `0.95` scaling to `949999` instead of `950000`). [​](https://docs.limitless.exchange/changelog#dec-2025) Dec 2025 ------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#api-cookie-based-authentication-removed) API: Cookie-Based Authentication Removed Cookie-based session authentication has been removed. All programmatic access now requires API keys (`X-API-Key` header) or scoped API tokens (HMAC). **Action required:** If you were using cookie-based authentication, migrate to API key authentication. Generate keys at [limitless.exchange](https://limitless.exchange/) under profile menu → Api keys. **Documentation:** [Authentication](https://docs.limitless.exchange/developers/authentication) [​](https://docs.limitless.exchange/changelog#nov-2025) Nov 2025 ------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/changelog#initial-sdk-releases-pre-release) Initial SDK Releases (Pre-release) Pre-release versions of the TypeScript (v0.0.1) and Python (v0.1.0) SDKs launched with core trading functionality including market data access, GTC/FOK order creation, and portfolio tracking. [Privacy Policy](https://docs.limitless.exchange/user-guide/privacy-policy) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Withdraw From Server Wallet - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/withdraw#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Withdraw From Server Wallet [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Request body](https://docs.limitless.exchange/api-reference/portfolio/withdraw#request-body) * [Example (HMAC)](https://docs.limitless.exchange/api-reference/portfolio/withdraw#example-hmac) * [Notes](https://docs.limitless.exchange/api-reference/portfolio/withdraw#notes) As of SDK v1.0.6, all three SDKs (TypeScript, Python, Go) include helper methods for this endpoint. Transfers ERC20 funds from a managed server-wallet sub-account to the authenticated partner’s own account or smart wallet. * Route: `POST /portfolio/withdraw` * Auth: `apiToken`, Privy, or session auth * Scope: `withdrawal` when using `apiToken` ### [​](https://docs.limitless.exchange/api-reference/portfolio/withdraw#request-body) Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `amount` | `string` | Yes | Token amount in smallest unit (for USDC: `1000000` = `1` USDC). | | `token` | `string` | No | ERC20 token address. Defaults to USDC when omitted. | | `destination` | `string` | No | Destination address. Must be one of the authenticated partner’s own addresses (account or smart wallet). | | `onBehalfOf` | `number` | No | Managed sub-account profile id (partner flow). Must be a child of the authenticated partner profile. | ### [​](https://docs.limitless.exchange/api-reference/portfolio/withdraw#example-hmac) Example (HMAC) curl -X POST "https://api.limitless.exchange/portfolio/withdraw" \ -H "content-type: application/json" \ -H "lmts-api-key: " \ -H "lmts-signature: " \ -H "lmts-timestamp: " \ -d '{ "amount": "1000000", "onBehalfOf": 12345 }' ### [​](https://docs.limitless.exchange/api-reference/portfolio/withdraw#notes) Notes * Destination defaults to the authenticated account if omitted. * Destination validation blocks withdrawals to third-party addresses. * Legacy API keys are not supported on server-wallet operations. [Redeem Resolved Positions](https://docs.limitless.exchange/api-reference/portfolio/redeem) [Get PnL Chart](https://docs.limitless.exchange/api-reference/portfolio/pnl-chart) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Trades - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/trades#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Get Trades [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get Trades cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/trades \ --header 'X-API-Key: ' 200 [\ {\ "blockTimestamp": "2025-09-01T11:30:31.000Z",\ "market": {\ "conditionId": "0x812f578437dc...",\ "expirationDate": "Sep 1, 2025",\ "id": "0x76d3e2098Be6...",\ "slug": "doge-above-021-sep-1",\ "title": "$DOGE above $0.21652 on Sep 1?"\ },\ "outcomeIndex": 0,\ "outcomeTokenAmounts": [\ "5000000",\ "0"\ ],\ "outcomeTokenNetCost": "4950000",\ "transactionHash": "0xabc123...",\ "collateralAmount": "5000000",\ "outcomeTokenAmount": "10000000",\ "outcomeTokenPrice": "0.50",\ "strategy": "Buy"\ }\ ] GET / portfolio / trades Try it Get Trades cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/trades \ --header 'X-API-Key: ' 200 [\ {\ "blockTimestamp": "2025-09-01T11:30:31.000Z",\ "market": {\ "conditionId": "0x812f578437dc...",\ "expirationDate": "Sep 1, 2025",\ "id": "0x76d3e2098Be6...",\ "slug": "doge-above-021-sep-1",\ "title": "$DOGE above $0.21652 on Sep 1?"\ },\ "outcomeIndex": 0,\ "outcomeTokenAmounts": [\ "5000000",\ "0"\ ],\ "outcomeTokenNetCost": "4950000",\ "transactionHash": "0xabc123...",\ "collateralAmount": "5000000",\ "outcomeTokenAmount": "10000000",\ "outcomeTokenPrice": "0.50",\ "strategy": "Buy"\ }\ ] #### Authorizations [​](https://docs.limitless.exchange/api-reference/portfolio/trades#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Response 200 application/json List of user trades with details [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-block-timestamp) blockTimestamp string required Timestamp of the block containing the trade Example: `"2025-09-01T11:30:31.000Z"` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-market) market object required Market details for the trade Show child attributes [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-outcome-index) outcomeIndex number required Index of the outcome traded (0 = YES, 1 = NO) Example: `0` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-outcome-token-amounts) outcomeTokenAmounts string\[\] required Collateral per outcome token Example: ["5000000", "0"] [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-outcome-token-net-cost) outcomeTokenNetCost string required Net cost of the outcome tokens Example: `"4950000"` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-transaction-hash) transactionHash string required On-chain transaction hash Example: `"0xabc123..."` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-collateral-amount) collateralAmount string Collateral amount traded (in token decimals) Example: `"5000000"` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-outcome-token-amount) outcomeTokenAmount string Amount of outcome tokens traded Example: `"10000000"` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-outcome-token-price) outcomeTokenPrice string Price of the outcome token at trade time Example: `"0.50"` [​](https://docs.limitless.exchange/api-reference/portfolio/trades#response-items-strategy) strategy enum Trade direction Available options: `Buy`, `Sell` Example: `"Buy"` [Get Your Profile](https://docs.limitless.exchange/api-reference/portfolio/get-profile) [Get Positions](https://docs.limitless.exchange/api-reference/portfolio/positions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get PnL Chart (Public) - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Public Portfolio Get PnL Chart (Public) [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get portfolio PnL chart (public) cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/pnl-chart 200 { "timeframe": "7d", "data": [\ {\ "timestamp": 1700000000000,\ "value": 123.45\ }\ ], "currentValue": -7.04, "previousValue": -6.5, "percentChange": 8.24, "current": {} } GET / portfolio / {account} / pnl-chart Try it Get portfolio PnL chart (public) cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/pnl-chart 200 { "timeframe": "7d", "data": [\ {\ "timestamp": 1700000000000,\ "value": 123.45\ }\ ], "currentValue": -7.04, "previousValue": -6.5, "percentChange": 8.24, "current": {} } #### Path Parameters [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#parameter-account) account string required User Ethereum address Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` #### Query Parameters [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#parameter-timeframe) timeframe string Timeframe window for percent change and chart series Example: `"7d"` #### Response 200 - application/json PnL chart data [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-timeframe) timeframe string required Timeframe window used for previous/current comparison Example: `"7d"` [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-data) data object\[\] required Realised PnL series (USD) for the selected timeframe Show child attributes [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-current-value) currentValue number required Current realised PnL (USD) Example: `-7.04` [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-previous-value) previousValue number required Previous realised PnL (USD) at timeframe start Example: `-6.5` [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-percent-change) percentChange number required Percent change between previousValue and currentValue (realised PnL) Example: `8.24` [​](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart#response-current-one-of-0) current object Current PnL snapshot (hybrid: realised + unrealized + total) [Get User Positions (Public)](https://docs.limitless.exchange/api-reference/public-portfolio/positions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get User Traded Volume - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/public-portfolio/traded-volume#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Public Portfolio Get User Traded Volume [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) User Total Volume cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/traded-volume 200 { "data": "9702853" } GET / portfolio / {account} / traded-volume Try it User Total Volume cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/traded-volume 200 { "data": "9702853" } #### Path Parameters [​](https://docs.limitless.exchange/api-reference/public-portfolio/traded-volume#parameter-account) account string required User Ethereum address Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` #### Response 200 - application/json User trading volume [​](https://docs.limitless.exchange/api-reference/public-portfolio/traded-volume#response-data) data string Total traded volume in whole USDC (no decimal divisor needed). Includes both taker and maker volume across CLOB and AMM trades. Example: `"9702853"` [Create Partner Sub-Account](https://docs.limitless.exchange/api-reference/partner-accounts/create-partner-account) [Get User Positions (Public)](https://docs.limitless.exchange/api-reference/public-portfolio/positions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Market Events - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/market-events#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get Market Events [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Market Events cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/events 200 { "events": [\ {\ "id": "event-123",\ "type": "ORDER_PLACED",\ "timestamp": "2024-01-15T10:30:00Z",\ "data": {}\ }\ ] } GET / markets / {slug} / events Try it Market Events cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/events 200 { "events": [\ {\ "id": "event-123",\ "type": "ORDER_PLACED",\ "timestamp": "2024-01-15T10:30:00Z",\ "data": {}\ }\ ] } #### Path Parameters #### Query Parameters [​](https://docs.limitless.exchange/api-reference/trading/market-events#parameter-page) page number Page number for pagination Example: `1` [​](https://docs.limitless.exchange/api-reference/trading/market-events#parameter-limit) limit number Number of events per page Example: `20` #### Response 200 - application/json List of market events [​](https://docs.limitless.exchange/api-reference/trading/market-events#response-events) events object\[\] Show child attributes [Get User Orders](https://docs.limitless.exchange/api-reference/trading/user-orders) [Get Your Profile](https://docs.limitless.exchange/api-reference/portfolio/get-profile) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Cancel Order - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/cancel-order#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Cancel Order [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Cancel Order cURL curl --request DELETE \ --url https://api.limitless.exchange/orders/{orderId} \ --header 'X-API-Key: ' 200 400 { "message": "Order canceled successfully" } DELETE / orders / {orderId} Try it Cancel Order cURL curl --request DELETE \ --url https://api.limitless.exchange/orders/{orderId} \ --header 'X-API-Key: ' 200 400 { "message": "Order canceled successfully" } To cancel multiple orders at once, use [Cancel Batch](https://docs.limitless.exchange/api-reference/trading/cancel-batch) or [Cancel All](https://docs.limitless.exchange/api-reference/trading/cancel-all) . #### Authorizations [​](https://docs.limitless.exchange/api-reference/trading/cancel-order#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Path Parameters [​](https://docs.limitless.exchange/api-reference/trading/cancel-order#parameter-order-id) orderId string required Unique identifier of the order to be cancelled Example: `"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203"` #### Response 200 application/json Order successfully cancelled [​](https://docs.limitless.exchange/api-reference/trading/cancel-order#response-message) message string required Confirmation message for the cancelled order Example: `"Order canceled successfully"` [Get Order Status (Batch)](https://docs.limitless.exchange/api-reference/trading/order-status-batch) [Cancel Orders (Batch)](https://docs.limitless.exchange/api-reference/trading/cancel-batch) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Prices - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/historical-price#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get Historical Prices [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get Historical Prices cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/historical-price 200 [\ {\ "title": "YES Token",\ "prices": [\ {\ "price": 0.75,\ "timestamp": "2024-01-15T10:30:00Z"\ }\ ]\ }\ ] GET / markets / {slug} / historical-price Try it Get Historical Prices cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/historical-price 200 [\ {\ "title": "YES Token",\ "prices": [\ {\ "price": 0.75,\ "timestamp": "2024-01-15T10:30:00Z"\ }\ ]\ }\ ] #### Path Parameters #### Query Parameters [​](https://docs.limitless.exchange/api-reference/trading/historical-price#parameter-interval) interval enum Time interval for data points Available options: `1h`, `6h`, `1d`, `1w`, `1m`, `all` #### Response 200 - application/json Historical price data [​](https://docs.limitless.exchange/api-reference/trading/historical-price#response-items-title) title string Example: `"YES Token"` [​](https://docs.limitless.exchange/api-reference/trading/historical-price#response-items-prices) prices object\[\] Show child attributes [Get Orderbook](https://docs.limitless.exchange/api-reference/trading/orderbook) [Get Locked Balance](https://docs.limitless.exchange/api-reference/trading/locked-balance) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Cancel Orders (Batch) - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/cancel-batch#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Cancel Orders (Batch) [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Cancel multiple orders in batch cURL curl --request POST \ --url https://api.limitless.exchange/orders/cancel-batch \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "orderIds": [\ "6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203",\ "9e31c452-8a2b-42d1-b327-65f18d07dc96"\ ] } ' 200 207 400 401 { "message": "Orders canceled successfully", "canceled": [\ "611badac-8dfc-48a0-b09e-59654adea1c5"\ ], "failed": [\ {\ "orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",\ "reason": "ORDER_NOT_FOUND",\ "message": "Order not found or already canceled"\ }\ ] } POST / orders / cancel-batch Try it Cancel multiple orders in batch cURL curl --request POST \ --url https://api.limitless.exchange/orders/cancel-batch \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "orderIds": [\ "6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203",\ "9e31c452-8a2b-42d1-b327-65f18d07dc96"\ ] } ' 200 207 400 401 { "message": "Orders canceled successfully", "canceled": [\ "611badac-8dfc-48a0-b09e-59654adea1c5"\ ], "failed": [\ {\ "orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",\ "reason": "ORDER_NOT_FOUND",\ "message": "Order not found or already canceled"\ }\ ] } #### Authorizations [​](https://docs.limitless.exchange/api-reference/trading/cancel-batch#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Body application/json [​](https://docs.limitless.exchange/api-reference/trading/cancel-batch#body-order-ids) orderIds array\[\] required Array of order IDs to be cancelled in a single batch operation Example: [ "6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203", "9e31c452-8a2b-42d1-b327-65f18d07dc96"] #### Response 200 application/json All orders successfully cancelled [​](https://docs.limitless.exchange/api-reference/trading/cancel-batch#response-message) message string required Confirmation message for the cancelled orders Example: `"Orders canceled successfully"` [​](https://docs.limitless.exchange/api-reference/trading/cancel-batch#response-canceled) canceled string\[\] Array of successfully cancelled order IDs Example: ["611badac-8dfc-48a0-b09e-59654adea1c5"] [​](https://docs.limitless.exchange/api-reference/trading/cancel-batch#response-failed) failed object\[\] Array of orders that failed to cancel with reasons Show child attributes [Cancel Order](https://docs.limitless.exchange/api-reference/trading/cancel-order) [Cancel All Orders](https://docs.limitless.exchange/api-reference/trading/cancel-all) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get User Positions (Public) - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/public-portfolio/positions#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Public Portfolio Get User Positions (Public) [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get All User Positions cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/positions 200 { "rewards": { "todaysRewards": "50250000", "totalUnpaidRewards": "200750000", "totalUserRewardsLastEpoch": "150500000", "rewardsByEpoch": [\ {\ "epochId": 1,\ "timestamp": "2024-01-01T00:00:00.000Z",\ "totalRewards": "1500000",\ "userRewards": "150000",\ "earnedPercent": 0.1\ }\ ], "rewardsChartData": [\ {\ "timestamp": 1672531200000,\ "userRewards": "25000000",\ "totalRewards": "60000000"\ }\ ] }, "points": 123, "accumulativePoints": 456, "amm": [\ {\ "market": {},\ "outcomeIndex": 0,\ "collateralAmount": "100500000",\ "latestTrade": {},\ "outcomeTokenAmount": "50250000",\ "account": "0x1234567890123456789012345678901234567890"\ }\ ], "clob": [\ {\ "market": {\ "address": "",\ "title": "",\ "proxyTitle": null,\ "description": "",\ "question_id": {},\ "condition_id": {},\ "position_ids": [\ ""\ ],\ "outcome_slot_count": 2,\ "winning_index": 0.5,\ "payout_numerators": [\ ""\ ],\ "status": "",\ "og_url": "",\ "image_url": "",\ "deadline": "",\ "hidden": false,\ "txHash": null,\ "resolutionTxHash": null,\ "priority_index": null\ },\ "positions": {\ "yes": {\ "cost": "75000000",\ "fillPrice": "750000",\ "realisedPnl": "0",\ "unrealizedPnl": "25000000",\ "marketValue": "100000000"\ },\ "no": {\ "cost": "25000000",\ "fillPrice": "250000",\ "realisedPnl": "0",\ "unrealizedPnl": "-5000000",\ "marketValue": "20000000"\ }\ },\ "tokensBalance": {},\ "orders": {},\ "latestTrade": {},\ "rewards": {}\ }\ ], "group": [\ {}\ ] } GET / portfolio / {account} / positions Try it Get All User Positions cURL curl --request GET \ --url https://api.limitless.exchange/portfolio/{account}/positions 200 { "rewards": { "todaysRewards": "50250000", "totalUnpaidRewards": "200750000", "totalUserRewardsLastEpoch": "150500000", "rewardsByEpoch": [\ {\ "epochId": 1,\ "timestamp": "2024-01-01T00:00:00.000Z",\ "totalRewards": "1500000",\ "userRewards": "150000",\ "earnedPercent": 0.1\ }\ ], "rewardsChartData": [\ {\ "timestamp": 1672531200000,\ "userRewards": "25000000",\ "totalRewards": "60000000"\ }\ ] }, "points": 123, "accumulativePoints": 456, "amm": [\ {\ "market": {},\ "outcomeIndex": 0,\ "collateralAmount": "100500000",\ "latestTrade": {},\ "outcomeTokenAmount": "50250000",\ "account": "0x1234567890123456789012345678901234567890"\ }\ ], "clob": [\ {\ "market": {\ "address": "",\ "title": "",\ "proxyTitle": null,\ "description": "",\ "question_id": {},\ "condition_id": {},\ "position_ids": [\ ""\ ],\ "outcome_slot_count": 2,\ "winning_index": 0.5,\ "payout_numerators": [\ ""\ ],\ "status": "",\ "og_url": "",\ "image_url": "",\ "deadline": "",\ "hidden": false,\ "txHash": null,\ "resolutionTxHash": null,\ "priority_index": null\ },\ "positions": {\ "yes": {\ "cost": "75000000",\ "fillPrice": "750000",\ "realisedPnl": "0",\ "unrealizedPnl": "25000000",\ "marketValue": "100000000"\ },\ "no": {\ "cost": "25000000",\ "fillPrice": "250000",\ "realisedPnl": "0",\ "unrealizedPnl": "-5000000",\ "marketValue": "20000000"\ }\ },\ "tokensBalance": {},\ "orders": {},\ "latestTrade": {},\ "rewards": {}\ }\ ], "group": [\ {}\ ] } `status: RESOLVED` and `winningOutcomeIndex` indicate that the winning outcome is known in the API response. They do **not** guarantee that the underlying conditional token payout has already been settled on-chain or that the position is immediately redeemable. See [Programmatic API - Lifecycle after a trade](https://docs.limitless.exchange/developers/programmatic-api#lifecycle-after-a-trade) . #### Path Parameters [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#parameter-account) account string required User Ethereum address Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` #### Response 200 - application/json Complete list of user positions [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-rewards) rewards object required Rewards information for the portfolio Show child attributes [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-points) points number required User points Example: `123` [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-accumulative-points) accumulativePoints number required User accumulative points Example: `456` [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-amm) amm object\[\] required List of AMM positions Show child attributes [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-clob) clob object\[\] required List of CLOB positions Show child attributes [​](https://docs.limitless.exchange/api-reference/public-portfolio/positions#response-group) group object\[\] Grouped CLOB positions (if enabled) [Get User Traded Volume](https://docs.limitless.exchange/api-reference/public-portfolio/traded-volume) [Get PnL Chart (Public)](https://docs.limitless.exchange/api-reference/public-portfolio/pnl-chart) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Locked Balance - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/locked-balance#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get Locked Balance [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get Locked Balance cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/locked-balance 200 { "lockedBalance": "250.50", "lockedBalanceFormatted": "250.50 USDC", "currency": "USDC", "orderCount": 3 } GET / markets / {slug} / locked-balance Try it Get Locked Balance cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/locked-balance 200 { "lockedBalance": "250.50", "lockedBalanceFormatted": "250.50 USDC", "currency": "USDC", "orderCount": 3 } #### Path Parameters #### Response 200 - application/json User's locked balance details [​](https://docs.limitless.exchange/api-reference/trading/locked-balance#response-locked-balance) lockedBalance string Example: `"250.50"` [​](https://docs.limitless.exchange/api-reference/trading/locked-balance#response-locked-balance-formatted) lockedBalanceFormatted string Example: `"250.50 USDC"` [​](https://docs.limitless.exchange/api-reference/trading/locked-balance#response-currency) currency string Example: `"USDC"` [​](https://docs.limitless.exchange/api-reference/trading/locked-balance#response-order-count) orderCount number Example: `3` [Get Historical Prices](https://docs.limitless.exchange/api-reference/trading/historical-price) [Get User Orders](https://docs.limitless.exchange/api-reference/trading/user-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Cancel All Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/cancel-all#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Cancel All Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Cancel all of a user's orders in a specific market cURL curl --request DELETE \ --url https://api.limitless.exchange/orders/all/{slug} \ --header 'X-API-Key: ' 200 207 400 401 { "message": "Orders canceled successfully", "canceled": [\ "611badac-8dfc-48a0-b09e-59654adea1c5"\ ], "failed": [\ {\ "orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",\ "reason": "ORDER_NOT_FOUND",\ "message": "Order not found or already canceled"\ }\ ] } DELETE / orders / all / {slug} Try it Cancel all of a user's orders in a specific market cURL curl --request DELETE \ --url https://api.limitless.exchange/orders/all/{slug} \ --header 'X-API-Key: ' 200 207 400 401 { "message": "Orders canceled successfully", "canceled": [\ "611badac-8dfc-48a0-b09e-59654adea1c5"\ ], "failed": [\ {\ "orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",\ "reason": "ORDER_NOT_FOUND",\ "message": "Order not found or already canceled"\ }\ ] } #### Authorizations [​](https://docs.limitless.exchange/api-reference/trading/cancel-all#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Response 200 application/json All orders successfully cancelled [​](https://docs.limitless.exchange/api-reference/trading/cancel-all#response-message) message string required Confirmation message for cancelling all orders Example: `"Orders canceled successfully"` [​](https://docs.limitless.exchange/api-reference/trading/cancel-all#response-canceled) canceled string\[\] Array of successfully cancelled order IDs Example: ["611badac-8dfc-48a0-b09e-59654adea1c5"] [​](https://docs.limitless.exchange/api-reference/trading/cancel-all#response-failed) failed object\[\] Array of orders that failed to cancel with reasons Show child attributes [Cancel Orders (Batch)](https://docs.limitless.exchange/api-reference/trading/cancel-batch) [Get Orderbook](https://docs.limitless.exchange/api-reference/trading/orderbook) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Orderbook - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/orderbook#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get Orderbook [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get Orderbook cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/orderbook 200 { "adjustedMidpoint": 0.75, "asks": [\ {\ "price": 0.76,\ "size": 100\ }\ ], "bids": [\ {\ "price": 0.74,\ "size": 150\ }\ ], "lastTradePrice": 0.75, "maxSpread": 0.05, "minSize": 1, "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627" } GET / markets / {slug} / orderbook Try it Get Orderbook cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/orderbook 200 { "adjustedMidpoint": 0.75, "asks": [\ {\ "price": 0.76,\ "size": 100\ }\ ], "bids": [\ {\ "price": 0.74,\ "size": 150\ }\ ], "lastTradePrice": 0.75, "maxSpread": 0.05, "minSize": 1, "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627" } For real-time orderbook updates, use the [WebSocket API](https://docs.limitless.exchange/developers/websocket-events) instead of polling this endpoint. Subscribe to `subscribe_market_prices` with `marketSlugs`. #### Path Parameters #### Response 200 application/json Current orderbook with bids and asks [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-adjusted-midpoint) adjustedMidpoint number Example: `0.75` [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-asks) asks object\[\] Show child attributes [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-bids) bids object\[\] Show child attributes [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-last-trade-price) lastTradePrice number Example: `0.75` [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-max-spread) maxSpread number Example: `0.05` [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-min-size) minSize number Example: `1` [​](https://docs.limitless.exchange/api-reference/trading/orderbook#response-token-id) tokenId string Example: `"19633204485790857949828516737993423758628930235371629943999544859324645414627"` [Cancel All Orders](https://docs.limitless.exchange/api-reference/trading/cancel-all) [Get Historical Prices](https://docs.limitless.exchange/api-reference/trading/historical-price) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create Order - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/create-order#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Create Order [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Create Order cURL curl --request POST \ --url https://api.limitless.exchange/orders \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "order": { "salt": 1234567890, "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627", "makerAmount": 5000000, "takerAmount": 10000000, "feeRateBps": 0, "side": 0, "taker": "0x0000000000000000000000000000000000000000", "expiration": "2025-04-30T23:59:59Z", "nonce": 42, "price": 0.75, "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901", "signatureType": 2 }, "ownerId": 12345, "orderType": "GTC", "marketSlug": "biden-vs-trump-2024", "clientOrderId": "client-order-001", "onBehalfOf": 12345 } ' 201 400 { "order": { "salt": 1234567890, "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627", "makerAmount": 5000000, "takerAmount": 10000000, "feeRateBps": 0, "side": 0, "taker": "0x0000000000000000000000000000000000000000", "expiration": "2025-04-30T23:59:59Z", "nonce": 42, "price": 0.75, "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901", "signatureType": 2 }, "execution": { "matched": true, "settlementStatus": "MINED", "feeRateBps": 25, "effectiveFeeBps": 26, "totalsRaw": { "contractsGross": "1000000", "contractsFee": "1000", "contractsNet": "999000", "usdGross": "500000", "usdFee": "500", "usdNet": "499500" }, "tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1", "txHash": "0xabc123", "clientOrderId": "client-order-001" }, "makerMatches": [\ {}\ ] } POST / orders Try it Create Order cURL curl --request POST \ --url https://api.limitless.exchange/orders \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "order": { "salt": 1234567890, "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627", "makerAmount": 5000000, "takerAmount": 10000000, "feeRateBps": 0, "side": 0, "taker": "0x0000000000000000000000000000000000000000", "expiration": "2025-04-30T23:59:59Z", "nonce": 42, "price": 0.75, "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901", "signatureType": 2 }, "ownerId": 12345, "orderType": "GTC", "marketSlug": "biden-vs-trump-2024", "clientOrderId": "client-order-001", "onBehalfOf": 12345 } ' 201 400 { "order": { "salt": 1234567890, "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627", "makerAmount": 5000000, "takerAmount": 10000000, "feeRateBps": 0, "side": 0, "taker": "0x0000000000000000000000000000000000000000", "expiration": "2025-04-30T23:59:59Z", "nonce": 42, "price": 0.75, "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901", "signatureType": 2 }, "execution": { "matched": true, "settlementStatus": "MINED", "feeRateBps": 25, "effectiveFeeBps": 26, "totalsRaw": { "contractsGross": "1000000", "contractsFee": "1000", "contractsNet": "999000", "usdGross": "500000", "usdFee": "500", "usdNet": "499500" }, "tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1", "txHash": "0xabc123", "clientOrderId": "client-order-001" }, "makerMatches": [\ {}\ ] } Before creating orders: 1. Fetch market data via [Get Market Details](https://docs.limitless.exchange/api-reference/markets/get-market) to get venue and token IDs 2. Sign the order using [EIP-712](https://docs.limitless.exchange/developers/eip712-signing) with `venue.exchange` as `verifyingContract` 3. Ensure you have [token approvals](https://docs.limitless.exchange/developers/venue-system#required-token-approvals) set up ### [​](https://docs.limitless.exchange/api-reference/trading/create-order#optional-fields) Optional Fields | Field | Type | Description | | --- | --- | --- | | `clientOrderId` | `string` | Idempotency key (max 128 chars). If a duplicate is submitted, the server returns `409 Conflict`. | | `onBehalfOf` | `number` | Profile ID of the sub-account to place the order for. Requires a [scoped API token](https://docs.limitless.exchange/developers/authentication#scoped-api-tokens-hmac)
with `trading` scope and a partner relationship with the target profile. The `maker` and `signer` in the order must match the sub-account’s wallet address. | | `postOnly` | `boolean` | GTC orders only. When `true`, the order is rejected if it would immediately match. Guarantees the order rests on the book as a maker order. Default `false`. | **Where does `ownerId` come from?** It is the `id` field returned by [`GET /profiles/{address}`](https://docs.limitless.exchange/api-reference/portfolio/get-profile) . For partner sub-accounts, it is the `profileId` returned by [`POST /profiles/partner-accounts`](https://docs.limitless.exchange/api-reference/partner-accounts/create-partner-account) . **`ownerId` must match the profile that owns the order** (see [Programmatic API — EOA flow](https://docs.limitless.exchange/developers/programmatic-api#eoa-web3-partners) ): * **Partner EOA + signed order + `onBehalfOf`:** set both `onBehalfOf` and `ownerId` to the **sub-account’s** `profileId`. `order.maker` and `order.signer` must match that sub-account’s wallet. A mismatched `ownerId` returns `400` — `"Profile ID does not match the order owner"`. * **Delegated signing** (unsigned `order`, `delegated_signing` scope, server wallet sub-account): the server fills in `ownerId` when it signs — omit the client signature per [Delegated Signing](https://docs.limitless.exchange/api-reference/trading/create-order#delegated-signing) below. * **Trading as yourself** (no `onBehalfOf`): `ownerId` is your own profile id (the SDK often fills this after fetching your profile). ### [​](https://docs.limitless.exchange/api-reference/trading/create-order#delegated-signing) Delegated Signing Partners with the `delegated_signing` scope can omit `signature` and `signatureType` from the order object. The server signs the order using a Privy server wallet linked to the target sub-account and sets `maker`/`signer` to the server wallet address. See [Authentication](https://docs.limitless.exchange/developers/authentication#delegated-signing) for details. ### [​](https://docs.limitless.exchange/api-reference/trading/create-order#execution-response) Execution Response The response includes an `execution` object with settlement details: | Field | Type | Description | | --- | --- | --- | | `matched` | `boolean` | Whether the order was matched immediately | | `settlementStatus` | `string` | `UNMATCHED`, `MATCHED`, `MINED`, `CONFIRMED`, `RETRYING`, or `FAILED` | | `tradeEventId` | `string` | Trade event ID (present when matched) | | `txHash` | `string` | On-chain transaction hash (present when mined) | | `feeRateBps` | `number` | Fee rate in basis points | | `effectiveFeeBps` | `number` | Effective fee rate after rebates | | `totalsRaw` | `object` | Raw execution totals (`contractsGross`, `contractsFee`, `contractsNet`, `usdGross`, `usdFee`, `usdNet`) | #### Authorizations [​](https://docs.limitless.exchange/api-reference/trading/create-order#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Body application/json Order creation data including signature and order parameters [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-order) order object required Order details including signature and amounts Show child attributes [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-owner-id) ownerId number required Profile ID of the order owner Example: `12345` [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-order-type) orderType enum required Order type (GTC=Good Till Cancelled, FOK=Fill Or Kill) Available options: `FOK`, `GTC` Example: `"GTC"` [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-market-slug) marketSlug string required Market identifier slug Example: `"biden-vs-trump-2024"` [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-client-order-id) clientOrderId string Client-provided idempotency key for order placement. If a duplicate is submitted, the server returns 409 Conflict. Maximum string length: `128` Example: `"client-order-001"` [​](https://docs.limitless.exchange/api-reference/trading/create-order#body-on-behalf-of) onBehalfOf number Profile ID to place order on behalf of (partner flow). Requires an API token with trading scope and a partner relationship with the target profile. Example: `12345` #### Response 201 application/json Order successfully created and matched [​](https://docs.limitless.exchange/api-reference/trading/create-order#response-order) order object required Order details including slim market and owner Show child attributes [​](https://docs.limitless.exchange/api-reference/trading/create-order#response-execution) execution object required Execution and settlement summary Show child attributes [​](https://docs.limitless.exchange/api-reference/trading/create-order#response-maker-matches) makerMatches object\[\] Maker matches if order was matched immediately [Search Markets](https://docs.limitless.exchange/api-reference/markets/search) [Get Order Status (Batch)](https://docs.limitless.exchange/api-reference/trading/order-status-batch) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get User Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/user-orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get User Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) User Orders cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/user-orders 200 { "orders": [\ {\ "id": "12345",\ "side": "BUY",\ "price": "0.75",\ "quantity": "100",\ "status": "LIVE"\ }\ ] } GET / markets / {slug} / user-orders Try it User Orders cURL curl --request GET \ --url https://api.limitless.exchange/markets/{slug}/user-orders 200 { "orders": [\ {\ "id": "12345",\ "side": "BUY",\ "price": "0.75",\ "quantity": "100",\ "status": "LIVE"\ }\ ] } #### Path Parameters #### Query Parameters [​](https://docs.limitless.exchange/api-reference/trading/user-orders#parameter-statuses) statuses enum\[\] Order status(es) to filter by. Defaults to \[LIVE\] if not provided Available options: `LIVE`, `MATCHED` [​](https://docs.limitless.exchange/api-reference/trading/user-orders#parameter-limit) limit number Maximum number of orders to return Required range: `x >= 1` Example: `100` #### Response 200 - application/json List of user orders for the market [​](https://docs.limitless.exchange/api-reference/trading/user-orders#response-orders) orders object\[\] Show child attributes [Get Locked Balance](https://docs.limitless.exchange/api-reference/trading/locked-balance) [Get Market Events](https://docs.limitless.exchange/api-reference/trading/market-events) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Redeem Resolved Positions - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/portfolio/redeem#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Portfolio Redeem Resolved Positions [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Request body](https://docs.limitless.exchange/api-reference/portfolio/redeem#request-body) * [Example (HMAC)](https://docs.limitless.exchange/api-reference/portfolio/redeem#example-hmac) * [Notes](https://docs.limitless.exchange/api-reference/portfolio/redeem#notes) As of SDK v1.0.6, all three SDKs (TypeScript, Python, Go) include helper methods for this endpoint. Redeems winning conditional-token positions for a resolved market from a server-wallet sub-account. * Route: `POST /portfolio/redeem` * Auth: `apiToken`, Privy, or session auth * Scope: `trading` when using `apiToken` ### [​](https://docs.limitless.exchange/api-reference/portfolio/redeem#request-body) Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `conditionId` | `string` | Yes | CTF condition id (`bytes32` hex string). | | `onBehalfOf` | `number` | No | Managed sub-account profile id (partner flow). Must be a child of the authenticated partner profile. | ### [​](https://docs.limitless.exchange/api-reference/portfolio/redeem#example-hmac) Example (HMAC) curl -X POST "https://api.limitless.exchange/portfolio/redeem" \ -H "content-type: application/json" \ -H "lmts-api-key: " \ -H "lmts-signature: " \ -H "lmts-timestamp: " \ -d '{ "conditionId": "0xa0ba8fd0acc2b86585734c07eb3bef4133f584d5abde78a558a6b8bfc3bbdec0", "onBehalfOf": 12345 }' ### [​](https://docs.limitless.exchange/api-reference/portfolio/redeem#notes) Notes * Market must be resolved and the position must have redeemable balance. * API-level resolved status can appear before CTF settlement; on-chain payout must be posted before redemption succeeds. * Legacy API keys are not supported on server-wallet operations. [Get Positions](https://docs.limitless.exchange/api-reference/portfolio/positions) [Withdraw From Server Wallet](https://docs.limitless.exchange/api-reference/portfolio/withdraw) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # For Developers - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/introduction#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Getting Started For Developers [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Choose your path](https://docs.limitless.exchange/developers/introduction#choose-your-path) * [Trading for yourself](https://docs.limitless.exchange/developers/introduction#trading-for-yourself) * [How it works](https://docs.limitless.exchange/developers/introduction#how-it-works) * [Get started](https://docs.limitless.exchange/developers/introduction#get-started) * [Building a platform](https://docs.limitless.exchange/developers/introduction#building-a-platform) * [What you get](https://docs.limitless.exchange/developers/introduction#what-you-get) * [Get started](https://docs.limitless.exchange/developers/introduction#get-started-2) * [Official SDKs](https://docs.limitless.exchange/developers/introduction#official-sdks) * [Additional resources](https://docs.limitless.exchange/developers/introduction#additional-resources) Build on Limitless with **REST** and **WebSocket** APIs for programmatic trading, market data, and portfolio management. **Base URL:** `https://api.limitless.exchange` **Interactive API Docs (Scalar):** `https://api.limitless.exchange/api-v1` **WebSocket URL:** `wss://ws.limitless.exchange` The `/api-v1` path serves the interactive Scalar API documentation. For actual API calls, use the base URL directly (e.g., `GET https://api.limitless.exchange/markets/active`). [​](https://docs.limitless.exchange/developers/introduction#choose-your-path) Choose your path ------------------------------------------------------------------------------------------------- Individual Trader / Bot ----------------------- You want to trade on Limitless programmatically — placing orders with your own wallet via a bot, script, or agent. **You do not need to apply for anything.** Get an API key from the UI and start trading. Platform / Partner ------------------ You are building a product where **other users** trade through your platform. You need sub-accounts, delegated signing, or managed wallets. **Requires a partner application.** * * * [​](https://docs.limitless.exchange/developers/introduction#trading-for-yourself) Trading for yourself --------------------------------------------------------------------------------------------------------- If you are an individual trader, bot operator, or agent builder, this is your path. You trade with your own wallet and sign your own orders. ### [​](https://docs.limitless.exchange/developers/introduction#how-it-works) How it works 1 [](https://docs.limitless.exchange/developers/introduction#) Get an API key Generate an API key from the [Limitless Exchange UI](https://limitless.exchange/) → profile menu → Api keys. Use it as the `X-API-Key` header on all requests. 2 [](https://docs.limitless.exchange/developers/introduction#) Fetch market data `GET /markets/:slug` returns market info including **venue contract addresses** (fetch once per market and cache). 3 [](https://docs.limitless.exchange/developers/introduction#) Build and sign orders Construct order payloads and sign with **EIP-712** using the venue’s exchange address as `verifyingContract`. 4 [](https://docs.limitless.exchange/developers/introduction#) Submit orders `POST /orders` with your signed order, `ownerId` (your profile ID from `GET /profiles/{address}`), `orderType`, and `marketSlug`. ### [​](https://docs.limitless.exchange/developers/introduction#get-started) Get started Authentication -------------- API keys, scoped tokens, and how auth works. Python Quick Start ------------------ End-to-end trading in Python. Node.js Quick Start ------------------- TypeScript/Node.js integration with viem. EIP-712 Signing --------------- How to sign orders for the CLOB. * * * [​](https://docs.limitless.exchange/developers/introduction#building-a-platform) Building a platform ------------------------------------------------------------------------------------------------------- If you are a partner building a product where other users trade through your platform, this is your path. You manage sub-accounts on behalf of your users and optionally use delegated signing so your users never need to manage private keys. **You must apply for Programmatic API access** before you can create sub-accounts or use delegated signing. Individual trading with your own wallet does not require an application. ### [​](https://docs.limitless.exchange/developers/introduction#what-you-get) What you get | Capability | Description | | --- | --- | | **Scoped API tokens** | HMAC-SHA256 authenticated tokens with granular scopes (`trading`, `account_creation`, `delegated_signing`) | | **Partner sub-accounts** | Create and manage user profiles linked to your partner account | | **Delegated signing** | Submit orders without end users managing private keys — the server signs via a managed wallet | ### [​](https://docs.limitless.exchange/developers/introduction#get-started-2) Get started Programmatic API ---------------- Full guide: partner lifecycle, sub-accounts, delegated signing, and order types. Authentication (HMAC) --------------------- HMAC signing protocol for partner API tokens. Migrate from Polymarket ----------------------- Map Polymarket concepts to Limitless equivalents. API Reference ------------- Full endpoint documentation. * * * [​](https://docs.limitless.exchange/developers/introduction#official-sdks) Official SDKs ------------------------------------------------------------------------------------------- All SDKs support both individual trading and partner integrations. TypeScript SDK -------------- Type-safe client with signing and real-time streaming. Python SDK ---------- Async client for markets, orders, and partner features. Go SDK ------ Typed Go client for CLOB and NegRisk markets. [​](https://docs.limitless.exchange/developers/introduction#additional-resources) Additional resources --------------------------------------------------------------------------------------------------------- Venue System ------------ Contract addresses and token approvals. WebSocket API ------------- Real-time market and orderbook streaming. Java Quick Start ---------------- End-to-end trading in Java. [From Polymarket](https://docs.limitless.exchange/developers/migrate-from-polymarket) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # EIP-712 Order Signing - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/eip712-signing#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Getting Started EIP-712 Order Signing [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/eip712-signing#overview) * [EIP-712 Domain](https://docs.limitless.exchange/developers/eip712-signing#eip-712-domain) * [Order Type Definition](https://docs.limitless.exchange/developers/eip712-signing#order-type-definition) * [Field Reference](https://docs.limitless.exchange/developers/eip712-signing#field-reference) * [Order Types](https://docs.limitless.exchange/developers/eip712-signing#order-types) * [Amount Calculation](https://docs.limitless.exchange/developers/eip712-signing#amount-calculation) * [GTC (limit orders)](https://docs.limitless.exchange/developers/eip712-signing#gtc-limit-orders) * [FOK (market orders)](https://docs.limitless.exchange/developers/eip712-signing#fok-market-orders) [​](https://docs.limitless.exchange/developers/eip712-signing#overview) Overview ----------------------------------------------------------------------------------- All orders on Limitless are signed using **EIP-712 structured data**. The venue’s exchange address is used as the `verifyingContract` in the signing domain. If you’re using the [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) with delegated signing, the server handles EIP-712 signing for you via managed wallets. This page is for partners and traders who sign orders with their own private keys. [​](https://docs.limitless.exchange/developers/eip712-signing#eip-712-domain) EIP-712 Domain ----------------------------------------------------------------------------------------------- { "name": "Limitless CTF Exchange", "version": "1", "chainId": 8453, "verifyingContract": "" } The `verifyingContract` must be fetched from the market’s venue data via `GET /markets/:slug`. See [Venue System](https://docs.limitless.exchange/developers/venue-system) . [​](https://docs.limitless.exchange/developers/eip712-signing#order-type-definition) Order Type Definition ------------------------------------------------------------------------------------------------------------- { "Order": [\ { "name": "salt", "type": "uint256" },\ { "name": "maker", "type": "address" },\ { "name": "signer", "type": "address" },\ { "name": "taker", "type": "address" },\ { "name": "tokenId", "type": "uint256" },\ { "name": "makerAmount", "type": "uint256" },\ { "name": "takerAmount", "type": "uint256" },\ { "name": "expiration", "type": "uint256" },\ { "name": "nonce", "type": "uint256" },\ { "name": "feeRateBps", "type": "uint256" },\ { "name": "side", "type": "uint8" },\ { "name": "signatureType", "type": "uint8" }\ ] } [​](https://docs.limitless.exchange/developers/eip712-signing#field-reference) Field Reference ------------------------------------------------------------------------------------------------- | Field | Type | Description | | --- | --- | --- | | `salt` | uint256 | Unique order identifier (typically timestamp-based) | | `maker` | address | Checksummed address of the order creator | | `signer` | address | Same as maker for EOA wallets | | `taker` | address | `0x000...000` for open orders (any taker) | | `tokenId` | uint256 | Position ID — YES or NO token from market data | | `makerAmount` | uint256 | Amount the maker offers, scaled by 1e6 (see [Amount Calculation](https://docs.limitless.exchange/developers/eip712-signing#amount-calculation)
) | | `takerAmount` | uint256 | Amount the maker wants in return, scaled by 1e6 (always `1` for FOK orders) | | `expiration` | uint256 | `0` for no expiration | | `nonce` | uint256 | Order nonce | | `feeRateBps` | uint256 | Fee rate in basis points | | `side` | uint8 | `0` = BUY, `1` = SELL | | `signatureType` | uint8 | `0` = EOA signature | [​](https://docs.limitless.exchange/developers/eip712-signing#order-types) Order Types ----------------------------------------------------------------------------------------- | Type | Description | | --- | --- | | **GTC** (Good Till Cancelled) | Remains active until filled or cancelled | | **FOK** (Fill or Kill) | Must fill completely or be cancelled | [​](https://docs.limitless.exchange/developers/eip712-signing#amount-calculation) Amount Calculation ------------------------------------------------------------------------------------------------------- USDC has **6 decimals** (1 USDC = 1,000,000 units). Shares are also scaled by **1e6**. ### [​](https://docs.limitless.exchange/developers/eip712-signing#gtc-limit-orders) GTC (limit orders) | Side | `makerAmount` | `takerAmount` | | --- | --- | --- | | **BUY** | `price * size * 1e6` (USDC to spend) | `size * 1e6` (shares to receive) | | **SELL** | `size * 1e6` (shares to sell) | `price * size * 1e6` (USDC to receive) | // BUY 10 shares at $0.50 makerAmount = 0.50 * 10 * 1e6 = 5,000,000 takerAmount = 10 * 1e6 = 10,000,000 // SELL 10 shares at $0.50 makerAmount = 10 * 1e6 = 10,000,000 takerAmount = 0.50 * 10 * 1e6 = 5,000,000 ### [​](https://docs.limitless.exchange/developers/eip712-signing#fok-market-orders) FOK (market orders) | Side | `makerAmount` | `takerAmount` | | --- | --- | --- | | **BUY** | `usdcToSpend * 1e6` | `1` (constant) | | **SELL** | `sharesToSell * 1e6` | `1` (constant) | FOK orders always set `takerAmount = 1` and omit `price`. The `makerAmount` represents the raw amount being offered. The SDKs handle amount scaling automatically — you pass human-readable values (`price`, `size`, or `makerAmount`) and the builder calculates the scaled on-chain amounts. [Venue System](https://docs.limitless.exchange/developers/venue-system) [Python Quick Start](https://docs.limitless.exchange/developers/quickstart/python) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Order Status (Batch) - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/api-reference/trading/order-status-batch#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Trading Get Order Status (Batch) [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) Get order statuses in batch cURL curl --request POST \ --url https://api.limitless.exchange/orders/status/batch \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "items": [\ {\ "orderId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",\ "clientOrderId": "client-order-001"\ }\ ] } ' 200 { "results": [\ {\ "index": 0,\ "status": "found",\ "error": "Exactly one of orderId or clientOrderId is required",\ "orderId": "",\ "clientOrderId": "",\ "data": {\ "order": {\ "order": {\ "salt": 1234567890,\ "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",\ "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",\ "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",\ "makerAmount": 5000000,\ "takerAmount": 10000000,\ "feeRateBps": 0,\ "side": 0,\ "taker": "0x0000000000000000000000000000000000000000",\ "expiration": "2025-04-30T23:59:59Z",\ "nonce": 42,\ "price": 0.75,\ "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901",\ "signatureType": 2\ },\ "execution": {\ "matched": true,\ "settlementStatus": "MINED",\ "feeRateBps": 25,\ "effectiveFeeBps": 26,\ "totalsRaw": {\ "contractsGross": "1000000",\ "contractsFee": "1000",\ "contractsNet": "999000",\ "usdGross": "500000",\ "usdFee": "500",\ "usdNet": "499500"\ },\ "tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",\ "txHash": "0xabc123",\ "clientOrderId": "client-order-001"\ },\ "makerMatches": [\ {}\ ]\ },\ "makerMatches": [\ {}\ ],\ "execution": {\ "clientOrderId": "",\ "feeRateBps": 0,\ "effectiveFeeBps": 0,\ "matched": true,\ "settlementStatus": "UNMATCHED",\ "tradeEventId": "",\ "txHash": "",\ "totalsRaw": {\ "contractsGross": "",\ "contractsFee": "",\ "contractsNet": "",\ "usdGross": "",\ "usdFee": "",\ "usdNet": ""\ }\ }\ }\ }\ ] } POST / orders / status / batch Try it Get order statuses in batch cURL curl --request POST \ --url https://api.limitless.exchange/orders/status/batch \ --header 'Content-Type: application/json' \ --header 'X-API-Key: ' \ --data ' { "items": [\ {\ "orderId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",\ "clientOrderId": "client-order-001"\ }\ ] } ' 200 { "results": [\ {\ "index": 0,\ "status": "found",\ "error": "Exactly one of orderId or clientOrderId is required",\ "orderId": "",\ "clientOrderId": "",\ "data": {\ "order": {\ "order": {\ "salt": 1234567890,\ "maker": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",\ "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",\ "tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627",\ "makerAmount": 5000000,\ "takerAmount": 10000000,\ "feeRateBps": 0,\ "side": 0,\ "taker": "0x0000000000000000000000000000000000000000",\ "expiration": "2025-04-30T23:59:59Z",\ "nonce": 42,\ "price": 0.75,\ "signature": "0x123abc456def789ghi0123abc456def789ghi0123abc456def789ghi0123456789012345678901",\ "signatureType": 2\ },\ "execution": {\ "matched": true,\ "settlementStatus": "MINED",\ "feeRateBps": 25,\ "effectiveFeeBps": 26,\ "totalsRaw": {\ "contractsGross": "1000000",\ "contractsFee": "1000",\ "contractsNet": "999000",\ "usdGross": "500000",\ "usdFee": "500",\ "usdNet": "499500"\ },\ "tradeEventId": "4aa706dd-6c57-4f3c-945a-99818dfd95f1",\ "txHash": "0xabc123",\ "clientOrderId": "client-order-001"\ },\ "makerMatches": [\ {}\ ]\ },\ "makerMatches": [\ {}\ ],\ "execution": {\ "clientOrderId": "",\ "feeRateBps": 0,\ "effectiveFeeBps": 0,\ "matched": true,\ "settlementStatus": "UNMATCHED",\ "tradeEventId": "",\ "txHash": "",\ "totalsRaw": {\ "contractsGross": "",\ "contractsFee": "",\ "contractsNet": "",\ "usdGross": "",\ "usdFee": "",\ "usdNet": ""\ }\ }\ }\ }\ ] } Look up orders by either `orderId` (internal) or `clientOrderId` (your identifier). Provide exactly one per item — not both. #### Authorizations [​](https://docs.limitless.exchange/api-reference/trading/order-status-batch#authorization-x-api-key) X-API-Key string header required API key for programmatic access. Generate at limitless.exchange -> profile menu -> Api keys. #### Body application/json [​](https://docs.limitless.exchange/api-reference/trading/order-status-batch#body-items) items object\[\] required List of status lookup queries (1-50 items) Required array length: `1 - 50` elements Show child attributes #### Response 200 application/json Batch order statuses [​](https://docs.limitless.exchange/api-reference/trading/order-status-batch#response-results) results object\[\] required Array of status results corresponding to request items Show child attributes [Create Order](https://docs.limitless.exchange/api-reference/trading/create-order) [Cancel Order](https://docs.limitless.exchange/api-reference/trading/cancel-order) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Authentication - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/authentication#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Getting Started Authentication [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/authentication#overview) * [Scoped API Tokens (HMAC)](https://docs.limitless.exchange/developers/authentication#scoped-api-tokens-hmac) * [Scopes](https://docs.limitless.exchange/developers/authentication#scopes) * [HMAC Request Signing](https://docs.limitless.exchange/developers/authentication#hmac-request-signing) * [Getting a Scoped API Token](https://docs.limitless.exchange/developers/authentication#getting-a-scoped-api-token) * [Delegated Signing](https://docs.limitless.exchange/developers/authentication#delegated-signing) * [Checksummed Addresses](https://docs.limitless.exchange/developers/authentication#checksummed-addresses) * [Legacy API Keys](https://docs.limitless.exchange/developers/authentication#legacy-api-keys) [​](https://docs.limitless.exchange/developers/authentication#overview) Overview ----------------------------------------------------------------------------------- All programmatic access to the Limitless Exchange API requires authentication via **scoped API tokens** with HMAC-SHA256 request signing. API keys are **deprecated** and no longer available for new users. Existing API key users should migrate to scoped API tokens. See [Legacy API Keys](https://docs.limitless.exchange/developers/authentication#legacy-api-keys) below. [​](https://docs.limitless.exchange/developers/authentication#scoped-api-tokens-hmac) Scoped API Tokens (HMAC) ----------------------------------------------------------------------------------------------------------------- Scoped API tokens are the authentication method for the Limitless Exchange API. Every request is authenticated by signing it with HMAC-SHA256 using your token’s secret. Tokens are scoped to control what actions they can perform. ### [​](https://docs.limitless.exchange/developers/authentication#scopes) Scopes | Scope | Description | | --- | --- | | `trading` | Place and cancel orders. Required base scope for `delegated_signing`. | | `account_creation` | Create sub-account profiles under your partner account. | | `delegated_signing` | Server signs orders on behalf of sub-accounts (requires `trading` scope). Enables Web2 partners to submit orders without end users managing private keys. | | `withdrawal` | Withdraw ERC20 balances from managed server-wallet sub-accounts to partner-owned addresses. | ### [​](https://docs.limitless.exchange/developers/authentication#hmac-request-signing) HMAC Request Signing **Required headers:** | Header | Description | | --- | --- | | `lmts-api-key` | Your token ID (received at token creation) | | `lmts-timestamp` | ISO-8601 timestamp (must be within 30 seconds of server time) | | `lmts-signature` | Base64-encoded HMAC-SHA256 signature | SDK users should pass HMAC credentials to the SDK client (`hmacCredentials` / `hmac_credentials` / `WithHMACCredentials`) and let the SDK build these headers automatically. Manual header signing is only needed when you call the REST API directly. **Canonical message format:** {ISO-8601 timestamp}\n{HTTP METHOD}\n{request path with query string}\n{request body} The path component must include the **full request URL path and query string** (e.g., `/orders/all/btc-100k?onBehalfOf=42`), not just the pathname. For requests without a query string, use the plain path (e.g., `/orders`). For GET requests, the body component is an empty string. **Example (TypeScript):** import { createHmac } from 'crypto'; function signRequest( tokenId: string, secret: string, // base64-encoded, received at token creation method: string, path: string, body: string = '', ): Record { const timestamp = new Date().toISOString(); const message = `${timestamp}\n${method}\n${path}\n${body}`; const signature = createHmac('sha256', Buffer.from(secret, 'base64')) .update(message) .digest('base64'); return { 'lmts-api-key': tokenId, 'lmts-timestamp': timestamp, 'lmts-signature': signature, }; } // Usage const headers = signRequest(tokenId, secret, 'POST', '/orders', JSON.stringify(orderPayload)); const res = await fetch('https://api.limitless.exchange/orders', { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(orderPayload), }); **Example (Python):** import hmac, hashlib, base64 from datetime import datetime, timezone def sign_request(token_id: str, secret: str, method: str, path: str, body: str = "") -> dict: timestamp = datetime.now(timezone.utc).isoformat() message = f"{timestamp}\n{method}\n{path}\n{body}" signature = base64.b64encode( hmac.new( base64.b64decode(secret), message.encode("utf-8"), hashlib.sha256, ).digest() ).decode("utf-8") return { "lmts-api-key": token_id, "lmts-timestamp": timestamp, "lmts-signature": signature, } ### [​](https://docs.limitless.exchange/developers/authentication#getting-a-scoped-api-token) Getting a Scoped API Token 1 [](https://docs.limitless.exchange/developers/authentication#) Log in to Limitless Exchange Go to [limitless.exchange](https://limitless.exchange/) and connect your wallet. 2 [](https://docs.limitless.exchange/developers/authentication#) Derive a token Derive a scoped token via `POST /auth/api-tokens/derive`. Pass the `token` field from the Privy authenticate response (not `privy_access_token`) in the `identity` header as `Bearer `. The response includes a `tokenId` and `secret`. This is a one-time setup — use the HMAC credentials for all subsequent requests. The `trading` scope is available to all users — no application required. For partner-level scopes (`account_creation`, `delegated_signing`), [apply for programmatic API access](https://docs.limitless.exchange/developers/programmatic-api) to get your account enabled. The token secret is returned **once** at creation time. Store it securely — it cannot be retrieved again. ### [​](https://docs.limitless.exchange/developers/authentication#delegated-signing) Delegated Signing With the `delegated_signing` scope, partners can submit orders **without** providing `signature` and `signatureType` in the order payload. The server signs the order using a Privy server wallet linked to the target sub-account. Use the `onBehalfOf` field in the order payload to specify which sub-account the order is for. The target profile must be linked to your partner account. [​](https://docs.limitless.exchange/developers/authentication#checksummed-addresses) Checksummed Addresses ------------------------------------------------------------------------------------------------------------- All Ethereum addresses in API requests must use **checksummed format** (EIP-55 mixed-case): * `x-account` header * `maker` and `signer` fields in orders **Example:** `0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed` Your private key is still required for **EIP-712 order signing** (unless using delegated signing), but the scoped token handles request authentication. [​](https://docs.limitless.exchange/developers/authentication#legacy-api-keys) Legacy API Keys ------------------------------------------------------------------------------------------------- API keys are **deprecated** and are no longer issued to new users. If you have an existing API key, it will continue to work, but we recommend migrating to scoped API tokens for improved security and access control. Existing API key users authenticate via the `X-API-Key` header: curl -H "X-API-Key: lmts_your_key_here" https://api.limitless.exchange/markets | Method | Headers | Use Case | | --- | --- | --- | | Scoped API Token (HMAC) | `lmts-api-key`, `lmts-timestamp`, `lmts-signature` | All new integrations — traders, bots, partners, delegated signing | | API Key (deprecated) | `X-API-Key: lmts_...` | Legacy users only — no longer issued | [From Polymarket](https://docs.limitless.exchange/developers/migrate-from-polymarket) [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Migrate from Polymarket - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/migrate-from-polymarket#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Getting Started Migrate from Polymarket [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [What changed](https://docs.limitless.exchange/developers/migrate-from-polymarket#what-changed) * [Authentication](https://docs.limitless.exchange/developers/migrate-from-polymarket#authentication) * [Endpoint mapping](https://docs.limitless.exchange/developers/migrate-from-polymarket#endpoint-mapping) * [Market data](https://docs.limitless.exchange/developers/migrate-from-polymarket#market-data) * [Trading](https://docs.limitless.exchange/developers/migrate-from-polymarket#trading) * [Portfolio](https://docs.limitless.exchange/developers/migrate-from-polymarket#portfolio) * [Fetch a market](https://docs.limitless.exchange/developers/migrate-from-polymarket#fetch-a-market) * [Build and sign an order](https://docs.limitless.exchange/developers/migrate-from-polymarket#build-and-sign-an-order) * [Porting a Polymarket agent](https://docs.limitless.exchange/developers/migrate-from-polymarket#porting-a-polymarket-agent) * [WebSocket](https://docs.limitless.exchange/developers/migrate-from-polymarket#websocket) * [Rate limits](https://docs.limitless.exchange/developers/migrate-from-polymarket#rate-limits) * [Quick reference for agents](https://docs.limitless.exchange/developers/migrate-from-polymarket#quick-reference-for-agents) * [Partner and platform migrations](https://docs.limitless.exchange/developers/migrate-from-polymarket#partner-and-platform-migrations) * [Next steps](https://docs.limitless.exchange/developers/migrate-from-polymarket#next-steps) If you’ve built bots or agents on Polymarket, this guide maps every concept, endpoint, and code pattern to the Limitless equivalents so you can port your code in minutes. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#what-changed) What changed ---------------------------------------------------------------------------------------------------- | | Polymarket | Limitless | | --- | --- | --- | | **Chain** | Polygon (137) | Base (8453) | | **Collateral** | USDC.e | USDC (6 decimals) | | **REST hosts** | `gamma-api.polymarket.com` (data) + `clob.polymarket.com` (trading) | `api.limitless.exchange` (unified) | | **WebSocket** | `wss://ws-subscriptions-clob.polymarket.com` | `wss://ws.limitless.exchange` | | **Auth model** | L1/L2 — derive API creds with EIP-712, sign every request with HMAC | API key (`X-API-Key`) for individual use; HMAC scoped tokens for [partner integrations](https://docs.limitless.exchange/developers/programmatic-api) | | **SDKs** | `py-clob-client`, `@polymarket/clob-client`, `polymarket-client-sdk` (Rust) | [Python SDK](https://docs.limitless.exchange/developers/sdk/python/getting-started)
, [TypeScript SDK](https://docs.limitless.exchange/developers/sdk/typescript/getting-started)
, [Go SDK](https://docs.limitless.exchange/developers/sdk/go/getting-started)
, or direct REST | | **Wallet types** | EOA, Proxy, Gnosis Safe | EOA, or server-managed wallets via [delegated signing](https://docs.limitless.exchange/developers/programmatic-api#delegated-order-types) | | **Market lookup** | `condition_id` or `clobTokenIds` | `slug` or address | | **Token IDs** | `clobTokenIds[0]` = Yes, `[1]` = No | `positionIds[0]` = Yes, `[1]` = No | | **Order signing** | EIP-712 `verifyingContract` = CTF Exchange | EIP-712 `verifyingContract` = `venue.exchange` | | **Neg-risk** | Pass `negRisk` flag when creating orders | Handled via [venue system](https://docs.limitless.exchange/developers/venue-system)
— extra approval to `venue.adapter` for SELL | [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#authentication) Authentication -------------------------------------------------------------------------------------------------------- Polymarket requires deriving API credentials (apiKey, secret, passphrase) through an L1 EIP-712 handshake, then signing every request with HMAC-SHA256 across 5 `POLY_*` headers. Limitless uses a single API key generated in the UI. * Polymarket * Limitless from py_clob_client.client import ClobClient client = ClobClient( "https://clob.polymarket.com", key=private_key, chain_id=137, ) creds = client.create_or_derive_api_creds() client = ClobClient( "https://clob.polymarket.com", key=private_key, chain_id=137, creds=creds, signature_type=0, funder=wallet_address, ) import requests API_BASE = "https://api.limitless.exchange" headers = { "X-API-Key": "lmts_your_key_here", "Content-Type": "application/json", } Generate your key at [limitless.exchange](https://limitless.exchange/) → profile → **Api keys**. No `POLY_*` headers or credential derivation for basic API access. For partner integrations that need sub-account management and delegated order signing, Limitless offers [HMAC-signed scoped tokens](https://docs.limitless.exchange/developers/programmatic-api) — but this is opt-in for partners, not required for individual trading. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#endpoint-mapping) Endpoint mapping ------------------------------------------------------------------------------------------------------------ ### [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#market-data) Market data | Action | Polymarket | Limitless | | --- | --- | --- | | List active markets | `GET gamma-api.polymarket.com/markets?active=true` | `GET /markets/active` | | Get market by slug | `GET gamma-api.polymarket.com/markets?slug=...` | `GET /markets/:slug` | | Search markets | `GET gamma-api.polymarket.com/markets?tag=...` | `GET /markets/search?query=...` | | Orderbook | `GET clob.polymarket.com/book?token_id=...` | `GET /markets/:slug/orderbook` | | Price history | `GET gamma-api.polymarket.com/markets/:id/prices-history` | `GET /markets/:slug/historical-price` | | Midpoint price | `GET clob.polymarket.com/midpoint?token_id=...` | Compute from orderbook response | ### [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#trading) Trading | Action | Polymarket | Limitless | | --- | --- | --- | | Place order | `POST clob.polymarket.com/order` | `POST /orders` | | Cancel order | `DELETE clob.polymarket.com/order/:id` | `DELETE /orders/:orderId` | | Cancel multiple | `DELETE clob.polymarket.com/cancel-orders` (up to 3000) | `POST /orders/cancel-batch` | | Cancel all | `DELETE clob.polymarket.com/cancel-all` | `DELETE /orders/all/:slug` | | Get open orders | `GET clob.polymarket.com/orders` | `GET /markets/:slug/user-orders` | | Get order by ID | `GET clob.polymarket.com/order/:id` | `POST /orders/status/batch` | ### [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#portfolio) Portfolio | Action | Polymarket | Limitless | | --- | --- | --- | | Get positions | `GET clob.polymarket.com/positions` | `GET /portfolio/positions` | | Get trades | `GET clob.polymarket.com/trades` | `GET /portfolio/trades` | | PnL chart | N/A | `GET /portfolio/pnl-chart` | | Trade history | `GET gamma-api.polymarket.com/activity` | `GET /portfolio/history` | [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#fetch-a-market) Fetch a market -------------------------------------------------------------------------------------------------------- * Polymarket * Limitless # Two separate APIs: Gamma for metadata, CLOB for trading market = requests.get( "https://gamma-api.polymarket.com/markets", params={"slug": "will-trump-win"} ).json()[0] token_id = market["clobTokenIds"][0] # Yes token condition_id = market["conditionId"] neg_risk = market["negRisk"] tick_size = market["minimum_tick_size"] market = requests.get( f"{API_BASE}/markets/will-trump-win", headers=headers, ).json() token_id = market["positionIds"][0] # Yes token venue = market["venue"] # exchange + adapter addresses No `conditionId`, `negRisk`, or `tickSize` needed in the order payload. The [venue system](https://docs.limitless.exchange/developers/venue-system) handles contract routing. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#build-and-sign-an-order) Build and sign an order -------------------------------------------------------------------------------------------------------------------------- The order structure is almost identical — both use EIP-712 typed data with the same field names. Key differences: | Field | Polymarket | Limitless | | --- | --- | --- | | `chainId` | `137` (Polygon) | `8453` (Base) | | `verifyingContract` | CTF Exchange address | `venue.exchange` from market data | | `name` (EIP-712 domain) | `"Polymarket CTF Exchange"` | `"Limitless CTF Exchange"` | | `tokenId` source | `clobTokenIds[0\|1]` | `positionIds[0\|1]` | * Polymarket * Limitless from py_clob_client.order_builder.constants import BUY order = client.create_and_post_order( OrderArgs( token_id=token_id, price=0.50, size=10, side=BUY, order_type=OrderType.GTC, ), options={"tick_size": "0.01", "neg_risk": False}, ) import time from eth_account import Account from eth_account.messages import encode_typed_data from web3 import Web3 account = Account.from_key(private_key) price, shares = 0.50, 10 maker_amount = int(price * shares * 1e6) taker_amount = int(shares * 1e6) order_data = { "salt": int(time.time() * 1000), "maker": Web3.to_checksum_address(account.address), "signer": Web3.to_checksum_address(account.address), "taker": "0x0000000000000000000000000000000000000000", "tokenId": token_id, "makerAmount": maker_amount, "takerAmount": taker_amount, "expiration": 0, "nonce": 0, "feeRateBps": 0, "side": 0, # 0=BUY, 1=SELL "signatureType": 0, # EOA } domain = { "name": "Limitless CTF Exchange", "version": "1", "chainId": 8453, "verifyingContract": Web3.to_checksum_address(venue["exchange"]), } types = { "EIP712Domain": [\ {"name": "name", "type": "string"},\ {"name": "version", "type": "string"},\ {"name": "chainId", "type": "uint256"},\ {"name": "verifyingContract", "type": "address"},\ ], "Order": [\ {"name": "salt", "type": "uint256"},\ {"name": "maker", "type": "address"},\ {"name": "signer", "type": "address"},\ {"name": "taker", "type": "address"},\ {"name": "tokenId", "type": "uint256"},\ {"name": "makerAmount", "type": "uint256"},\ {"name": "takerAmount", "type": "uint256"},\ {"name": "expiration", "type": "uint256"},\ {"name": "nonce", "type": "uint256"},\ {"name": "feeRateBps", "type": "uint256"},\ {"name": "side", "type": "uint8"},\ {"name": "signatureType", "type": "uint8"},\ ], } encoded = encode_typed_data({ "types": types, "primaryType": "Order", "domain": domain, "message": order_data, }) signed = Account.sign_message(encoded, private_key=private_key) signature = signed.signature.hex() resp = requests.post(f"{API_BASE}/orders", headers=headers, json={ "order": {**order_data, "signature": signature}, "ownerId": owner_id, "orderType": "GTC", "marketSlug": "will-trump-win", }) `ownerId` is your Limitless profile ID — a required field on every `POST /orders` request. You can find it in the Limitless UI or from your first authenticated API response. Polymarket’s SDK handles this internally; on Limitless you pass it explicitly. If you use the [Python SDK](https://docs.limitless.exchange/developers/sdk/python/getting-started) , [TypeScript SDK](https://docs.limitless.exchange/developers/sdk/typescript/getting-started) , or [Go SDK](https://docs.limitless.exchange/developers/sdk/go/getting-started) , order building and signing are handled for you — similar to how `py-clob-client` works on Polymarket. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#porting-a-polymarket-agent) Porting a Polymarket agent -------------------------------------------------------------------------------------------------------------------------------- If you’re adapting an agent built with the [Polymarket/agents](https://github.com/Polymarket/agents) framework, here’s a checklist: 1 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Swap credentials Replace `POLYGON_WALLET_PRIVATE_KEY` with your existing private key on Base. Add `API_KEY` with your `lmts_` key. Remove any HMAC credential derivation code. 2 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Update base URLs Replace both `gamma-api.polymarket.com` and `clob.polymarket.com` with `api.limitless.exchange`. 3 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Change chain ID Update `chainId` from `137` to `8453` in all EIP-712 domain definitions. 4 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Update EIP-712 domain name Change `"Polymarket CTF Exchange"` to `"Limitless CTF Exchange"`. 5 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Swap token ID fields Replace `clobTokenIds` lookups with `positionIds`. The index convention is the same: `[0]` = Yes, `[1]` = No. 6 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Use venue addresses Fetch `venue.exchange` from `GET /markets/:slug` and use it as `verifyingContract`. On Polymarket you may have hardcoded the CTF Exchange address — on Limitless each market can have its own venue. 7 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Remove Polymarket-specific params Drop `tick_size`, `neg_risk`, `funder`, and `signature_type` from order construction. These are either not needed or handled by the venue system. 8 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Add ownerId to order submissions `POST /orders` requires an `ownerId` field (your Limitless profile ID). Polymarket’s SDK handles this internally; on Limitless you pass it explicitly in every order payload alongside `order`, `orderType`, and `marketSlug`. 9 [](https://docs.limitless.exchange/developers/migrate-from-polymarket#) Update approvals Approve USDC on Base (not Polygon) to `venue.exchange`. For NegRisk SELL orders, also approve Conditional Tokens to `venue.adapter`. See [venue system](https://docs.limitless.exchange/developers/venue-system) . [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#websocket) WebSocket ---------------------------------------------------------------------------------------------- | | Polymarket | Limitless | | --- | --- | --- | | **URL** | `wss://ws-subscriptions-clob.polymarket.com/ws/...` | `wss://ws.limitless.exchange` | | **Namespace** | Channel-based (`market`, `user`) | Socket.IO namespace `/markets` | | **Auth** | API key in connection params | `X-API-Key` header during handshake | See [WebSocket events](https://docs.limitless.exchange/developers/websocket-events) for the full event reference. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#rate-limits) Rate limits -------------------------------------------------------------------------------------------------- | | Polymarket | Limitless | | --- | --- | --- | | Concurrent requests | Varies by builder tier | 2 | | Minimum delay | Varies | 300 ms between requests | [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#quick-reference-for-agents) Quick reference for agents -------------------------------------------------------------------------------------------------------------------------------- If you’re building an LLM-powered agent or bot, here’s the minimal flow: import os, time, requests from eth_account import Account from eth_account.messages import encode_typed_data from web3 import Web3 API = "https://api.limitless.exchange" KEY = os.environ["API_KEY"] # lmts_... PK = os.environ["PRIVATE_KEY"] # 0x... OWNER_ID = int(os.environ["OWNER_ID"]) # Profile ID from the Limitless UI H = {"X-API-Key": KEY, "Content-Type": "application/json"} CHAIN_ID = 8453 ZERO_ADDR = "0x0000000000000000000000000000000000000000" ORDER_TYPES = { "EIP712Domain": [\ {"name": "name", "type": "string"},\ {"name": "version", "type": "string"},\ {"name": "chainId", "type": "uint256"},\ {"name": "verifyingContract", "type": "address"},\ ], "Order": [\ {"name": "salt", "type": "uint256"},\ {"name": "maker", "type": "address"},\ {"name": "signer", "type": "address"},\ {"name": "taker", "type": "address"},\ {"name": "tokenId", "type": "uint256"},\ {"name": "makerAmount", "type": "uint256"},\ {"name": "takerAmount", "type": "uint256"},\ {"name": "expiration", "type": "uint256"},\ {"name": "nonce", "type": "uint256"},\ {"name": "feeRateBps", "type": "uint256"},\ {"name": "side", "type": "uint8"},\ {"name": "signatureType", "type": "uint8"},\ ], } # 1. Find a market markets = requests.get(f"{API}/markets/active", headers=H).json() slug = markets[0]["slug"] # 2. Get venue + token IDs (cache per market — these are static) market = requests.get(f"{API}/markets/{slug}", headers=H).json() venue_exchange = market["venue"]["exchange"] yes_token = market["positionIds"][0] # 3. Build order (BUY 10 YES shares at $0.50) acct = Account.from_key(PK) order = { "salt": int(time.time() * 1000), "maker": Web3.to_checksum_address(acct.address), "signer": Web3.to_checksum_address(acct.address), "taker": ZERO_ADDR, "tokenId": yes_token, "makerAmount": 5_000_000, # 0.50 * 10 * 1e6 "takerAmount": 10_000_000, # 10 * 1e6 "expiration": 0, "nonce": 0, "feeRateBps": 0, "side": 0, "signatureType": 0, } # 4. Sign (EIP-712) — same encode_typed_data pattern as Polymarket CTF encoded = encode_typed_data({ "types": ORDER_TYPES, "primaryType": "Order", "domain": { "name": "Limitless CTF Exchange", "version": "1", "chainId": CHAIN_ID, "verifyingContract": Web3.to_checksum_address(venue_exchange), }, "message": order, }) sig = Account.sign_message(encoded, private_key=PK).signature.hex() # 5. Submit resp = requests.post(f"{API}/orders", headers=H, json={ "order": {**order, "signature": sig}, "ownerId": OWNER_ID, "orderType": "GTC", "marketSlug": slug, }) print(resp.json()) [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#partner-and-platform-migrations) Partner and platform migrations ------------------------------------------------------------------------------------------------------------------------------------------ If you’re migrating a platform that manages multiple user accounts on Polymarket (e.g., a trading desk, social trading app, or embedded prediction market), the Limitless [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) provides a first-class partner flow: | Polymarket pattern | Limitless equivalent | | --- | --- | | Manage many wallets and private keys | Create sub-accounts with server-managed wallets — no private key management | | Sign orders per-user with their keys | [Delegated signing](https://docs.limitless.exchange/developers/programmatic-api#delegated-order-types)
— server signs via Privy, submit unsigned orders | | Derive HMAC creds per integration | Derive [scoped API tokens](https://docs.limitless.exchange/developers/authentication#scoped-api-tokens-hmac)
with granular permissions | **Recommended setup for partners:** * Store HMAC credentials on your backend — never expose them to frontends * Use the SDK server-side to sign partner-authenticated requests * Expose only your own app-specific endpoints to the frontend * Keep public market reads (orderbooks, prices) directly in the browser Both GTC (limit) and FOK (market) order types are supported for delegated orders. See the [Delegated Orders](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders) SDK pages for full examples. [​](https://docs.limitless.exchange/developers/migrate-from-polymarket#next-steps) Next steps ------------------------------------------------------------------------------------------------ Python quick start ------------------ Full end-to-end walkthrough with error handling. Venue system ------------ How venue contracts and token approvals work. Programmatic API ---------------- Partner integrations, sub-accounts, and delegated signing. API reference ------------- Complete endpoint documentation. EIP-712 signing --------------- Full order type definition and field reference. [For Developers](https://docs.limitless.exchange/developers/introduction) [Authentication](https://docs.limitless.exchange/developers/authentication) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Analytics - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/analytics#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Analytics [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Dune Dashboard](https://docs.limitless.exchange/user-guide/analytics#dune-dashboard) [​](https://docs.limitless.exchange/user-guide/analytics#dune-dashboard) Dune Dashboard ------------------------------------------------------------------------------------------ Explore the metrics on the Dune dashboard to understand the dynamics of our prediction markets and the growth of the ecosystem. Limitless Exchange on Dune -------------------------- View live analytics: volume, users, markets, and more. [Smart Contracts](https://docs.limitless.exchange/user-guide/smart-contracts) [Refund Policy](https://docs.limitless.exchange/user-guide/refund-policy) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # LP Rewards - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/lp-rewards#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Rewards & Fees LP Rewards [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/lp-rewards#overview) * [Methodology](https://docs.limitless.exchange/user-guide/lp-rewards#methodology) * [Rewards Parameters](https://docs.limitless.exchange/user-guide/lp-rewards#rewards-parameters) * [Bonus Multiplier](https://docs.limitless.exchange/user-guide/lp-rewards#bonus-multiplier) * [One-Sided Liquidity](https://docs.limitless.exchange/user-guide/lp-rewards#one-sided-liquidity) * [Note on Adjustments](https://docs.limitless.exchange/user-guide/lp-rewards#note-on-adjustments) [​](https://docs.limitless.exchange/user-guide/lp-rewards#overview) Overview ------------------------------------------------------------------------------- The LP Rewards program incentivizes providing liquidity by rewarding well-placed limit orders. These rewards promote tighter spreads, thicker order books, and a healthy marketplace. The design iterates on an industry-standard approach used by dYdX and Polymarket, with specifically tuned parameters to ensure competitiveness and fairness. [​](https://docs.limitless.exchange/user-guide/lp-rewards#methodology) Methodology ------------------------------------------------------------------------------------- * Rewards are earned by placing limit orders **within a specific spread from the market midpoint**\* * The **closer** an order is to the midpoint and the **more competitive** its size, the higher the reward * To qualify, orders must exceed the **minimum size threshold** set on a per-market basis * Rewards are calculated **every minute** across all markets and paid out daily at **12:00 UTC** \*To maintain a fair market-making experience, only limit orders that exceed the minimum shares threshold count toward the midpoint calculation. [​](https://docs.limitless.exchange/user-guide/lp-rewards#rewards-parameters) Rewards Parameters --------------------------------------------------------------------------------------------------- Each market has 3 parameters that define how rewards are paid out: | Parameter | Example | Description | | --- | --- | --- | | **Rewards** | $200 | Daily USDC rewards available for the market | | **Spread** | 3c | Maximum distance from midpoint to earn rewards | | **Min Shares** | 100 | Minimum order size to qualify | These parameters are set to support positive market activity while accounting for each market’s uniqueness. [​](https://docs.limitless.exchange/user-guide/lp-rewards#bonus-multiplier) Bonus Multiplier ----------------------------------------------------------------------------------------------- Limit orders placed **closer to the midpoint** earn additional rewards through a bonus multiplier. The tighter your spread, the greater your share of rewards. [​](https://docs.limitless.exchange/user-guide/lp-rewards#one-sided-liquidity) One-Sided Liquidity ----------------------------------------------------------------------------------------------------- To promote tail-end speculation, earning from one-sided liquidity is only allowed while the odds are between **5% - 95%**. This provides LPs with greater flexibility in managing their positions while still fostering a robust and efficient market structure. [​](https://docs.limitless.exchange/user-guide/lp-rewards#note-on-adjustments) Note on Adjustments ----------------------------------------------------------------------------------------------------- These parameters are dynamic and may be adjusted over time to meet the exchange’s needs and maintain a thriving marketplace. [Converting Shares](https://docs.limitless.exchange/user-guide/converting-shares) [Maker rebates](https://docs.limitless.exchange/user-guide/maker-rebates) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/market-orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation CLOB Market Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/market-orders#overview) * [How It Works](https://docs.limitless.exchange/user-guide/market-orders#how-it-works) * [When to Use Market Orders](https://docs.limitless.exchange/user-guide/market-orders#when-to-use-market-orders) [​](https://docs.limitless.exchange/user-guide/market-orders#overview) Overview ---------------------------------------------------------------------------------- Placing a market order is straightforward and ideal for quick trades. Simply choose the number of shares you wish to buy or sell, and the system matches your order to the best available price. ![Market order interface](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/market-order.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=3bba32daef470bbc41e929cb86d038d5) [​](https://docs.limitless.exchange/user-guide/market-orders#how-it-works) How It Works ------------------------------------------------------------------------------------------ 1. Select **Buy** or **Sell** 2. Choose the outcome — **Yes** or **No** 3. Enter the number of shares 4. Click **Trade** — your order is matched instantly Market orders are simple and efficient, especially for those seeking immediate execution. Market orders execute at the **best available price**, which may differ from the displayed price if the orderbook moves between when you view it and when your order is matched. [​](https://docs.limitless.exchange/user-guide/market-orders#when-to-use-market-orders) When to Use Market Orders -------------------------------------------------------------------------------------------------------------------- * You want **instant execution** * The market has tight spreads and good liquidity * You’re not sensitive to small price differences [CLOB Overview](https://docs.limitless.exchange/user-guide/clob-overview) [Limit Orders](https://docs.limitless.exchange/user-guide/limit-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # CLOB Overview - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/clob-overview#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation CLOB CLOB Overview [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/clob-overview#overview) * [The Orderbook](https://docs.limitless.exchange/user-guide/clob-overview#the-orderbook) * [Order Types](https://docs.limitless.exchange/user-guide/clob-overview#order-types) * [Advanced Features](https://docs.limitless.exchange/user-guide/clob-overview#advanced-features) [​](https://docs.limitless.exchange/user-guide/clob-overview#overview) Overview ---------------------------------------------------------------------------------- Interacting with Limitless’s order book is simple and familiar for both traders and market makers. Market orders provide instant execution at the best available price, while limit orders allow you to set your price, participate in price discovery, and earn rewards. [​](https://docs.limitless.exchange/user-guide/clob-overview#the-orderbook) The Orderbook -------------------------------------------------------------------------------------------- Each market has a **Yes** and **No** order book, with separate **Bids** (buy orders) and **Asks** (sell orders). ![Orderbook example](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/orderbook.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=1562978be4b0e5ad0880e3105d3718a7) For example, in a market about the BTC price: * Traders are offering to **sell** “Yes” shares at **51 cents** — this is the price you’d pay if you placed a Market Order to buy. * Traders are **bidding** 49 cents to **buy** “Yes” shares — the amount you’d receive if you placed a Market Order to sell. The difference between them is the **Spread** — the lower the better. [​](https://docs.limitless.exchange/user-guide/clob-overview#order-types) Order Types ---------------------------------------------------------------------------------------- | Type | Description | Best For | | --- | --- | --- | | [Market Order](https://docs.limitless.exchange/user-guide/market-orders) | Instant execution at best available price | Quick trades | | [Limit Order](https://docs.limitless.exchange/user-guide/limit-orders) | Set your own price | Price control, earning LP rewards | [​](https://docs.limitless.exchange/user-guide/clob-overview#advanced-features) Advanced Features ---------------------------------------------------------------------------------------------------- * **[Merge / Split shares](https://docs.limitless.exchange/user-guide/merge-split) ** — Convert between collateral and share pairs * **[Negrisk markets](https://docs.limitless.exchange/user-guide/negrisk-overview) ** — Category markets where only one outcome wins [Wallet Types](https://docs.limitless.exchange/user-guide/wallet-types) [Market Orders](https://docs.limitless.exchange/user-guide/market-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Negrisk / Category Markets - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/negrisk-overview#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Negrisk Markets Negrisk / Category Markets [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [What Are Negrisk Markets?](https://docs.limitless.exchange/user-guide/negrisk-overview#what-are-negrisk-markets) * [Capital Efficiency](https://docs.limitless.exchange/user-guide/negrisk-overview#capital-efficiency) * [Powering Financial Dashboards](https://docs.limitless.exchange/user-guide/negrisk-overview#powering-financial-dashboards) [​](https://docs.limitless.exchange/user-guide/negrisk-overview#what-are-negrisk-markets) What Are Negrisk Markets? ---------------------------------------------------------------------------------------------------------------------- Negrisk markets are a special kind of prediction market bundle where **only one outcome can win**. Think of them like a multiple-choice question — only one answer is correct. ![Negrisk category market](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/negrisk.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=b572dd1b52e86677cddda85a71eb4611) Each outcome has a Yes and No orderbook, but here’s the twist: **all the “No” contracts across the different outcomes are linked**. This setup lets traders interact with bundles of outcomes more efficiently and powers a unique feature: **[share conversion](https://docs.limitless.exchange/user-guide/converting-shares) **. [​](https://docs.limitless.exchange/user-guide/negrisk-overview#capital-efficiency) Capital Efficiency --------------------------------------------------------------------------------------------------------- Traditional markets require you to open separate positions for each outcome. With Negrisk, you can: * **Switch outcomes on the fly** by converting No → Yes * **Take broad positions** (e.g., “I think it’s _not_ A or B”) and refine later * **Unlock USDC** by converting extra No shares back into cash This boosts **capital efficiency** — you do more with fewer trades and less capital tied up. [​](https://docs.limitless.exchange/user-guide/negrisk-overview#powering-financial-dashboards) Powering Financial Dashboards ------------------------------------------------------------------------------------------------------------------------------- Negrisk markets unlock forward-looking data streams for real-world decisions: | Dashboard | Example | | --- | --- | | **Price Feeds** | ”According to Limitless, ETH will close the week at $2,150” | | **Interest Rate Forecasts** | ”Markets expect the Fed to cut rates in July by 0.25bps” | | **Funding Round Forecasts** | ”Anthropic’s post-money valuation will be $6.4B” | | **Portfolio Advice** | ”Your portfolio’s risk-adjusted future is RED. Reduce BTC exposure.” | These dashboards aren’t just informational — they’re **tradeable signals**. [Merging & Splitting Shares](https://docs.limitless.exchange/user-guide/merge-split) [Converting Shares](https://docs.limitless.exchange/user-guide/converting-shares) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Converting Shares - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/converting-shares#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Negrisk Markets Converting Shares [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Converting 1 “No” Share](https://docs.limitless.exchange/user-guide/converting-shares#converting-1-%E2%80%9Cno%E2%80%9D-share) * [Converting Multiple “No” Shares](https://docs.limitless.exchange/user-guide/converting-shares#converting-multiple-%E2%80%9Cno%E2%80%9D-shares) [​](https://docs.limitless.exchange/user-guide/converting-shares#converting-1-%E2%80%9Cno%E2%80%9D-share) Converting 1 “No” Share ------------------------------------------------------------------------------------------------------------------------------------ If you hold a **No share** in a Negrisk market (like “ETH is NOT $2,000 on Friday”), you can **convert it into 1 Yes share** of _all_ the other outcomes. Why? Because only one outcome can be true, so a No on one is logically equivalent to a bet _for_ the others. This lets you switch positions quickly and cheaply — without selling one share and buying another. ![Convert shares interface](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/convert.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=699b9b9bfc16a90cc1aa5d29c8d4b3f8) Access the **Convert** button from the portfolio tab in each market. [​](https://docs.limitless.exchange/user-guide/converting-shares#converting-multiple-%E2%80%9Cno%E2%80%9D-shares) Converting Multiple “No” Shares ---------------------------------------------------------------------------------------------------------------------------------------------------- If you hold **multiple No shares** and there aren’t enough remaining Yes shares to convert into, you can convert the extras into **USDC**. The combined value of “Event” and “Not Event” in a Negrisk market always adds up to $1. **Example:** If you hold 5 No shares in a 3-outcome market: * Convert 1 into a Yes of the remaining outcome * **Receive USDC for the second** ![Multi-share conversion](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/multi-convert.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=631b60744f9532b6cb5e8c1fce2d65fc) It’s built-in arbitrage that helps keep prices aligned — and it’s gas-efficient. [Negrisk / Category Markets](https://docs.limitless.exchange/user-guide/negrisk-overview) [LP Rewards](https://docs.limitless.exchange/user-guide/lp-rewards) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Making Your First Trade - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/making-your-first-trade#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Get Started Making Your First Trade [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Getting Started](https://docs.limitless.exchange/user-guide/making-your-first-trade#getting-started) * [What Happens at Resolution?](https://docs.limitless.exchange/user-guide/making-your-first-trade#what-happens-at-resolution) * [Next Steps](https://docs.limitless.exchange/user-guide/making-your-first-trade#next-steps) [​](https://docs.limitless.exchange/user-guide/making-your-first-trade#getting-started) Getting Started ---------------------------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/user-guide/making-your-first-trade#) Connect your wallet Visit [limitless.exchange](https://limitless.exchange/) and connect your wallet. Limitless supports wallets on the **Base** network. 2 [](https://docs.limitless.exchange/user-guide/making-your-first-trade#) Fund your account You’ll need **USDC on Base** to trade. Bridge or transfer USDC to your Base wallet address. 3 [](https://docs.limitless.exchange/user-guide/making-your-first-trade#) Pick a market Browse active markets — crypto prices, stocks, macro events, and more. Each market has a clear resolution condition and deadline. 4 [](https://docs.limitless.exchange/user-guide/making-your-first-trade#) Buy shares Choose “Yes” or “No” and enter the number of shares you want to buy. A **market order** fills instantly at the best available price. 5 [](https://docs.limitless.exchange/user-guide/making-your-first-trade#) Manage your position Track your positions in your portfolio. You can sell shares anytime before the market resolves, or hold until resolution. [​](https://docs.limitless.exchange/user-guide/making-your-first-trade#what-happens-at-resolution) What Happens at Resolution? --------------------------------------------------------------------------------------------------------------------------------- * **Winning shares** → pay out **$1.00** each * **Losing shares** → worthless ($0.00) Your profit is `$1.00 - purchase price` per winning share. [​](https://docs.limitless.exchange/user-guide/making-your-first-trade#next-steps) Next Steps ------------------------------------------------------------------------------------------------ Market Orders ------------- Learn about instant-execution market orders. Limit Orders ------------ Set your own price with limit orders. [What is Limitless?](https://docs.limitless.exchange/user-guide/what-is-limitless) [Wallet Types](https://docs.limitless.exchange/user-guide/wallet-types) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Limit Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/limit-orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation CLOB Limit Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/limit-orders#overview) * [How to Place a Limit Order](https://docs.limitless.exchange/user-guide/limit-orders#how-to-place-a-limit-order) * [Benefits](https://docs.limitless.exchange/user-guide/limit-orders#benefits) [​](https://docs.limitless.exchange/user-guide/limit-orders#overview) Overview --------------------------------------------------------------------------------- Limit orders let you set a specific price at which you’re willing to trade. This gives you more flexibility and control over your orders. ![Limit order interface](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/limit-order.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=aba4a8d31174c521be2ed9d7976a04ac) [​](https://docs.limitless.exchange/user-guide/limit-orders#how-to-place-a-limit-order) How to Place a Limit Order --------------------------------------------------------------------------------------------------------------------- 1. Decide whether you’re **buying** (bid) or **selling** (ask) 2. Specify your desired **price** 3. Enter the **number of shares** 4. Submit — the system adds your order to the order book, visible to other traders Orders closer to the current market price have a **higher chance of being filled**. [​](https://docs.limitless.exchange/user-guide/limit-orders#benefits) Benefits --------------------------------------------------------------------------------- * **Price control** — Trade at the exact price you want * **Spread management** — Help narrow the bid-ask spread * **LP rewards** — Earn rewards through the [LP Rewards program](https://docs.limitless.exchange/user-guide/lp-rewards) for providing liquidity Engaging with limit orders strategically can earn you rewards as part of the LP Rewards program, incentivizing tighter spreads and greater market depth. [Market Orders](https://docs.limitless.exchange/user-guide/market-orders) [Managing Orders](https://docs.limitless.exchange/user-guide/managing-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Resolution - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/market-resolution#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Market Resolution [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/market-resolution#overview) * [Resolution Process](https://docs.limitless.exchange/user-guide/market-resolution#resolution-process) * [Oracle Sources](https://docs.limitless.exchange/user-guide/market-resolution#oracle-sources) * [Resolution for Different Market Types](https://docs.limitless.exchange/user-guide/market-resolution#resolution-for-different-market-types) * [Standard (CLOB) Markets](https://docs.limitless.exchange/user-guide/market-resolution#standard-clob-markets) * [Negrisk (Category) Markets](https://docs.limitless.exchange/user-guide/market-resolution#negrisk-category-markets) * [Disputes and Misresolutions](https://docs.limitless.exchange/user-guide/market-resolution#disputes-and-misresolutions) [​](https://docs.limitless.exchange/user-guide/market-resolution#overview) Overview -------------------------------------------------------------------------------------- Every market on Limitless has a defined resolution condition and deadline. When the deadline passes, the market is resolved based on objective data from the designated oracle source. [​](https://docs.limitless.exchange/user-guide/market-resolution#resolution-process) Resolution Process ---------------------------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/user-guide/market-resolution#) Market deadline passes Each market has a specific deadline (e.g., “Feb 16, 17:00 UTC”). No new trades are accepted after this time. 2 [](https://docs.limitless.exchange/user-guide/market-resolution#) Oracle reports the outcome The designated oracle source provides the verified result. The majority of markets are now resolved automatically by **Pyth Network**. 3 [](https://docs.limitless.exchange/user-guide/market-resolution#) Team reviews (if needed) For manually resolved markets, the Limitless team reviews the outcome against the resolution criteria defined on the market page. Resolution typically occurs within **24–72 hours** of the market deadline, depending on event complexity and data availability. 4 [](https://docs.limitless.exchange/user-guide/market-resolution#) Winning shares pay out Winning shares (“Yes” or “No” depending on outcome) are redeemable for $1.00 each after the payout has been settled on-chain. Losing shares become worthless. [​](https://docs.limitless.exchange/user-guide/market-resolution#oracle-sources) Oracle Sources -------------------------------------------------------------------------------------------------- Market resolution and on-chain redemption readiness are related but not identical. A market can be shown as resolved in the API before the underlying payout is fully settled on-chain, so direct redemption attempts may need to wait until the payout data has been posted. The exact method of market resolution is normally determined on the market page. Always check the resolution source and criteria on the specific market before trading. The majority of markets are now resolved by **Pyth Network**. Other markets may use manual resolution by the Limitless team. | Oracle | Used For | Resolution Time | | --- | --- | --- | | **Pyth Network** | Majority of markets — crypto prices, stock prices, and other data feeds | Automatic at deadline | | **Manual** | Custom event markets (sports, politics, etc.) | Typically 24–72 hours after deadline | [​](https://docs.limitless.exchange/user-guide/market-resolution#resolution-for-different-market-types) Resolution for Different Market Types ------------------------------------------------------------------------------------------------------------------------------------------------ ### [​](https://docs.limitless.exchange/user-guide/market-resolution#standard-clob-markets) Standard (CLOB) Markets Binary Yes/No outcome. One side wins, the other loses. ### [​](https://docs.limitless.exchange/user-guide/market-resolution#negrisk-category-markets) Negrisk (Category) Markets Only one outcome in the group can win. All other outcomes resolve to “No”. See [Negrisk Markets](https://docs.limitless.exchange/user-guide/negrisk-overview) for details. [​](https://docs.limitless.exchange/user-guide/market-resolution#disputes-and-misresolutions) Disputes and Misresolutions ---------------------------------------------------------------------------------------------------------------------------- In cases of misresolved markets, the bet amount will be refunded. See the [Refund Policy](https://docs.limitless.exchange/user-guide/refund-policy) for details. If you believe a market was resolved incorrectly, contact the team through the **support channel** on [limitless.exchange](https://limitless.exchange/) (footer), via email at [hey@limitless.network](mailto:hey@limitless.network) , or on [Discord](https://discord.com/invite/yb4SscD8RZ) . [Fees](https://docs.limitless.exchange/user-guide/fees) [Smart Contracts](https://docs.limitless.exchange/user-guide/smart-contracts) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Merging & Splitting Shares - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/merge-split#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation CLOB Merging & Splitting Shares [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/merge-split#overview) * [Splitting](https://docs.limitless.exchange/user-guide/merge-split#splitting) * [Merging](https://docs.limitless.exchange/user-guide/merge-split#merging) * [Why Use Merge / Split?](https://docs.limitless.exchange/user-guide/merge-split#why-use-merge-%2F-split) [​](https://docs.limitless.exchange/user-guide/merge-split#overview) Overview -------------------------------------------------------------------------------- Prediction markets have two native mechanisms that don’t exist in traditional instruments: **Merging** and **Splitting** shares. ![Merge and split interface](https://mintcdn.com/limitless/gaXTVCMwDdFSClic/images/merge-split.png?w=2500&fit=max&auto=format&n=gaXTVCMwDdFSClic&q=85&s=722f0911da5b8d4311166bbc9adcc821) [​](https://docs.limitless.exchange/user-guide/merge-split#splitting) Splitting ---------------------------------------------------------------------------------- **Split $1** into **1 Yes share + 1 No share**. This is useful when you want to take a position on one side without buying from the orderbook — split collateral and sell the side you don’t want. [​](https://docs.limitless.exchange/user-guide/merge-split#merging) Merging ------------------------------------------------------------------------------ **Merge 1 Yes share + 1 No share** back into **$1** collateral. This lets you exit both sides of a position and recover your collateral without selling on the orderbook. [​](https://docs.limitless.exchange/user-guide/merge-split#why-use-merge-/-split) Why Use Merge / Split? ----------------------------------------------------------------------------------------------------------- * **Capital efficiency** — Open and close positions without relying on orderbook liquidity * **Better execution** — Avoid paying the spread * **Liquidity defragmentation** — Under the hood, this enables better orderbook matching across Yes/No assets Merge and split operations are available directly in the market UI. Look for the **Merge/Split** option on the market page. [Managing Orders](https://docs.limitless.exchange/user-guide/managing-orders) [Negrisk / Category Markets](https://docs.limitless.exchange/user-guide/negrisk-overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fees - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/fees#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Rewards & Fees Fees [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/fees#overview) * [Fee Structure by Market Type](https://docs.limitless.exchange/user-guide/fees#fee-structure-by-market-type) * [AMM Markets](https://docs.limitless.exchange/user-guide/fees#amm-markets) * [Order Book (CLOB) Markets](https://docs.limitless.exchange/user-guide/fees#order-book-clob-markets) * [Makers vs Takers](https://docs.limitless.exchange/user-guide/fees#makers-vs-takers) * [The Fee Curve](https://docs.limitless.exchange/user-guide/fees#the-fee-curve) * [Buy Fee Curve](https://docs.limitless.exchange/user-guide/fees#buy-fee-curve) * [Sell Fee Curve](https://docs.limitless.exchange/user-guide/fees#sell-fee-curve) * [Example: How Fees Play Out](https://docs.limitless.exchange/user-guide/fees#example-how-fees-play-out) * [Why This Fee Model Works](https://docs.limitless.exchange/user-guide/fees#why-this-fee-model-works) [​](https://docs.limitless.exchange/user-guide/fees#overview) Overview ------------------------------------------------------------------------- Fees on Limitless adapt to both the **market price** and your **trading experience**. The system is designed to reward early conviction, discourage manipulation, and give loyal traders significant discounts. [​](https://docs.limitless.exchange/user-guide/fees#fee-structure-by-market-type) Fee Structure by Market Type ----------------------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/user-guide/fees#amm-markets) AMM Markets A flat **0.40%** fee applies to all trades. No curves, no complexity. Certain promotional or specific markets may have a reduced or zero fee. ### [​](https://docs.limitless.exchange/user-guide/fees#order-book-clob-markets) Order Book (CLOB) Markets Fees are dynamic and adjust based on the current market price: | Side | Fee Range | Paid In | | --- | --- | --- | | **Buy** | 0.40% – 3.00% | Outcome tokens (contracts) | | **Sell** | 0.42% – 1.50% | Collateral (USDC) | [​](https://docs.limitless.exchange/user-guide/fees#makers-vs-takers) Makers vs Takers ----------------------------------------------------------------------------------------- **Fees only apply to takers** — orders that instantly settle against the orderbook. | Order Type | Fees? | Details | | --- | --- | --- | | **Limit orders (makers)** | No fees | Even though you sign a transaction with fee terms, you pay nothing if your order is placed in the book | | **Market orders (takers)** | Fees apply | Only orders that match immediately are charged | If you provide liquidity to the book, you can trade **completely fee-free**. [​](https://docs.limitless.exchange/user-guide/fees#the-fee-curve) The Fee Curve ----------------------------------------------------------------------------------- The fee curve adjusts dynamically based on where the market price is when you trade. ### [​](https://docs.limitless.exchange/user-guide/fees#buy-fee-curve) Buy Fee Curve Buy fees start at 3.00% for low-probability markets and decrease as probability increases: | Price | Buy Fee | | --- | --- | | $0.01 – $0.50 | 3.00% | | $0.55 | 2.52% | | $0.60 | 2.13% | | $0.65 | 1.80% | | $0.70 | 1.51% | | $0.75 | 1.26% | | $0.80 | 1.05% | | $0.85 | 0.85% | | $0.90 | 0.68% | | $0.95 | 0.53% | | $0.99 | 0.42% | | $0.999 | 0.40% | ### [​](https://docs.limitless.exchange/user-guide/fees#sell-fee-curve) Sell Fee Curve Sell fees peak at the midpoint ($0.50) and decrease toward the extremes: | Price | Sell Fee | | --- | --- | | $0.01 | 0.42% | | $0.05 | 0.60% | | $0.10 | 0.78% | | $0.20 | 1.11% | | $0.30 | 1.32% | | $0.40 | 1.44% | | $0.50 | **1.50%** (peak) | | $0.60 | 1.44% | | $0.70 | 1.32% | | $0.80 | 1.11% | | $0.90 | 0.78% | | $0.95 | 0.60% | | $0.99 | 0.45% | | $0.999 | 0.42% | By discouraging exits at the midpoint, the fee curve protects market integrity when uncertainty is highest. [​](https://docs.limitless.exchange/user-guide/fees#example-how-fees-play-out) Example: How Fees Play Out ------------------------------------------------------------------------------------------------------------ Imagine you’re buying **YES** shares in a market where the current probability is **40%** ($0.40): 1 [](https://docs.limitless.exchange/user-guide/fees#) You buy early at 40% Your buy fee = **3.00%**. You pay the full fee, but you’re getting in early with better payout odds. 2 [](https://docs.limitless.exchange/user-guide/fees#) Market moves to 70% If you sell when the market hits 70%, you pay a **1.32% sell fee** because you’re away from the 50/50 uncertainty zone. 3 [](https://docs.limitless.exchange/user-guide/fees#) Someone else buys at 70% They pay a **1.51% buy fee** — lower than yours, but they get worse odds since the price is already high. It’s all about conviction. Act early and stay smart — the system gives you the edge. [​](https://docs.limitless.exchange/user-guide/fees#why-this-fee-model-works) Why This Fee Model Works --------------------------------------------------------------------------------------------------------- The fee structure is inspired by proven models (including Polymarket and Kalshi) and is designed to: * **Reward early traders** for taking risk * **Discourage flip-flopping** and short-term manipulation * **Incentivize long-term** loyal participation * **Keep markets fair**, liquid, and meaningful [Maker rebates](https://docs.limitless.exchange/user-guide/maker-rebates) [Market Resolution](https://docs.limitless.exchange/user-guide/market-resolution) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Refund Policy - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/refund-policy#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Refund Policy [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Refund Policy](https://docs.limitless.exchange/user-guide/refund-policy#refund-policy) * [How Misresolution Refunds Work](https://docs.limitless.exchange/user-guide/refund-policy#how-misresolution-refunds-work) * [How to Report a Misresolution](https://docs.limitless.exchange/user-guide/refund-policy#how-to-report-a-misresolution) [​](https://docs.limitless.exchange/user-guide/refund-policy#refund-policy) Refund Policy -------------------------------------------------------------------------------------------- In cases of misresolved markets, **only the bet amount will be refunded**. ### [​](https://docs.limitless.exchange/user-guide/refund-policy#how-misresolution-refunds-work) How Misresolution Refunds Work If a market is resolved to the wrong outcome: * Users who held shares on the **incorrectly winning side** will have those shares voided * Users who held shares on the **actual winning side** (the side that should have won) will receive a refund equal to the amount they originally paid for those shares * The refund covers the **cost basis** of the shares, not the potential payout In other words, if the market was resolved to side A but should have been resolved to side B, holders of side B shares receive a refund of the amount they paid for those shares. This ensures no user is financially harmed by the misresolution beyond their original position. [​](https://docs.limitless.exchange/user-guide/refund-policy#how-to-report-a-misresolution) How to Report a Misresolution ---------------------------------------------------------------------------------------------------------------------------- If you believe a market was resolved incorrectly, contact the team through any of these channels: * **Support**: Use the support channel on [limitless.exchange](https://limitless.exchange/) (in the footer) * **Email**: [hey@limitless.network](mailto:hey@limitless.network) * **Discord**: [Join our Discord](https://discord.com/invite/yb4SscD8RZ) [Analytics](https://docs.limitless.exchange/user-guide/analytics) [Terms of Service](https://docs.limitless.exchange/user-guide/terms-of-service) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Managing Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/managing-orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation CLOB Managing Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Viewing Open Orders](https://docs.limitless.exchange/user-guide/managing-orders#viewing-open-orders) * [Cancelling Orders](https://docs.limitless.exchange/user-guide/managing-orders#cancelling-orders) [​](https://docs.limitless.exchange/user-guide/managing-orders#viewing-open-orders) Viewing Open Orders ---------------------------------------------------------------------------------------------------------- Navigate to the market’s order book page to view your active orders. Each order shows its side (buy/sell), price, size, and status. ![Managing orders interface](https://mintcdn.com/limitless/ICUUKkuIoyKRabBU/images/manage-orders.png?w=2500&fit=max&auto=format&n=ICUUKkuIoyKRabBU&q=85&s=ba94d627f3e2bfaa84e69be115429e6e) [​](https://docs.limitless.exchange/user-guide/managing-orders#cancelling-orders) Cancelling Orders ------------------------------------------------------------------------------------------------------ To cancel an order, simply click the **cancel button** next to it. Your locked funds will be returned immediately. You can also cancel orders programmatically via the API: * [Cancel a single order](https://docs.limitless.exchange/api-reference/trading/cancel-order) * [Cancel orders in batch](https://docs.limitless.exchange/api-reference/trading/cancel-batch) * [Cancel all orders in a market](https://docs.limitless.exchange/api-reference/trading/cancel-all) [Limit Orders](https://docs.limitless.exchange/user-guide/limit-orders) [Merging & Splitting Shares](https://docs.limitless.exchange/user-guide/merge-split) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Maker rebates - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/maker-rebates#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Rewards & Fees Maker rebates [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/maker-rebates#overview) * [How rebate credit is generated](https://docs.limitless.exchange/user-guide/maker-rebates#how-rebate-credit-is-generated) * [Conceptual formula](https://docs.limitless.exchange/user-guide/maker-rebates#conceptual-formula) * [Daily accrual window](https://docs.limitless.exchange/user-guide/maker-rebates#daily-accrual-window) * [Daily payout mechanics](https://docs.limitless.exchange/user-guide/maker-rebates#daily-payout-mechanics) * [Payout formula](https://docs.limitless.exchange/user-guide/maker-rebates#payout-formula) * [Example](https://docs.limitless.exchange/user-guide/maker-rebates#example) * [Eligibility](https://docs.limitless.exchange/user-guide/maker-rebates#eligibility) * [What counts toward maker rebates](https://docs.limitless.exchange/user-guide/maker-rebates#what-counts-toward-maker-rebates) * [What does not count](https://docs.limitless.exchange/user-guide/maker-rebates#what-does-not-count) * [Current program parameters](https://docs.limitless.exchange/user-guide/maker-rebates#current-program-parameters) * [Funding and program economics](https://docs.limitless.exchange/user-guide/maker-rebates#funding-and-program-economics) * [Payment timing and settlement](https://docs.limitless.exchange/user-guide/maker-rebates#payment-timing-and-settlement) * [Tips for market makers](https://docs.limitless.exchange/user-guide/maker-rebates#tips-for-market-makers) [​](https://docs.limitless.exchange/user-guide/maker-rebates#overview) Overview ---------------------------------------------------------------------------------- Maker Rebates is a daily USDC rewards program for market makers. When a taker removes liquidity from the order book and pays a taker fee, a portion of that fee is credited back to the maker whose resting order was filled. Rebates are based on real executed trading activity and paid in USDC. The program works in two stages: 1. **Rebate credit accrual (continuous):** as trades execute, the system calculates rebate credit for eligible maker fills. 2. **USDC payout (daily):** once per day (UTC), the system distributes USDC to eligible makers in proportion to the rebate credit they generated that day. A simple mental model: * Your fills generate **rebate credit** during the day. * All eligible makers generate a **daily total** rebate credit. * You receive a **pro-rata share** of the daily USDC payout based on your share of that total. [​](https://docs.limitless.exchange/user-guide/maker-rebates#how-rebate-credit-is-generated) How rebate credit is generated ------------------------------------------------------------------------------------------------------------------------------ Rebate credit is generated only by **executed fills** where your order acted as maker liquidity. Orders that remain on the book but are never filled do not generate rebate credit. For each eligible fill, rebate credit is determined using the fill’s execution details (including size and price), the applicable taker fee for that trade, and the program’s current eligibility settings (such as market and category eligibility). ### [​](https://docs.limitless.exchange/user-guide/maker-rebates#conceptual-formula) Conceptual formula For a single eligible maker fill: Executed Value (USD) = Executed Size × Fee-Applicable Price Rebate Credit = Executed Value × Taker Fee Rate × Program Eligibility Factor Where: * **Executed Size** is the size of the maker fill. * **Fee-Applicable Price** is the price basis used for fee calculation on that execution. * **Taker Fee Rate** is the taker fee applied to the trade. * **Program Eligibility Factor** is the program’s active market/category eligibility configuration for that fill. Your rebate credit grows when your resting liquidity gets filled and generates taker fees. [​](https://docs.limitless.exchange/user-guide/maker-rebates#daily-accrual-window) Daily accrual window ---------------------------------------------------------------------------------------------------------- Rebate credit accrues continuously throughout the day and is grouped into **UTC-day windows**. * A trading fill contributes to the day in which it was finalized. * At the end of the UTC day, all eligible rebate credit is totaled for payout. Your payout for a given day depends on all eligible fills finalized during that UTC day. [​](https://docs.limitless.exchange/user-guide/maker-rebates#daily-payout-mechanics) Daily payout mechanics -------------------------------------------------------------------------------------------------------------- Maker Rebates are calculated daily and paid in **USDC**. For each UTC day, the system aggregates all eligible rebate credit generated by filled maker orders and determines each maker’s share of that day’s total. Your payout is proportional to your contribution. If your fills generated 8% of the day’s eligible rebate credit, you receive approximately 8% of that day’s rebate payout. The daily rebate payout is funded from the rebate wallet and tied to eligible trading activity under the current program configuration. In normal conditions, the system distributes the full scheduled amount for that day. If the rebate wallet balance is lower than the scheduled payout amount, the available USDC is distributed pro-rata and the shortfall is recorded. ### [​](https://docs.limitless.exchange/user-guide/maker-rebates#payout-formula) Payout formula For a given UTC day: * **Your share** = Your eligible rebate credit / Total eligible rebate credit * **Your payout (USDC)** = Your share × Daily rebate payout amount Rebates are performance-based: the more eligible fee-generating maker fills you provide (relative to other makers), the larger your share of the daily payout. [​](https://docs.limitless.exchange/user-guide/maker-rebates#example) Example -------------------------------------------------------------------------------- Assume **Hourly Crypto** and **15-minute Crypto** markets are configured with a **100% rebate rate** (i.e., 100% of eligible taker fees funds the rebate pool for those markets). During one UTC day, the following trades execute in an eligible hourly or 15-minute market: | **Trade** | **Taker action** | **Price** | **Size** | **Executed value** | **Taker fee rate** | **Taker fee paid** | **Maker** | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | Buy | $0.60 | 1,000 | $600 | 2.0% | $12.00 | Maker A | | 2 | Sell | $0.55 | 500 | $275 | 2.0% | $5.50 | Maker B | | 3 | Buy | $0.65 | 800 | $520 | 2.0% | $10.40 | Maker A | 1 [](https://docs.limitless.exchange/user-guide/maker-rebates#) Rebate credit is generated from executed fills Only executed maker fills generate rebate credit. Each trade contributes rebate credit based on the executed trade and the taker fee paid. * **Maker A rebate credit:** $12.00 + $10.40 = **$22.40** * **Maker B rebate credit:** **$5.50** * **Total rebate credit:** **$27.90** 2 [](https://docs.limitless.exchange/user-guide/maker-rebates#) The market rebate pool is funded from taker fees Total eligible taker fees collected in this market for the day:$12.00 + $5.50 + $10.40 = **$27.90**Hourly / 15-minute Crypto rebate rate = **100%**Daily rebate pool (this market) = 100% × $27.90 = **$27.90 USDC** 3 [](https://docs.limitless.exchange/user-guide/maker-rebates#) The rebate pool is distributed pro-rata Each maker receives a share of the rebate pool proportional to their share of the day’s rebate credit: * **Maker A share:** 22.40 / 27.90 = **80.29%** → **$22.40 USDC** * **Maker B share:** 5.50 / 27.90 = **19.71%** → **$5.50 USDC** The market generated **$27.90** in eligible taker fees, **$27.90 USDC** was allocated to the rebate pool (100%), and that amount was split between makers based on their contribution to the day’s eligible fee-generating fills. [​](https://docs.limitless.exchange/user-guide/maker-rebates#eligibility) Eligibility ---------------------------------------------------------------------------------------- Maker Rebates only applies to **eligible trading activity**. If a fill occurs in a market that is not included in the current program configuration, that fill does not generate rebate credit and does not contribute to payouts. Eligibility may be configured by: * **Specific markets** * **Market categories** * A combination of both ### [​](https://docs.limitless.exchange/user-guide/maker-rebates#what-counts-toward-maker-rebates) What counts toward maker rebates * Executed fills where your order provided maker liquidity * Fills in currently eligible markets/categories * Fills that generate taker fees under the active fee schedule ### [​](https://docs.limitless.exchange/user-guide/maker-rebates#what-does-not-count) What does not count * Orders that were posted but never filled * Fills in non-eligible markets/categories * Trading activity outside the program’s active configuration ### [​](https://docs.limitless.exchange/user-guide/maker-rebates#current-program-parameters) Current program parameters | Market | Rebate rate | | --- | --- | | **Daily markets** | 100% of eligible taker fees | | **Hourly Crypto** | 100% of eligible taker fees | | **15-minute Crypto markets** | 100% of eligible taker fees | [​](https://docs.limitless.exchange/user-guide/maker-rebates#funding-and-program-economics) Funding and program economics ---------------------------------------------------------------------------------------------------------------------------- Maker Rebates is funded by taker fees and paid from a dedicated rebate wallet in USDC. The program is defined by three parameters: | Parameter | Description | | --- | --- | | **Rebate percentage** | What portion of taker fees is rebated | | **Eligible markets** | Which markets generate rebate credit | | **Eligible categories** | Which categories generate rebate credit | These parameters determine where rebate credit is generated and how much is available for daily payouts. [​](https://docs.limitless.exchange/user-guide/maker-rebates#payment-timing-and-settlement) Payment timing and settlement ---------------------------------------------------------------------------------------------------------------------------- Rebates are calculated on a **UTC-day basis** and paid **daily** in USDC. * Rebate credit accrues continuously as trades are finalized. * The system computes the daily payout after the UTC day closes. * USDC is distributed to eligible maker wallets. Exact payout timing may depend on the daily payout run schedule, but payouts are always tied to the corresponding UTC-day accrual window. [​](https://docs.limitless.exchange/user-guide/maker-rebates#tips-for-market-makers) Tips for market makers -------------------------------------------------------------------------------------------------------------- Maker Rebates rewards **executed maker liquidity**, not just quote presence. Makers tend to generate more rebate credit when they: * Maintain competitive quotes * Provide size where demand exists * Achieve higher fill rates on eligible markets [LP Rewards](https://docs.limitless.exchange/user-guide/lp-rewards) [Fees](https://docs.limitless.exchange/user-guide/fees) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Privacy Policy - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/privacy-policy#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Privacy Policy [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [1\. Introduction](https://docs.limitless.exchange/user-guide/privacy-policy#1-introduction) * [2\. Information We Collect](https://docs.limitless.exchange/user-guide/privacy-policy#2-information-we-collect) * [Personal Information](https://docs.limitless.exchange/user-guide/privacy-policy#personal-information) * [Usage Data](https://docs.limitless.exchange/user-guide/privacy-policy#usage-data) * [3\. How We Use Your Information](https://docs.limitless.exchange/user-guide/privacy-policy#3-how-we-use-your-information) * [4\. Information Sharing and Disclosure](https://docs.limitless.exchange/user-guide/privacy-policy#4-information-sharing-and-disclosure) * [5\. Data Security](https://docs.limitless.exchange/user-guide/privacy-policy#5-data-security) * [6\. Your Rights and Choices](https://docs.limitless.exchange/user-guide/privacy-policy#6-your-rights-and-choices) * [7\. International Data Transfers](https://docs.limitless.exchange/user-guide/privacy-policy#7-international-data-transfers) * [8\. Children’s Privacy](https://docs.limitless.exchange/user-guide/privacy-policy#8-children%E2%80%99s-privacy) * [9\. Changes to This Privacy Policy](https://docs.limitless.exchange/user-guide/privacy-policy#9-changes-to-this-privacy-policy) * [10\. Contact Us](https://docs.limitless.exchange/user-guide/privacy-policy#10-contact-us) * [11\. Governing Law and Dispute Resolution](https://docs.limitless.exchange/user-guide/privacy-policy#11-governing-law-and-dispute-resolution) _Effective: March 19, 2025_ This Privacy Policy (“**Policy**”) outlines how Street Chow Inc., a company incorporated under the laws of Panama (“**we**”, “**us**”, or “**our**”), collects, uses, shares, and protects personal information of users (“**you**” or “**users**”) of our online predictions market platform (the “**Platform**”). By accessing or using our Platform, you agree to the terms of this Privacy Policy. [​](https://docs.limitless.exchange/user-guide/privacy-policy#1-introduction) 1\. Introduction ------------------------------------------------------------------------------------------------- This Privacy Policy governs all aspects of information collection, processing, and protection across our Platform’s services, including but not limited to account creation, market participation, transaction processing, and user interactions. It applies to all users accessing our Platform, whether as registered members or visitors. By using our Platform, you acknowledge that you have read and understood this Privacy Policy and agree to be bound by its terms. If you do not agree with any aspect of this Policy, you should immediately discontinue use of our Platform. [​](https://docs.limitless.exchange/user-guide/privacy-policy#2-information-we-collect) 2\. Information We Collect --------------------------------------------------------------------------------------------------------------------- We collect and process two main categories of information: ### [​](https://docs.limitless.exchange/user-guide/privacy-policy#personal-information) Personal Information Information that can directly or indirectly identify you as an individual, including: * Full name, email address, postal address, phone number * Date of birth, government-issued identification documents * Banking and financial information * Account login credentials We collect this information when you create an account, complete your profile, make transactions, or communicate with us. ### [​](https://docs.limitless.exchange/user-guide/privacy-policy#usage-data) Usage Data Information about how you interact with our Platform, including: * IP address, browser type and version, device information * Operating system, time zone setting * Access times and duration, pages viewed, features used * Transaction history, betting patterns, and other diagnostic data We collect this information automatically through cookies, web beacons, and similar tracking technologies. We maintain detailed records of all predictions market transactions, including stakes placed, outcomes, and associated timestamps. [​](https://docs.limitless.exchange/user-guide/privacy-policy#3-how-we-use-your-information) 3\. How We Use Your Information ------------------------------------------------------------------------------------------------------------------------------- We process your personal information for the following purposes: * **Account Management and Platform Operations**: Creating and maintaining your account, processing transactions, providing customer support, verifying identity, and processing payments. * **Platform Improvement and Analytics**: Analyzing user behavior and platform performance to enhance services, develop new features, and optimize user experience using industry-standard analytics tools. * **Legal Compliance and Risk Management**: Complying with applicable laws and regulations, including anti-money laundering requirements, tax reporting, fraud detection, and responding to legal requests from authorities. We retain your information only for as long as necessary to fulfill these purposes or as required by applicable law. [​](https://docs.limitless.exchange/user-guide/privacy-policy#4-information-sharing-and-disclosure) 4\. Information Sharing and Disclosure --------------------------------------------------------------------------------------------------------------------------------------------- We may share your personal information with third parties in the following circumstances: * With **affiliated companies and subsidiaries** who assist in operating our Platform, subject to confidentiality obligations * With **third-party service providers** (payment processors, cloud storage, analytics services, customer support) contractually bound to protect your information * When **required by law**, regulation, or legal process, including court orders, subpoenas, or government requests * In connection with a **merger, acquisition, bankruptcy, dissolution**, or similar corporate event We do not sell, rent, or lease your personal information to third parties for their marketing purposes without your explicit consent. [​](https://docs.limitless.exchange/user-guide/privacy-policy#5-data-security) 5\. Data Security --------------------------------------------------------------------------------------------------- We implement and maintain appropriate technical and organizational security measures to protect your Personal Information, including: * Industry-standard encryption protocols for data in transit and at rest * Secure socket layer (SSL) technology * Firewalls and restricted access controls * Regular security assessments and audits Access to Personal Information is strictly limited to authorized employees, agents, and service providers bound by confidentiality obligations. In the event of a security breach that affects your Personal Information, we will notify you and the relevant authorities as required by applicable law. [​](https://docs.limitless.exchange/user-guide/privacy-policy#6-your-rights-and-choices) 6\. Your Rights and Choices ----------------------------------------------------------------------------------------------------------------------- You have certain rights regarding your personal information: * **Right to access** your personal information and request details about how we process it * **Right to correction** of inaccurate personal information * **Right to deletion** of your personal information, subject to legal obligations * **Right to object** to or restrict certain processing activities * **Right to opt-out** of marketing communications at any time To exercise these rights, contact our Data Protection Officer at [hey@limitless.network](mailto:hey@limitless.network) . We will respond to all legitimate requests within thirty (30) days. [​](https://docs.limitless.exchange/user-guide/privacy-policy#7-international-data-transfers) 7\. International Data Transfers --------------------------------------------------------------------------------------------------------------------------------- We may transfer, store, and process your personal information in countries other than Panama. By using the Platform, you acknowledge and consent to such transfers. For transfers outside the European Economic Area (EEA), we implement appropriate safeguards including Standard Contractual Clauses approved by the European Commission. [​](https://docs.limitless.exchange/user-guide/privacy-policy#8-children%E2%80%99s-privacy) 8\. Children’s Privacy --------------------------------------------------------------------------------------------------------------------- The Platform is not directed to children under the age of 18. We do not knowingly collect personal information from children under 18. If we become aware that we have inadvertently collected such information, we will take steps to delete it as soon as possible. If you believe a child under 18 has submitted personal information to our Platform, please contact us immediately at [hey@limitless.network](mailto:hey@limitless.network) . [​](https://docs.limitless.exchange/user-guide/privacy-policy#9-changes-to-this-privacy-policy) 9\. Changes to This Privacy Policy ------------------------------------------------------------------------------------------------------------------------------------- We reserve the right to update or modify this Privacy Policy at any time without prior notice. Material changes will be communicated through a prominent notice on our Platform or by email. Your continued use of the Platform following any changes constitutes your acceptance of the revised Policy. [​](https://docs.limitless.exchange/user-guide/privacy-policy#10-contact-us) 10\. Contact Us ----------------------------------------------------------------------------------------------- For any questions, concerns, or requests related to your personal information or this Privacy Policy: **Email**: [hey@limitless.network](mailto:hey@limitless.network) We will endeavor to respond to your inquiries within 30 days of receipt. [​](https://docs.limitless.exchange/user-guide/privacy-policy#11-governing-law-and-dispute-resolution) 11\. Governing Law and Dispute Resolution --------------------------------------------------------------------------------------------------------------------------------------------------- This Privacy Policy shall be governed by and construed in accordance with the laws of Panama. Any dispute arising out of or relating to this Privacy Policy shall be settled by binding arbitration in Panama City, Panama, in accordance with the Rules of Arbitration of the International Chamber of Commerce. YOU HEREBY WAIVE ANY RIGHT TO TRIAL BY JURY IN ANY ACTION ARISING OUT OF OR RELATING TO THIS PRIVACY POLICY. [Terms of Service](https://docs.limitless.exchange/user-guide/terms-of-service) [Changelog](https://docs.limitless.exchange/changelog) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Partner Accounts - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Partner Accounts [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Access](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#access) * [Server wallet mode](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#server-wallet-mode) * [EOA mode](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#eoa-mode) * [Validation](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#validation) The `PartnerAccountService` creates sub-account profiles linked to the authenticated partner. Requires HMAC authentication with the `account_creation` scope. [​](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#access) Access -------------------------------------------------------------------------------------------- from limitless_sdk import Client, HMACCredentials client = Client( base_url="https://api.limitless.exchange", hmac_credentials=HMACCredentials(token_id=token_id, secret=secret), ) # Use client.partner_accounts.* [​](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#server-wallet-mode) Server wallet mode -------------------------------------------------------------------------------------------------------------------- Creates a managed Privy wallet for the sub-account. Enables [delegated signing](https://docs.limitless.exchange/developers/programmatic-api#sub-account-modes) — the partner submits unsigned orders and the server signs them. from limitless_sdk import CreatePartnerAccountInput account = await client.partner_accounts.create_account( CreatePartnerAccountInput( display_name="user-alice", create_server_wallet=True, ) ) print(account.profile_id) # numeric profile ID print(account.account) # wallet address New server wallets need the backend allowance provisioning to complete before the first delegated trade. A short delay (a few seconds) is typical. [​](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#eoa-mode) EOA mode ------------------------------------------------------------------------------------------------ Creates a profile for an externally-owned address. The end user manages their own keys and signs orders themselves. EOA mode requires wallet ownership verification headers: from limitless_sdk import CreatePartnerAccountInput, CreatePartnerAccountEOAHeaders account = await client.partner_accounts.create_account( CreatePartnerAccountInput(display_name="user-bob"), eoa_headers=CreatePartnerAccountEOAHeaders( account="0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", signing_message="0x...", signature="0x...", ), ) [​](https://docs.limitless.exchange/developers/sdk/python/partner-accounts#validation) Validation ---------------------------------------------------------------------------------------------------- * `display_name` is optional, max 44 characters. Defaults to the wallet address if omitted. * Returns `409 Conflict` if a profile already exists for the target address. * Cannot create a sub-account for the partner’s own address. * The SDK validates `display_name` length locally before sending the request. [API Tokens](https://docs.limitless.exchange/developers/sdk/python/api-tokens) [Delegated Orders](https://docs.limitless.exchange/developers/sdk/python/delegated-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Python SDK - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/getting-started#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Python SDK [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/getting-started#overview) * [Installation](https://docs.limitless.exchange/developers/sdk/python/getting-started#installation) * [Quick Start](https://docs.limitless.exchange/developers/sdk/python/getting-started#quick-start) * [Authentication](https://docs.limitless.exchange/developers/sdk/python/getting-started#authentication) * [Client constructor](https://docs.limitless.exchange/developers/sdk/python/getting-started#client-constructor) * [HttpClient (lower-level)](https://docs.limitless.exchange/developers/sdk/python/getting-started#httpclient-lower-level) * [Logging](https://docs.limitless.exchange/developers/sdk/python/getting-started#logging) * [Source Code](https://docs.limitless.exchange/developers/sdk/python/getting-started#source-code) * [Disclaimer](https://docs.limitless.exchange/developers/sdk/python/getting-started#disclaimer) * [Next Steps](https://docs.limitless.exchange/developers/sdk/python/getting-started#next-steps) * [Server Wallet Redemption and Withdrawal](https://docs.limitless.exchange/developers/sdk/python/getting-started#server-wallet-redemption-and-withdrawal) [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#overview) Overview ----------------------------------------------------------------------------------------------- The Limitless Exchange Python SDK (`limitless-sdk`) is an **async-first** Python client built on top of aiohttp. It provides: * Fully asynchronous HTTP and WebSocket clients * Pydantic models for type-safe request and response handling * Automatic venue caching for EIP-712 order signing * Built-in retry logic for transient API failures * WebSocket streaming with auto-reconnect The SDK requires **Python 3.9+** and uses `async`/`await` throughout. All network calls must be awaited inside an `asyncio` event loop. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#installation) Installation ------------------------------------------------------------------------------------------------------- pip install limitless-sdk [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#quick-start) Quick Start ----------------------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/developers/sdk/python/getting-started#) Initialize the HTTP client import asyncio from limitless_sdk.api import HttpClient http_client = HttpClient() # loads LIMITLESS_API_KEY from env 2 [](https://docs.limitless.exchange/developers/sdk/python/getting-started#) Fetch active markets from limitless_sdk.markets import MarketFetcher async def main(): market_fetcher = MarketFetcher(http_client) markets = await market_fetcher.get_active_markets() for market in markets["data"]: print(market["title"], market["slug"]) await http_client.close() asyncio.run(main()) 3 [](https://docs.limitless.exchange/developers/sdk/python/getting-started#) Check your positions from limitless_sdk.portfolio import PortfolioFetcher async def main(): portfolio = PortfolioFetcher(http_client) positions = await portfolio.get_positions() for pos in positions.get("clob", []): print(pos["market"]["title"], pos["size"]) await http_client.close() asyncio.run(main()) [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#authentication) Authentication ----------------------------------------------------------------------------------------------------------- The SDK supports both authentication modes: * Legacy API key (`X-API-Key`) * Scoped token HMAC (`lmts-api-key`, `lmts-timestamp`, `lmts-signature`) for partner/programmatic integrations * Environment variable (recommended) * HMAC (partner/programmatic) * Explicit parameter Set the `LIMITLESS_API_KEY` environment variable. The `HttpClient` loads it automatically: export LIMITLESS_API_KEY="lmts_your_key_here" http_client = HttpClient() # auto-loads LIMITLESS_API_KEY Use the root client with scoped token credentials: from limitless_sdk import Client, HMACCredentials client = Client( base_url="https://api.limitless.exchange", hmac_credentials=HMACCredentials( token_id="your-token-id", secret="your-base64-secret", ), ) Pass `api_key` directly to the constructor: http_client = HttpClient(api_key="lmts_your_key_here") With `hmac_credentials` set, the SDK automatically generates and sends `lmts-api-key`, `lmts-timestamp`, and `lmts-signature`. Do not manually build HMAC headers when using the SDK client. Never hardcode API keys in source code or commit them to version control. Use environment variables or a secrets manager. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#client-constructor) Client constructor ------------------------------------------------------------------------------------------------------------------- The recommended entrypoint is the root `Client` class, which composes all domain services (markets, portfolio, orders, API tokens, partner accounts, delegated orders): from limitless_sdk import Client client = Client(base_url="https://api.limitless.exchange") For partner integrations using HMAC authentication: from limitless_sdk import Client, HMACCredentials client = Client( base_url="https://api.limitless.exchange", hmac_credentials=HMACCredentials( token_id="your-token-id", secret="your-base64-secret", ), ) | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `base_url` | `str` | `https://api.limitless.exchange` | API base URL | | `api_key` | `str \| None` | `None` (reads `LIMITLESS_API_KEY` env) | Legacy API key authentication | | `hmac_credentials` | `HMACCredentials \| None` | `None` | HMAC credentials for scoped API token auth (see [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api)
) | | `additional_headers` | `dict \| None` | `None` | Extra headers merged into every request | ### [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#httpclient-lower-level) HttpClient (lower-level) You can also use `HttpClient` directly for more control: from limitless_sdk.api import HttpClient http_client = HttpClient( base_url="https://api.limitless.exchange", api_key="lmts_your_key_here", ) Always call `await http_client.close()` when you are finished to cleanly shut down the underlying aiohttp session. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#logging) Logging --------------------------------------------------------------------------------------------- The SDK provides a `ConsoleLogger` with configurable log levels for debugging: from limitless_sdk.types import ConsoleLogger, LogLevel logger = ConsoleLogger(level=LogLevel.DEBUG) | Level | Description | | --- | --- | | `LogLevel.DEBUG` | Verbose output including headers, venue cache operations, and raw payloads | | `LogLevel.INFO` | General operational messages | | `LogLevel.WARN` | Warnings about potential issues | | `LogLevel.ERROR` | Errors only | Set `LogLevel.DEBUG` during development to see request headers, venue cache hits/misses, and full API responses. Switch to `INFO` or `WARN` in production. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#source-code) Source Code ----------------------------------------------------------------------------------------------------- The SDK is open source. Contributions and issue reports are welcome. GitHub Repository ----------------- Browse the source, report issues, and contribute at github.com/limitless-labs-group/limitless-sdk [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#disclaimer) Disclaimer --------------------------------------------------------------------------------------------------- **USE AT YOUR OWN RISK.** This SDK is provided as-is with no guarantees. You are solely responsible for any trading activity conducted through this software. Limitless Exchange is not available to users in the United States or other restricted jurisdictions. By using this SDK, you confirm compliance with all applicable local laws and regulations. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#next-steps) Next Steps --------------------------------------------------------------------------------------------------- Markets ------- Discover markets, fetch orderbooks, and understand venue caching. Market Pages ------------ Browse markets by category with navigation, filters, and pagination. Trading & Orders ---------------- Place GTC and FOK orders, cancel orders, and manage token approvals. Portfolio & Positions --------------------- Track your open positions and trading history. API Tokens ---------- Derive, list, and revoke scoped HMAC tokens for partner integrations. Partner Accounts ---------------- Create sub-accounts with server wallets or EOA verification. Delegated Orders ---------------- Place orders on behalf of sub-accounts with server-side signing. WebSocket Streaming ------------------- Subscribe to real-time orderbook and price updates. Error Handling & Retry ---------------------- Retry logic, error types, and debugging strategies. [​](https://docs.limitless.exchange/developers/sdk/python/getting-started#server-wallet-redemption-and-withdrawal) Server Wallet Redemption and Withdrawal ------------------------------------------------------------------------------------------------------------------------------------------------------------- For partner server-wallet sub-accounts, the SDK now provides helper methods for payout settlement and treasury movement (v1.0.6+): * [`POST /portfolio/redeem`](https://docs.limitless.exchange/api-reference/portfolio/redeem) — claim resolved positions * [`POST /portfolio/withdraw`](https://docs.limitless.exchange/api-reference/portfolio/withdraw) — transfer ERC20 funds from managed sub-accounts Required scopes for `apiToken` auth: `trading` for redeem and `withdrawal` for withdraw. See the full flow and scope guidance in [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) . [Error Handling & Retry](https://docs.limitless.exchange/developers/sdk/typescript/error-handling) [Markets](https://docs.limitless.exchange/developers/sdk/python/markets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Smart Contracts - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/smart-contracts#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Smart Contracts [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/smart-contracts#overview) * [Key Token Addresses](https://docs.limitless.exchange/user-guide/smart-contracts#key-token-addresses) * [Conditional Tokens](https://docs.limitless.exchange/user-guide/smart-contracts#conditional-tokens) * [Simple Markets](https://docs.limitless.exchange/user-guide/smart-contracts#simple-markets) * [v1](https://docs.limitless.exchange/user-guide/smart-contracts#v1) * [v2](https://docs.limitless.exchange/user-guide/smart-contracts#v2) * [v3](https://docs.limitless.exchange/user-guide/smart-contracts#v3) * [Negrisk Markets](https://docs.limitless.exchange/user-guide/smart-contracts#negrisk-markets) * [v1](https://docs.limitless.exchange/user-guide/smart-contracts#v1-2) * [v2](https://docs.limitless.exchange/user-guide/smart-contracts#v2-2) * [v3](https://docs.limitless.exchange/user-guide/smart-contracts#v3-2) [​](https://docs.limitless.exchange/user-guide/smart-contracts#overview) Overview ------------------------------------------------------------------------------------ Limitless Exchange runs on **Base** (Ethereum L2). All trading is settled onchain via smart contracts. To pull Limitless trading metrics, query **all three venue versions** of smart contracts. Each processes active trades — partial queries give you incomplete data. [​](https://docs.limitless.exchange/user-guide/smart-contracts#key-token-addresses) Key Token Addresses ---------------------------------------------------------------------------------------------------------- | Token | Address | Standard | | --- | --- | --- | | **USDC** (Native on Base) | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | ERC-20 | | **Conditional Tokens (CTF)** | `0xC9c98965297Bc527861c898329Ee280632B76e18` | ERC-1155 | [​](https://docs.limitless.exchange/user-guide/smart-contracts#conditional-tokens) Conditional Tokens -------------------------------------------------------------------------------------------------------- Limitless uses the [Gnosis Conditional Tokens Framework (CTF)](https://docs.gnosis.io/conditionaltokens/) — an ERC-1155 token standard that enables the creation of conditional outcome tokens for any future event. When a market is created, the CTF contract mints Yes and No tokens representing each outcome. These tokens are freely tradeable and composable with other DeFi protocols. The CTF is the underlying primitive that powers all market mechanics on Limitless, including share merging/splitting, Negrisk conversions, and market resolution payouts. [​](https://docs.limitless.exchange/user-guide/smart-contracts#simple-markets) Simple Markets ------------------------------------------------------------------------------------------------ ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v1) v1 | Contract | Address | | --- | --- | | CTF Exchange | `0xa4409D988CA2218d956BeEFD3874100F444f0DC3` | | Fee Module | `0x6d8A7D1898306CA129a74c296d14e55e20aaE87D` | ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v2) v2 | Contract | Address | | --- | --- | | CTF Exchange | `0xF1De958F8641448A5ba78c01f434085385Af096D` | | Fee Module | `0xEECD2Cf0FF29D712648fC328be4EE02FC7931c7A` | ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v3) v3 | Contract | Address | | --- | --- | | CTF Exchange | `0x05c748E2f4DcDe0ec9Fa8DDc40DE6b867f923fa5` | | Fee Module | `0x5130c2c398F930c4f43B15635410047cBEa9D6EB` | [​](https://docs.limitless.exchange/user-guide/smart-contracts#negrisk-markets) Negrisk Markets -------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v1-2) v1 | Contract | Address | | --- | --- | | NegRisk Adapter | `0xb8DAA4C8C9f690396f671BB601727A4c3741340C` | | NegRisk CTF Exchange | `0x5a38afc17F7E97ad8d6C547ddb837E40B4aEDfC6` | | NegRisk Fee Module | `0x73FC1B1395bA964FEa8705BfF7eF8EA5C23CC661` | | NegRisk Operator | `0xAE363abc7B264755e8706D81475C3586D4543992` | | NegRisk Vault | `0x80307da4d8EA92Cd7a13bBf6B3309431Ca7a1c0E` | | Wrapped Collateral | `0x5d6c6a4fea600e0b1a3ab3ef711060310e27886a` | ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v2-2) v2 | Contract | Address | | --- | --- | | NegRisk Adapter | `0x7afeB946986211950d17f24176039F12c2aB2436` | | NegRisk CTF Exchange | `0x46e607D3f4a8494B0aB9b304d1463e2F4848891d` | | NegRisk Fee Module | `0x18B3E1192c01286050A0994Bc26f7226Ae4A483d` | | NegRisk Operator | `0xd2e4a23E57F67a90Bfc999d420fDA16De0Fb2751` | | NegRisk Vault | `0xd7d245CB2cbE55633e270aF8379E5D4AbA87BD58` | | Wrapped Collateral | `0x428F0FC93221A9957dC667baa07E62d50c6b8c03` | ### [​](https://docs.limitless.exchange/user-guide/smart-contracts#v3-2) v3 | Contract | Address | | --- | --- | | NegRisk Adapter | `0x6151EF8368b6316c1aa3C68453EF083ad31E712D` | | NegRisk CTF Exchange | `0xe3E00BA3a9888d1DE4834269f62ac008b4BB5C47` | | NegRisk Fee Module | `0xfeb646D32a2A558359419a1C9c5dfb47fD92dADb` | | NegRisk Operator | `0xB7D463037836cFf84FA9ddC25c1136756B4b5F61` | | NegRisk Vault | `0x2eC22ee9381D0b3570cCb5887960DDFd05d210b3` | | Wrapped Collateral | `0xBd8Ff5Ac78A3739037FEaA18278cC157C4798B01` | [Market Resolution](https://docs.limitless.exchange/user-guide/market-resolution) [Analytics](https://docs.limitless.exchange/user-guide/analytics) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Terms of Service - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/terms-of-service#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Resources Terms of Service [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [1\. Eligibility](https://docs.limitless.exchange/user-guide/terms-of-service#1-eligibility) * [2\. Account Creation and Wallet Connection](https://docs.limitless.exchange/user-guide/terms-of-service#2-account-creation-and-wallet-connection) * [3\. Use of the Platform](https://docs.limitless.exchange/user-guide/terms-of-service#3-use-of-the-platform) * [4\. Cryptocurrency Transactions](https://docs.limitless.exchange/user-guide/terms-of-service#4-cryptocurrency-transactions) * [5\. Fees and Commissions](https://docs.limitless.exchange/user-guide/terms-of-service#5-fees-and-commissions) * [6\. Prohibited Activities](https://docs.limitless.exchange/user-guide/terms-of-service#6-prohibited-activities) * [7\. Risk Disclosure](https://docs.limitless.exchange/user-guide/terms-of-service#7-risk-disclosure) * [8\. Intellectual Property](https://docs.limitless.exchange/user-guide/terms-of-service#8-intellectual-property) * [9\. Privacy Policy](https://docs.limitless.exchange/user-guide/terms-of-service#9-privacy-policy) * [10\. Representations and Warranties](https://docs.limitless.exchange/user-guide/terms-of-service#10-representations-and-warranties) * [11\. Limitation of Liability](https://docs.limitless.exchange/user-guide/terms-of-service#11-limitation-of-liability) * [12\. Dispute Resolution](https://docs.limitless.exchange/user-guide/terms-of-service#12-dispute-resolution) * [13\. Termination](https://docs.limitless.exchange/user-guide/terms-of-service#13-termination) * [14\. Changes to Terms](https://docs.limitless.exchange/user-guide/terms-of-service#14-changes-to-terms) * [15\. Contact Information](https://docs.limitless.exchange/user-guide/terms-of-service#15-contact-information) _Last Updated: March 26, 2025_ These Terms of Service (“**Terms**”) govern Your use of the online cryptocurrency-powered predictions market (the “**Platform**”) operated by Street Chow Inc., a Panamanian company (“**Company**,” “**we**,” “**us**,” or “**our**”). By accessing or using the Platform, You agree to be bound by these Terms. If You do not agree, You must not use the Platform. [​](https://docs.limitless.exchange/user-guide/terms-of-service#1-eligibility) 1\. Eligibility ------------------------------------------------------------------------------------------------- To access and use the Platform, You must: (a) be at least eighteen (18) years of age or the age of legal majority in Your jurisdiction, whichever is higher; (b) have the legal capacity to enter into these Terms and form a binding contract; (c) not be a citizen or resident of, or located in, any country or jurisdiction where use of the Platform would be prohibited by applicable law or regulation; and (d) not be included on the List of Specially Designated Nationals and Blocked Persons maintained by the US Treasury Department’s Office of Foreign Assets Control (OFAC) or on any list pursuant to European Union (EU) and/or United Kingdom (UK) regulations or placed on any other sanctions lists maintained by applicable governmental authorities. The Company reserves the right to require You to provide proof of age, identity, and/or eligibility at any time. Use of the Platform is void where prohibited by applicable law. You are responsible for determining whether Your use of the Platform complies with applicable laws in Your jurisdiction. The Platform is not available to users accessing it from the following jurisdictions: **United States of America**, People’s Republic of China, Cuba, Iran, North Korea, Syria, and the Crimea, Donetsk and Luhansk regions. Any access or use of the Platform in violation of these eligibility requirements is unauthorized and strictly prohibited. The Company reserves the right to terminate Your access immediately and without notice if it believes You do not meet the eligibility requirements. [​](https://docs.limitless.exchange/user-guide/terms-of-service#2-account-creation-and-wallet-connection) 2\. Account Creation and Wallet Connection ------------------------------------------------------------------------------------------------------------------------------------------------------- To create an account on the Platform (an “**Account**”), You must connect a compatible cryptographic wallet. By connecting Your wallet, You acknowledge and agree that this connection is necessary for the proper functioning of our services, including but not limited to identity verification, transaction processing, and security protocols. The Platform currently supports those wallets identified on the Platform. We reserve the right to modify the list of supported wallets at any time. You are solely responsible for maintaining the security of Your cryptographic wallet, including but not limited to safeguarding private keys, seed phrases, and other access credentials. We shall not be liable for any loss or damage resulting from Your failure to maintain adequate security measures for Your wallet. You may disconnect Your wallet from the Platform at any time; however, doing so may limit or prevent access to certain features or services until a compatible wallet is reconnected. We may require verification of wallet ownership through cryptographic signing of messages or other means to authenticate Your identity and prevent fraud. You are responsible for ensuring that Your device and software environment meet the technical requirements necessary for proper wallet connection and functionality. The Company reserves the right, in its sole discretion, to suspend, disable, or terminate Your Account if we believe that You have violated these Terms, engaged in fraudulent activity, or if Your Account shows suspicious behavior. We may also suspend Accounts to comply with applicable laws, court orders, or regulatory requirements. During any suspension period, You may be prevented from accessing Your Account. You may not sell, transfer, or assign Your Account to another person. You may not create multiple Accounts or create an Account on behalf of another person. The Company may require additional verification of Your identity at any time and may suspend Your Account until such verification is satisfactorily completed. [​](https://docs.limitless.exchange/user-guide/terms-of-service#3-use-of-the-platform) 3\. Use of the Platform ----------------------------------------------------------------------------------------------------------------- The Platform enables Users to participate in prediction markets by placing wagers on the outcomes of future events (“**Prediction Markets**”). Users may create or participate in Prediction Markets by staking cryptocurrency on potential outcomes. All Prediction Markets must be based on objectively verifiable events and outcomes that can be determined through reliable third-party data sources (“**Oracle Sources**”). The Company reserves the right to determine which Oracle Sources will be used to verify outcomes. The Company will clearly indicate the designated Oracle Source(s) for each Prediction Market at the time of market creation. Once an outcome has been determined based on data from the designated Oracle Source(s), it shall be considered final and binding. Users acknowledge that: * They are wagering actual cryptocurrency with real value * All wagers are final once confirmed on the blockchain * The Company does not guarantee the accuracy of Oracle Sources or prediction outcomes * Technical delays or blockchain network issues may affect the timing of market resolution * The Company may suspend or cancel any Prediction Market that becomes impossible to resolve definitively using the designated Oracle Sources The Company maintains sole discretion over which types of events may be the subject of Prediction Markets and may remove or suspend any markets that violate these Terms or applicable laws. Users may not create or participate in markets related to illegal activities, personal violence, terrorism, or other prohibited subjects as determined by the Company. [​](https://docs.limitless.exchange/user-guide/terms-of-service#4-cryptocurrency-transactions) 4\. Cryptocurrency Transactions --------------------------------------------------------------------------------------------------------------------------------- Users acknowledge that cryptocurrency transactions are subject to network congestion, blockchain processing times, and variable network fees. The Company does not guarantee specific transaction processing times and is not responsible for delays caused by blockchain network conditions. [​](https://docs.limitless.exchange/user-guide/terms-of-service#5-fees-and-commissions) 5\. Fees and Commissions ------------------------------------------------------------------------------------------------------------------- The Company charges transaction fees for the use of the Platform. Transaction fees may include, but are not limited to, market creation fees, trading fees, settlement fees, and withdrawal fees. The Company reserves the right to modify the transaction fees at any time in its sole discretion. Any changes to the fee structure will be communicated to Users through the Platform and will take effect immediately upon posting. Users’ continued use of the Platform following the posting of modified transaction fees constitutes acceptance of such modifications. Transaction fees will be automatically deducted from Your Account balances at the time of the relevant transaction. Users acknowledge and agree that all transaction fees are non-refundable unless otherwise required by applicable law. The Company may offer promotional fee discounts or waivers at its discretion, which may be subject to additional terms and conditions. [​](https://docs.limitless.exchange/user-guide/terms-of-service#6-prohibited-activities) 6\. Prohibited Activities --------------------------------------------------------------------------------------------------------------------- Users are strictly prohibited from engaging in any of the following activities on the Platform: * **Market Manipulation**: Users shall not engage in any activities intended to artificially influence market prices or outcomes, including but not limited to wash trading, spoofing, layering, or coordinated trading with other users. Users shall not create multiple accounts to circumvent trading restrictions or manipulate market outcomes. * **Fraud and Deceptive Practices**: Users shall not engage in any fraudulent or deceptive activities, including but not limited to: providing false or misleading information, attempting to hack or compromise the Platform’s security, exploiting technical vulnerabilities, or using the Platform for money laundering or other illegal purposes. * **Criminal Activity**: Users shall not engage in any criminal activity. The Company reserves the right to monitor all Platform activity for signs of prohibited activities. Upon reasonable suspicion of engagement in prohibited activities, the Company may, in its sole discretion and without prior notice: (i) immediately suspend or terminate Your Account; (ii) to the extent possible, forfeit and seize any funds in Your Account; (iii) share information with relevant legal and regulatory authorities; and (iv) take any other actions deemed necessary to protect the integrity of the Platform. Users acknowledge that engagement in prohibited activities may result in civil and criminal penalties under applicable laws, in addition to the remedies available to the Company under these Terms. [​](https://docs.limitless.exchange/user-guide/terms-of-service#7-risk-disclosure) 7\. Risk Disclosure --------------------------------------------------------------------------------------------------------- THE USER EXPRESSLY ACKNOWLEDGES AND AGREES THAT USING THE PLATFORM AND PARTICIPATING IN PREDICTION MARKETS INVOLVES SIGNIFICANT FINANCIAL RISK. THE USER MAY LOSE PART OR ALL OF THE FUNDS DEPOSITED OR WAGERED ON THE PLATFORM. Cryptocurrency markets are highly volatile and prediction market outcomes are inherently uncertain. Past performance does not guarantee future results. The User understands and accepts that smart contract code execution, blockchain network delays, market volatility, oracle failures, or other technical issues may impact transaction execution and settlement. The Company makes no guarantees regarding the profitability of any prediction market or wager. Users are strongly advised to only risk funds they can afford to lose. THE USER ACKNOWLEDGES THAT THEY ARE SOLELY RESPONSIBLE FOR CONDUCTING THEIR OWN DUE DILIGENCE AND ASSESSMENT OF RISKS BEFORE PARTICIPATING IN ANY PREDICTION MARKET OR PLACING ANY WAGER. The Company does not provide investment advice or recommendations. [​](https://docs.limitless.exchange/user-guide/terms-of-service#8-intellectual-property) 8\. Intellectual Property --------------------------------------------------------------------------------------------------------------------- All content on the Platform, including but not limited to text, graphics, logos, button icons, images, audio clips, digital downloads, data compilations, and software (“**Platform Content**”), is the property of the Company or its content suppliers and is protected by international copyright laws. Users are granted a limited, non-exclusive, non-transferable, and revocable license to access and use the Platform Content solely for personal, non-commercial purposes related to using the Platform’s prediction markets. Users may not copy, modify, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any Platform Content without the Company’s prior written permission. [​](https://docs.limitless.exchange/user-guide/terms-of-service#9-privacy-policy) 9\. Privacy Policy ------------------------------------------------------------------------------------------------------- Our collection, use, disclosure, and protection of Your personal information is governed by our [Privacy Policy](https://docs.limitless.exchange/user-guide/privacy-policy) , which is hereby incorporated by reference into these Terms. [​](https://docs.limitless.exchange/user-guide/terms-of-service#10-representations-and-warranties) 10\. Representations and Warranties ----------------------------------------------------------------------------------------------------------------------------------------- By accessing or using the Platform, You represent and warrant that: * You meet all eligibility requirements outlined in Section 1 of these Terms, including being at least 18 years of age and not accessing the Platform from a prohibited jurisdiction. * You have full power and authority to enter into these Terms and perform Your obligations hereunder. * Your use of the Platform will not violate any applicable law, regulation, or obligation You may have to a third party. * You are not: (i) subject to economic or trade sanctions administered or enforced by any governmental authority; (ii) located, organized, or resident in a country or territory that is subject to comprehensive sanctions; or (iii) named on any applicable sanctions lists. * All information You provide to the Company is true, accurate, and complete. ANY BREACH OF THE FOREGOING REPRESENTATIONS AND WARRANTIES SHALL CONSTITUTE A MATERIAL BREACH OF THESE TERMS AND MAY RESULT IN THE IMMEDIATE TERMINATION OF YOUR ACCESS TO THE PLATFORM AND (TO THE EXTENT POSSIBLE) FORFEITURE OF ANY FUNDS ASSOCIATED WITH YOUR ACCOUNT. [​](https://docs.limitless.exchange/user-guide/terms-of-service#11-limitation-of-liability) 11\. Limitation of Liability --------------------------------------------------------------------------------------------------------------------------- TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE COMPANY AND ITS OFFICERS, DIRECTORS, EMPLOYEES, AGENTS, AFFILIATES, AND REPRESENTATIVES SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO: * Loss of profits, revenue, data, use, goodwill, or other intangible losses * Damages or losses arising from any errors, mistakes, or inaccuracies in the Platform * Losses resulting from smart contract vulnerabilities, bugs, malfunctions, or other technical issues * Damages resulting from regulatory changes or enforcement actions affecting cryptocurrency or prediction markets * Any losses or damages arising from unauthorized access to Your Account or the Platform THE PLATFORM IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS. THE COMPANY MAKES NO WARRANTIES OR REPRESENTATIONS ABOUT THE ACCURACY OR COMPLETENESS OF THE PLATFORM’S CONTENT. [​](https://docs.limitless.exchange/user-guide/terms-of-service#12-dispute-resolution) 12\. Dispute Resolution ----------------------------------------------------------------------------------------------------------------- Any dispute, controversy, or claim arising out of or relating to these Terms shall be finally settled by binding arbitration administered by the International Chamber of Commerce under its Rules of Arbitration. The arbitration shall be conducted in English by a single arbitrator in Panama City, Panama. The arbitrator shall apply the laws of Panama without regard to principles of conflicts of law. TO THE FULLEST EXTENT PERMITTED BY LAW, YOU AGREE TO WAIVE ANY RIGHT TO PARTICIPATE IN A CLASS ACTION LAWSUIT OR CLASS-WIDE ARBITRATION. [​](https://docs.limitless.exchange/user-guide/terms-of-service#13-termination) 13\. Termination --------------------------------------------------------------------------------------------------- The Company reserves the right, in its sole discretion, to suspend, restrict, or permanently terminate Your access to the Platform and Your Account at any time, with or without prior notice, for any reason, including but not limited to: (i) violations of these Terms, (ii) suspected fraudulent, manipulative, or illegal activity, (iii) regulatory requirements or changes, or (iv) technical or security concerns. [​](https://docs.limitless.exchange/user-guide/terms-of-service#14-changes-to-terms) 14\. Changes to Terms ------------------------------------------------------------------------------------------------------------- The Company reserves the right to modify, amend, or update these Terms at any time in its sole discretion. Your continued use of the Platform following the posting of any changes constitutes Your acceptance of such changes. [​](https://docs.limitless.exchange/user-guide/terms-of-service#15-contact-information) 15\. Contact Information ------------------------------------------------------------------------------------------------------------------- For any questions, concerns, or support requests regarding the Platform or these Terms, You may contact us at [hey@limitless.network](mailto:hey@limitless.network) . [Refund Policy](https://docs.limitless.exchange/user-guide/refund-policy) [Privacy Policy](https://docs.limitless.exchange/user-guide/privacy-policy) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # WebSocket Streaming - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/websocket#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK WebSocket Streaming [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/websocket#overview) * [Setup](https://docs.limitless.exchange/developers/sdk/python/websocket#setup) * [Event Handlers](https://docs.limitless.exchange/developers/sdk/python/websocket#event-handlers) * [Available Events](https://docs.limitless.exchange/developers/sdk/python/websocket#available-events) * [Subscribing to Markets](https://docs.limitless.exchange/developers/sdk/python/websocket#subscribing-to-markets) * [Auto-Reconnect](https://docs.limitless.exchange/developers/sdk/python/websocket#auto-reconnect) * [Complete Example](https://docs.limitless.exchange/developers/sdk/python/websocket#complete-example) [​](https://docs.limitless.exchange/developers/sdk/python/websocket#overview) Overview ----------------------------------------------------------------------------------------- The `WebSocketClient` provides real-time streaming of orderbook updates and price data over a persistent WebSocket connection. It supports automatic reconnection and event-driven message handling via decorators. [​](https://docs.limitless.exchange/developers/sdk/python/websocket#setup) Setup ----------------------------------------------------------------------------------- from limitless_sdk.websocket import WebSocketClient, WebSocketConfig config = WebSocketConfig( url="wss://ws.limitless.exchange", auto_reconnect=True, reconnect_delay=5, # seconds between reconnection attempts ) ws_client = WebSocketClient(config) | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `url` | `str` | Required | WebSocket server URL | | `auto_reconnect` | `bool` | `True` | Automatically reconnect on disconnection | | `reconnect_delay` | `int` | `5` | Seconds to wait between reconnection attempts | [​](https://docs.limitless.exchange/developers/sdk/python/websocket#event-handlers) Event Handlers ----------------------------------------------------------------------------------------------------- Register handlers for specific events using the `@ws_client.on()` decorator: @ws_client.on("connect") async def on_connect(): print("Connected to WebSocket") @ws_client.on("orderbookUpdate") async def on_orderbook(data): print("Orderbook update:", data) @ws_client.on("newPriceData") async def on_price(data): print("Price update:", data) ### [​](https://docs.limitless.exchange/developers/sdk/python/websocket#available-events) Available Events | Event | Payload | Description | | --- | --- | --- | | `connect` | None | Fired when the WebSocket connection is established | | `orderbookUpdate` | `dict` | Orderbook changes (new bids/asks, removals) | | `newPriceData` | `dict` | Latest price data for subscribed markets | [​](https://docs.limitless.exchange/developers/sdk/python/websocket#subscribing-to-markets) Subscribing to Markets --------------------------------------------------------------------------------------------------------------------- After connecting, subscribe to specific markets to receive updates: @ws_client.on("connect") async def on_connect(): await ws_client.subscribe( "subscribe_market_prices", {"marketSlugs": ["btc-above-100k-march-2025"]}, ) print("Subscribed to market prices") The `subscribe()` method takes two arguments: | Parameter | Type | Description | | --- | --- | --- | | `event` | `str` | Subscription event name (e.g. `"subscribe_market_prices"`) | | `data` | `dict` | Subscription parameters including `marketSlugs` | You can subscribe to multiple markets at once by passing a list of slugs in `marketSlugs`. [​](https://docs.limitless.exchange/developers/sdk/python/websocket#auto-reconnect) Auto-Reconnect ----------------------------------------------------------------------------------------------------- When `auto_reconnect` is enabled (the default), the client automatically reconnects after a disconnection: 1. The connection drops (network issue, server restart, etc.) 2. The client waits `reconnect_delay` seconds 3. A new connection is established 4. The `connect` event fires again, so your subscription logic re-executes Place your `subscribe()` calls inside the `connect` handler to ensure subscriptions are restored after every reconnection. [​](https://docs.limitless.exchange/developers/sdk/python/websocket#complete-example) Complete Example --------------------------------------------------------------------------------------------------------- import asyncio from limitless_sdk.websocket import WebSocketClient, WebSocketConfig async def main(): config = WebSocketConfig( url="wss://ws.limitless.exchange", auto_reconnect=True, reconnect_delay=5, ) ws_client = WebSocketClient(config) @ws_client.on("connect") async def on_connect(): print("Connected") await ws_client.subscribe( "subscribe_market_prices", {"marketSlugs": ["btc-above-100k-march-2025"]}, ) @ws_client.on("orderbookUpdate") async def on_orderbook(data): slug = data.get("marketSlug", "unknown") bids = len(data.get("bids", [])) asks = len(data.get("asks", [])) print(f"[{slug}] Orderbook: {bids} bids, {asks} asks") @ws_client.on("newPriceData") async def on_price(data): slug = data.get("marketSlug", "unknown") price = data.get("price", "N/A") print(f"[{slug}] Price: {price}") # Start the WebSocket client (runs until interrupted) await ws_client.connect() asyncio.run(main()) The `await ws_client.connect()` call blocks the event loop until the connection is closed or the program is interrupted. Run it as the last statement in your async function, or use `asyncio.create_task()` if you need to run other coroutines concurrently. [Delegated Orders](https://docs.limitless.exchange/developers/sdk/python/delegated-orders) [Error Handling & Retry](https://docs.limitless.exchange/developers/sdk/python/error-handling) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # API Tokens - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK API Tokens [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Access](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#access) * [Get partner capabilities](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#get-partner-capabilities) * [Derive a token](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#derive-a-token) * [Creating an HMAC-authenticated client](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#creating-an-hmac-authenticated-client) * [List active tokens](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#list-active-tokens) * [Revoke a token](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#revoke-a-token) * [Scope constants](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#scope-constants) The `ApiTokenService` handles the partner self-service token lifecycle: checking capabilities, deriving tokens, listing active tokens, and revoking them. Token derivation and capability queries require a **Privy identity token**. The SDK does not obtain this token for you — your application must authenticate the partner via Privy and pass the resulting token. [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#access) Access ------------------------------------------------------------------------------------------ The service is available on the root `Client`: import { Client } from '@limitless-exchange/sdk'; const client = new Client({ baseURL: 'https://api.limitless.exchange', }); // Use client.apiTokens.* [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#get-partner-capabilities) Get partner capabilities ------------------------------------------------------------------------------------------------------------------------------ Check whether token management is enabled and which scopes are allowed. const capabilities = await client.apiTokens.getCapabilities(identityToken); console.log(capabilities.tokenManagementEnabled); // boolean console.log(capabilities.allowedScopes); // e.g. ['trading', 'account_creation', 'delegated_signing'] [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#derive-a-token) Derive a token ---------------------------------------------------------------------------------------------------------- Create a new scoped API token. The `secret` is returned once — store it securely. import { ScopeTrading, ScopeAccountCreation, ScopeDelegatedSigning } from '@limitless-exchange/sdk'; const derived = await client.apiTokens.deriveToken(identityToken, { label: 'production-bot', scopes: [ScopeTrading, ScopeAccountCreation, ScopeDelegatedSigning], }); // derived.tokenId — used as lmts-api-key header // derived.secret — base64-encoded HMAC secret (one-time) // derived.scopes — granted scopes // derived.profile — { id, account } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#creating-an-hmac-authenticated-client) Creating an HMAC-authenticated client After deriving a token, create a new `Client` with the HMAC credentials: const scopedClient = new Client({ baseURL: 'https://api.limitless.exchange', hmacCredentials: { tokenId: derived.tokenId, secret: derived.secret, }, }); If `scopes` is omitted, the token defaults to `['trading']`. Requested scopes must be a subset of the partner’s `allowedScopes`. [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#list-active-tokens) List active tokens ------------------------------------------------------------------------------------------------------------------ Returns all non-revoked tokens for the authenticated partner. const tokens = await scopedClient.apiTokens.listTokens(); for (const token of tokens) { console.log(token.tokenId, token.label, token.scopes, token.lastUsedAt); } [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#revoke-a-token) Revoke a token ---------------------------------------------------------------------------------------------------------- Immediately invalidates a token. This cannot be undone. const message = await scopedClient.apiTokens.revokeToken(derived.tokenId); [​](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens#scope-constants) Scope constants ------------------------------------------------------------------------------------------------------------ The SDK exports typed scope constants: | Constant | Value | | --- | --- | | `ScopeTrading` | `'trading'` | | `ScopeAccountCreation` | `'account_creation'` | | `ScopeDelegatedSigning` | `'delegated_signing'` | [Portfolio & Positions](https://docs.limitless.exchange/developers/sdk/typescript/portfolio) [Partner Accounts](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # What is Limitless? - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/what-is-limitless#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Get Started What is Limitless? [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/user-guide/what-is-limitless#overview) * [How It Works](https://docs.limitless.exchange/user-guide/what-is-limitless#how-it-works) * [Collateral](https://docs.limitless.exchange/user-guide/what-is-limitless#collateral) * [Key Facts](https://docs.limitless.exchange/user-guide/what-is-limitless#key-facts) [​](https://docs.limitless.exchange/user-guide/what-is-limitless#overview) Overview -------------------------------------------------------------------------------------- Limitless Exchange allows natural language expressions of arbitrary market conditions to be traded freely, creating a forecasting and risk engine for the global economy. Users buy shares in the outcomes — usually “Yes” or “No” — of particular conditions. For example: > Buy “Yes” shares that BTC will reach $65k at **$0.15**, implying a **15% chance** the outcome will be realized, with a potential ROI of **~560%**. That’s because **winning shares expire at $1**, but losing shares are worthless after market resolution. [​](https://docs.limitless.exchange/user-guide/what-is-limitless#how-it-works) How It Works ---------------------------------------------------------------------------------------------- 1. **Pick a market** — Browse live markets on crypto prices, stocks, macro events, and more. 2. **Buy shares** — Purchase “Yes” or “No” shares at the current market price. 3. **Hold or trade** — Trade your position anytime before the market resolves. 4. **Collect winnings** — Winning shares pay out $1.00 each. [​](https://docs.limitless.exchange/user-guide/what-is-limitless#collateral) Collateral ------------------------------------------------------------------------------------------ Prior to market resolution, **1 “Yes” + 1 “No” share** in a particular market can always be redeemed for **1 collateral token**. The collateral token is the cryptocurrency locked in an onchain smart contract to issue outcome shares — currently **USDC**. [​](https://docs.limitless.exchange/user-guide/what-is-limitless#key-facts) Key Facts ---------------------------------------------------------------------------------------- | Stat | Detail | | --- | --- | | **Chain** | Base (Ethereum L2) | | **Volume** | $1B+ traded | | **Collateral** | USDC | | **Market types** | Hourly, daily, weekly, and custom | Join the community ------------------ Chat with traders and the Limitless team on Discord. [Introduction](https://docs.limitless.exchange/) [Making Your First Trade](https://docs.limitless.exchange/user-guide/making-your-first-trade) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Wallet Types - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/user-guide/wallet-types#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Get Started Wallet Types [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Externally Owned Account (EOA)](https://docs.limitless.exchange/user-guide/wallet-types#externally-owned-account-eoa) * [Embedded Wallet](https://docs.limitless.exchange/user-guide/wallet-types#embedded-wallet) * [Smart Wallet](https://docs.limitless.exchange/user-guide/wallet-types#smart-wallet) * [Summary](https://docs.limitless.exchange/user-guide/wallet-types#summary) Limitless supports three wallet types: **Externally Owned Accounts (EOA)**, **Embedded Wallets**, and **Smart Wallets**. Each type has different characteristics and tradeoffs for users. [​](https://docs.limitless.exchange/user-guide/wallet-types#externally-owned-account-eoa) Externally Owned Account (EOA) --------------------------------------------------------------------------------------------------------------------------- An **Externally Owned Account (EOA)** is a blockchain account controlled by a user via a private key. The private key is a secret value used to sign transactions. It must be kept secure and never shared. **Common EOA wallet interfaces:** [MetaMask](https://metamask.io/) , [Rainbow](https://rainbow.me/en/) , [Coinbase Wallet](https://www.coinbase.com/en-pt/wallet) , [Rabby](https://rabby.io/) , and similar browser extensions or mobile apps. **On Limitless:** Users connect an EOA from the main login menu. For every on-chain transaction, the user must approve it in their wallet interface (e.g., MetaMask). ![Login screen showing MetaMask, Rabby Wallet, Coinbase Wallet, and other wallet options](https://mintcdn.com/limitless/VbnV5F8A0yVOqKhe/images/externally-owned-accounts.png?w=2500&fit=max&auto=format&n=VbnV5F8A0yVOqKhe&q=85&s=52988d985b52c3e1987972eb07a883f1) [​](https://docs.limitless.exchange/user-guide/wallet-types#embedded-wallet) Embedded Wallet ----------------------------------------------------------------------------------------------- An **Embedded Wallet** is a non-custodial wallet created and operated within an application by a third-party provider, without a separate wallet app. **On Limitless:** When users sign in via social login (e.g., Google, Twitter), an embedded wallet is created automatically after authentication. Transactions can be executed directly from the app without an extra approval step in an external wallet. ![Login screen showing email, Google, Discord, and Farcaster sign-in options](https://mintcdn.com/limitless/VbnV5F8A0yVOqKhe/images/embedded-wallets.png?w=2500&fit=max&auto=format&n=VbnV5F8A0yVOqKhe&q=85&s=f076d2341664c87466aac7b7e9bf605b) [​](https://docs.limitless.exchange/user-guide/wallet-types#smart-wallet) Smart Wallet ----------------------------------------------------------------------------------------- A **Smart Wallet** is an account implemented as a smart contract on-chain. It supports features such as: * Account recovery * Programmable logic for custom behavior * Gas fee abstraction and batched transactions **On Limitless:** Smart wallets are used primarily to remove the need for users to hold native tokens (e.g., ETH) to pay transaction fees. Users sign in via social login, and a smart wallet instance is created based on their embedded wallet. Transaction fees are sponsored by Limitless, while users only need to hold **USDC** for trading activity. [​](https://docs.limitless.exchange/user-guide/wallet-types#summary) Summary ------------------------------------------------------------------------------- | Wallet Type | Created When | Fee Responsibility | User Experience | | --- | --- | --- | --- | | **EOA** | External wallet connection | User pays gas in ETH | Requires approval per transaction in external wallet | | **Embedded** | Social login | User pays gas in ETH | In-app transactions; no external approval step | | **Smart** | Social login (from embedded wallet) | Platform sponsors gas | Users hold only USDC; no native token needed for fees | [Making Your First Trade](https://docs.limitless.exchange/user-guide/making-your-first-trade) [CLOB Overview](https://docs.limitless.exchange/user-guide/clob-overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Portfolio & Positions - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/portfolio#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Portfolio & Positions [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/portfolio#overview) * [Setup](https://docs.limitless.exchange/developers/sdk/python/portfolio#setup) * [Fetching Positions](https://docs.limitless.exchange/developers/sdk/python/portfolio#fetching-positions) * [Iterating CLOB Positions](https://docs.limitless.exchange/developers/sdk/python/portfolio#iterating-clob-positions) * [Complete Example](https://docs.limitless.exchange/developers/sdk/python/portfolio#complete-example) [​](https://docs.limitless.exchange/developers/sdk/python/portfolio#overview) Overview ----------------------------------------------------------------------------------------- The `PortfolioFetcher` class retrieves your open positions and portfolio data from the Limitless Exchange API. It requires an authenticated `HttpClient` with a valid API key. [​](https://docs.limitless.exchange/developers/sdk/python/portfolio#setup) Setup ----------------------------------------------------------------------------------- from limitless_sdk.api import HttpClient from limitless_sdk.portfolio import PortfolioFetcher http_client = HttpClient() # loads LIMITLESS_API_KEY from env portfolio = PortfolioFetcher(http_client) `PortfolioFetcher` requires an authenticated client. Ensure your API key is set via the `LIMITLESS_API_KEY` environment variable or the `api_key` parameter on `HttpClient`. [​](https://docs.limitless.exchange/developers/sdk/python/portfolio#fetching-positions) Fetching Positions ------------------------------------------------------------------------------------------------------------- Use `get_positions()` to retrieve all your open positions: positions = await portfolio.get_positions() The response is a dictionary with the following top-level keys: | Key | Type | Description | | --- | --- | --- | | `clob` | `list[dict]` | Positions on CLOB (order book) markets | | `amm` | `list[dict]` | Positions on AMM (automated market maker) markets | | `accumulativePoints` | `dict` | Accumulated points and rewards data | [​](https://docs.limitless.exchange/developers/sdk/python/portfolio#iterating-clob-positions) Iterating CLOB Positions ------------------------------------------------------------------------------------------------------------------------- Each entry in the `clob` list contains the market details and your position size: positions = await portfolio.get_positions() for pos in positions.get("clob", []): market_title = pos["market"]["title"] size = pos["size"] outcome = pos.get("outcomeIndex", "N/A") print(f"{market_title} — size: {size}, outcome index: {outcome}") Example response structure { "clob": [\ {\ "market": {\ "title": "BTC above 100k by March 2025?",\ "slug": "btc-above-100k-march-2025",\ },\ "size": "15.5",\ "outcomeIndex": 0,\ # ... additional fields\ },\ # ... more positions\ ], "amm": [\ # ... AMM positions\ ], "accumulativePoints": { # ... points data }, } The `PortfolioFetcher` returns **raw API responses** without heavy parsing or transformation. Field names and types match the REST API directly. Refer to the [API Reference](https://docs.limitless.exchange/api-reference/portfolio/positions) for the complete response schema. [​](https://docs.limitless.exchange/developers/sdk/python/portfolio#complete-example) Complete Example --------------------------------------------------------------------------------------------------------- import asyncio from limitless_sdk.api import HttpClient from limitless_sdk.portfolio import PortfolioFetcher async def main(): http_client = HttpClient() portfolio = PortfolioFetcher(http_client) positions = await portfolio.get_positions() clob_positions = positions.get("clob", []) amm_positions = positions.get("amm", []) print(f"CLOB positions: {len(clob_positions)}") for pos in clob_positions: print(f" {pos['market']['title']} — size: {pos['size']}") print(f"\nAMM positions: {len(amm_positions)}") for pos in amm_positions: print(f" {pos['market']['title']} — size: {pos['size']}") points = positions.get("accumulativePoints", {}) print(f"\nAccumulative points: {points}") await http_client.close() asyncio.run(main()) [Trading & Orders](https://docs.limitless.exchange/developers/sdk/python/orders) [API Tokens](https://docs.limitless.exchange/developers/sdk/python/api-tokens) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Markets - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/markets#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Markets [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/markets#overview) * [Setup](https://docs.limitless.exchange/developers/sdk/python/markets#setup) * [Fetching Active Markets](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-active-markets) * [Fetching a Single Market](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-a-single-market) * [Fetching the Orderbook](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-the-orderbook) * [Venue Caching](https://docs.limitless.exchange/developers/sdk/python/markets#venue-caching) * [Debugging Venue Cache](https://docs.limitless.exchange/developers/sdk/python/markets#debugging-venue-cache) * [Complete Example](https://docs.limitless.exchange/developers/sdk/python/markets#complete-example) [​](https://docs.limitless.exchange/developers/sdk/python/markets#overview) Overview --------------------------------------------------------------------------------------- The `MarketFetcher` class handles market discovery, individual market lookups, and orderbook retrieval. It also automatically caches venue contract addresses needed for order signing. [​](https://docs.limitless.exchange/developers/sdk/python/markets#setup) Setup --------------------------------------------------------------------------------- from limitless_sdk.api import HttpClient from limitless_sdk.markets import MarketFetcher http_client = HttpClient() # loads LIMITLESS_API_KEY from env market_fetcher = MarketFetcher(http_client) [​](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-active-markets) Fetching Active Markets --------------------------------------------------------------------------------------------------------------------- Use `get_active_markets()` to retrieve a paginated list of all active markets: params = { "page": 1, "limit": 10, "sortBy": "volume", } result = await market_fetcher.get_active_markets(params) for market in result["data"]: print(market["title"], market["slug"]) | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `page` | `int` | `1` | Page number for pagination | | `limit` | `int` | `10` | Number of markets per page | | `sortBy` | `str` | `"volume"` | Sort order (e.g. `"volume"`, `"createdAt"`) | Use pagination parameters to avoid large responses. Start with a small `limit` and increment `page` as needed. [​](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-a-single-market) Fetching a Single Market ----------------------------------------------------------------------------------------------------------------------- Use `get_market(slug)` to retrieve full details for a specific market: market = await market_fetcher.get_market("btc-above-100k-march-2025") print(market.title) print("YES token:", market.tokens.yes) print("NO token:", market.tokens.no) print("Exchange:", market.venue.exchange) print("Adapter:", market.venue.adapter) The returned `Market` object is a Pydantic model with the following key fields: | Field | Type | Description | | --- | --- | --- | | `title` | `str` | Human-readable market title | | `slug` | `str` | URL-friendly market identifier | | `tokens.yes` | `str` | Token ID for the YES outcome | | `tokens.no` | `str` | Token ID for the NO outcome | | `venue.exchange` | `str` | Exchange contract address (used as EIP-712 `verifyingContract`) | | `venue.adapter` | `str` | Adapter contract address (used for NegRisk token approvals) | | `open_interest` | `str \| None` | Open interest value | | `liquidity` | `str \| None` | Liquidity value | | `image_url` | `str \| None` | Market image URL | | `automation_type` | `str \| None` | Market automation type (`"manual"`, `"lumy"`, or `"sports"`) | | `position_ids` | `list[str] \| None` | Position IDs (alternative to `tokens.yes` / `tokens.no`) | Token IDs are returned as **strings**. Pass them directly to `OrderClient.create_order()` as `token_id`. [​](https://docs.limitless.exchange/developers/sdk/python/markets#fetching-the-orderbook) Fetching the Orderbook ------------------------------------------------------------------------------------------------------------------- Use `get_orderbook(slug)` to retrieve current bids and asks for a market: orderbook = await market_fetcher.get_orderbook("btc-above-100k-march-2025") print("Bids:") for bid in orderbook["bids"]: print(f" Price: {bid['price']} Size: {bid['size']}") print("Asks:") for ask in orderbook["asks"]: print(f" Price: {ask['price']} Size: {ask['size']}") [​](https://docs.limitless.exchange/developers/sdk/python/markets#venue-caching) Venue Caching ------------------------------------------------------------------------------------------------- Every call to `get_market()` automatically caches the venue contract addresses (exchange and adapter) for that market. The `OrderClient` reads from this cache when signing orders, so you do not need to manage venues manually. 1 [](https://docs.limitless.exchange/developers/sdk/python/markets#) Fetch the market Calling `get_market(slug)` retrieves and caches the venue: market = await market_fetcher.get_market("btc-above-100k-march-2025") # Venue is now cached for this slug 2 [](https://docs.limitless.exchange/developers/sdk/python/markets#) Place an order The `OrderClient` automatically looks up the cached venue when you pass `market_slug`: await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) You **must** call `get_market(slug)` at least once before placing orders on that market. Without a cached venue, the `OrderClient` cannot determine the correct `verifyingContract` for EIP-712 signing. [​](https://docs.limitless.exchange/developers/sdk/python/markets#debugging-venue-cache) Debugging Venue Cache ----------------------------------------------------------------------------------------------------------------- Enable `DEBUG` logging to see venue cache operations: from limitless_sdk.types import ConsoleLogger, LogLevel logger = ConsoleLogger(level=LogLevel.DEBUG) # Output will include lines like: # [DEBUG] Venue cached for btc-above-100k-march-2025: exchange=0xA1b2... adapter=0xD4e5... # [DEBUG] Venue cache hit for btc-above-100k-march-2025 [​](https://docs.limitless.exchange/developers/sdk/python/markets#complete-example) Complete Example ------------------------------------------------------------------------------------------------------- import asyncio from limitless_sdk.api import HttpClient from limitless_sdk.markets import MarketFetcher async def main(): http_client = HttpClient() market_fetcher = MarketFetcher(http_client) # List active markets active = await market_fetcher.get_active_markets({"limit": 5}) for m in active["data"]: print(f"{m['title']} — {m['slug']}") # Get a specific market slug = active["data"][0]["slug"] market = await market_fetcher.get_market(slug) print(f"\nMarket: {market.title}") print(f"YES token: {market.tokens.yes}") print(f"NO token: {market.tokens.no}") # Fetch the orderbook orderbook = await market_fetcher.get_orderbook(slug) print(f"\nOrderbook — {len(orderbook['bids'])} bids, {len(orderbook['asks'])} asks") await http_client.close() asyncio.run(main()) [Python SDK](https://docs.limitless.exchange/developers/sdk/python/getting-started) [Market Pages](https://docs.limitless.exchange/developers/sdk/python/market-pages) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Pages - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/market-pages#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Market Pages [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/market-pages#overview) * [Setup](https://docs.limitless.exchange/developers/sdk/python/market-pages#setup) * [Navigation Tree](https://docs.limitless.exchange/developers/sdk/python/market-pages#navigation-tree) * [NavigationNode Fields](https://docs.limitless.exchange/developers/sdk/python/market-pages#navigationnode-fields) * [Resolving a Page by Path](https://docs.limitless.exchange/developers/sdk/python/market-pages#resolving-a-page-by-path) * [MarketPage Fields](https://docs.limitless.exchange/developers/sdk/python/market-pages#marketpage-fields) * [Fetching Markets for a Page](https://docs.limitless.exchange/developers/sdk/python/market-pages#fetching-markets-for-a-page) * [Offset Pagination](https://docs.limitless.exchange/developers/sdk/python/market-pages#offset-pagination) * [Cursor Pagination](https://docs.limitless.exchange/developers/sdk/python/market-pages#cursor-pagination) * [Filtering](https://docs.limitless.exchange/developers/sdk/python/market-pages#filtering) * [Parameters](https://docs.limitless.exchange/developers/sdk/python/market-pages#parameters) * [Sort Options](https://docs.limitless.exchange/developers/sdk/python/market-pages#sort-options) * [Property Keys](https://docs.limitless.exchange/developers/sdk/python/market-pages#property-keys) * [Single Key and Options](https://docs.limitless.exchange/developers/sdk/python/market-pages#single-key-and-options) * [PropertyKey Fields](https://docs.limitless.exchange/developers/sdk/python/market-pages#propertykey-fields) * [Complete Example](https://docs.limitless.exchange/developers/sdk/python/market-pages#complete-example) [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#overview) Overview -------------------------------------------------------------------------------------------- The `MarketPageFetcher` class provides access to the Market Navigation API — a hierarchical system for browsing markets by category, applying dynamic filters, and paginating results. All endpoints are public and require no authentication. [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#setup) Setup -------------------------------------------------------------------------------------- from limitless_sdk.api import HttpClient from limitless_sdk.market_pages import MarketPageFetcher http_client = HttpClient(base_url="https://api.limitless.exchange") page_fetcher = MarketPageFetcher(http_client) [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#navigation-tree) Navigation Tree ---------------------------------------------------------------------------------------------------------- Fetch the full navigation hierarchy. Each node represents a browseable category with a URL path. navigation = await page_fetcher.get_navigation() for node in navigation: print(f"{node.name} → {node.path}") for child in node.children: print(f" {child.name} → {child.path}") ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#navigationnode-fields) NavigationNode Fields | Field | Type | Description | | --- | --- | --- | | `id` | `str` | Unique identifier | | `name` | `str` | Display name | | `slug` | `str` | URL-friendly identifier | | `path` | `str` | Full URL path (e.g. `/crypto`) | | `icon` | `str \| None` | Optional icon name | | `children` | `list[NavigationNode]` | Nested child nodes | [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#resolving-a-page-by-path) Resolving a Page by Path ---------------------------------------------------------------------------------------------------------------------------- Convert a URL path into a `MarketPage` with its filters, metadata, and breadcrumb. The SDK handles 301 redirects internally. page = await page_fetcher.get_market_page_by_path("/crypto") print(f"Page: {page.name}") print(f"Filters: {len(page.filter_groups)} groups") print(f"Breadcrumb: {' > '.join(b.name for b in page.breadcrumb)}") ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#marketpage-fields) MarketPage Fields | Field | Type | Description | | --- | --- | --- | | `id` | `str` | Page identifier (used for `get_markets()`) | | `name` | `str` | Display name | | `slug` | `str` | URL-friendly identifier | | `full_path` | `str` | Full URL path | | `description` | `str \| None` | Page description | | `base_filter` | `dict` | Default filter applied to this page | | `filter_groups` | `list[FilterGroup]` | Available filter groups | | `metadata` | `dict` | Page metadata | | `breadcrumb` | `list[BreadcrumbItem]` | Navigation breadcrumb | [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#fetching-markets-for-a-page) Fetching Markets for a Page ---------------------------------------------------------------------------------------------------------------------------------- Use `get_markets()` with the page ID to fetch markets. Supports offset and cursor pagination, sorting, and dynamic filters. ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#offset-pagination) Offset Pagination result = await page_fetcher.get_markets(page.id, { "page": 1, "limit": 20, "sort": "-updatedAt", }) for market in result.data: print(f"{market.slug} — {market.title}") print(f"Page {result.pagination.page} of {result.pagination.total_pages}") ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#cursor-pagination) Cursor Pagination first_page = await page_fetcher.get_markets(page.id, { "cursor": "", "limit": 20, "sort": "-updatedAt", }) for market in first_page.data: print(market.slug) if first_page.cursor.next_cursor: next_page = await page_fetcher.get_markets(page.id, { "cursor": first_page.cursor.next_cursor, "limit": 20, }) You cannot use `cursor` and `page` in the same request. Choose one pagination strategy. ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#filtering) Filtering Pass a `filters` dictionary. Values can be a single string or a list for multi-select filters. # Single filter result = await page_fetcher.get_markets(page.id, { "filters": {"ticker": "btc"}, }) # Multiple values (OR logic) result = await page_fetcher.get_markets(page.id, { "filters": {"ticker": ["btc", "eth"]}, }) # Combined filters result = await page_fetcher.get_markets(page.id, { "limit": 10, "sort": "-updatedAt", "filters": { "ticker": ["btc", "eth"], "duration": "hourly", }, }) ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#parameters) Parameters | Parameter | Type | Description | | --- | --- | --- | | `page` | `int` | Page number (offset pagination) | | `limit` | `int` | Results per page | | `sort` | `str` | Sort field with optional `-` prefix for descending | | `cursor` | `str` | Cursor token (cursor pagination). Use `""` for the first request. | | `filters` | `dict` | Filter key-value pairs. Values can be `str` or `list[str]`. | ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#sort-options) Sort Options | Value | Description | | --- | --- | | `createdAt` / `-createdAt` | Sort by creation date (ascending / descending) | | `updatedAt` / `-updatedAt` | Sort by last update | | `deadline` / `-deadline` | Sort by expiration deadline | | `id` / `-id` | Sort by market ID | [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#property-keys) Property Keys ------------------------------------------------------------------------------------------------------ Property keys define the available filter dimensions (e.g. “ticker”, “duration”). Each key has a set of options. # List all property keys keys = await page_fetcher.get_property_keys() for key in keys: print(f"{key.name} ({key.type})") if key.options: for opt in key.options[:3]: print(f" {opt.label}: {opt.value}") ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#single-key-and-options) Single Key and Options key = await page_fetcher.get_property_key(keys[0].id) print(f"{key.name} — {len(key.options or [])} options") # Fetch options separately (supports parent filtering for hierarchical keys) options = await page_fetcher.get_property_options(key.id) # Child options filtered by parent child_options = await page_fetcher.get_property_options(key.id, parent_id=options[0].id) ### [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#propertykey-fields) PropertyKey Fields | Field | Type | Description | | --- | --- | --- | | `id` | `str` | Unique identifier | | `name` | `str` | Display name | | `slug` | `str` | URL-friendly identifier | | `type` | `str` | `"select"` or `"multi-select"` | | `is_system` | `bool` | Whether this is a system-defined key | | `options` | `list[PropertyOption] \| None` | Available options (when fetched inline) | | `metadata` | `dict` | Key metadata | | `created_at` | `str` | ISO 8601 creation timestamp | | `updated_at` | `str` | ISO 8601 last update timestamp | [​](https://docs.limitless.exchange/developers/sdk/python/market-pages#complete-example) Complete Example ------------------------------------------------------------------------------------------------------------ import asyncio from limitless_sdk.api import HttpClient from limitless_sdk.market_pages import MarketPageFetcher async def main(): http_client = HttpClient(base_url="https://api.limitless.exchange") page_fetcher = MarketPageFetcher(http_client) # Browse the navigation tree navigation = await page_fetcher.get_navigation() print(f"Top-level categories: {len(navigation)}") # Resolve a page page = await page_fetcher.get_market_page_by_path("/crypto") print(f"\nPage: {page.name}") print(f"Available filters: {[fg.name for fg in page.filter_groups]}") # Fetch markets with filters result = await page_fetcher.get_markets(page.id, { "limit": 5, "sort": "-updatedAt", "filters": {"ticker": ["btc", "eth"]}, }) for market in result.data: print(f" {market.slug} — {market.title}") # Explore property keys keys = await page_fetcher.get_property_keys() for key in keys: print(f"\n{key.name} ({key.type}):") options = await page_fetcher.get_property_options(key.id) for opt in options[:5]: print(f" {opt.label}") await http_client.close() asyncio.run(main()) [Markets](https://docs.limitless.exchange/developers/sdk/python/markets) [Trading & Orders](https://docs.limitless.exchange/developers/sdk/python/orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Partner Accounts - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Partner Accounts [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Access](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#access) * [Server wallet mode](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#server-wallet-mode) * [EOA mode](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#eoa-mode) * [Validation](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#validation) The `PartnerAccountService` creates sub-account profiles linked to the authenticated partner. Requires HMAC authentication with the `account_creation` scope. [​](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#access) Access ------------------------------------------------------------------------------------------------ import { Client } from '@limitless-exchange/sdk'; const client = new Client({ baseURL: 'https://api.limitless.exchange', hmacCredentials: { tokenId, secret }, }); // Use client.partnerAccounts.* [​](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#server-wallet-mode) Server wallet mode ------------------------------------------------------------------------------------------------------------------------ Creates a managed Privy wallet for the sub-account. Enables [delegated signing](https://docs.limitless.exchange/developers/programmatic-api#sub-account-modes) — the partner submits unsigned orders and the server signs them. const account = await client.partnerAccounts.createAccount({ displayName: 'user-alice', createServerWallet: true, }); console.log(account.profileId); // numeric profile ID console.log(account.account); // wallet address New server wallets need the backend allowance provisioning to complete before the first delegated trade. A short delay (a few seconds) is typical. [​](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#eoa-mode) EOA mode ---------------------------------------------------------------------------------------------------- Creates a profile for an externally-owned address. The end user manages their own keys and signs orders themselves. EOA mode requires wallet ownership verification headers: const account = await client.partnerAccounts.createAccount( { displayName: 'user-bob', }, { account: '0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed', signingMessage: '0x...', signature: '0x...', }, ); | Header | Description | | --- | --- | | `account` | Checksummed Ethereum address (EIP-55) | | `signingMessage` | Hex-encoded signing message | | `signature` | Hex-encoded signature from the wallet | [​](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts#validation) Validation -------------------------------------------------------------------------------------------------------- * `displayName` is optional, max 44 characters. Defaults to the wallet address if omitted. * Returns `409 Conflict` if a profile already exists for the target address. * Cannot create a sub-account for the partner’s own address. * The SDK validates `displayName` length locally before sending the request. [API Tokens](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens) [Delegated Orders](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Trading & Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Trading & Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/orders#overview) * [Prerequisites](https://docs.limitless.exchange/developers/sdk/python/orders#prerequisites) * [Token Approvals](https://docs.limitless.exchange/developers/sdk/python/orders#token-approvals) * [GTC Orders (Good-Till-Cancelled)](https://docs.limitless.exchange/developers/sdk/python/orders#gtc-orders-good-till-cancelled) * [Post-only GTC order](https://docs.limitless.exchange/developers/sdk/python/orders#post-only-gtc-order) * [FOK Orders (Fill-or-Kill)](https://docs.limitless.exchange/developers/sdk/python/orders#fok-orders-fill-or-kill) * [Cancelling Orders](https://docs.limitless.exchange/developers/sdk/python/orders#cancelling-orders) * [Enums Reference](https://docs.limitless.exchange/developers/sdk/python/orders#enums-reference) * [Side](https://docs.limitless.exchange/developers/sdk/python/orders#side) * [OrderType](https://docs.limitless.exchange/developers/sdk/python/orders#ordertype) * [Error Handling](https://docs.limitless.exchange/developers/sdk/python/orders#error-handling) * [Complete Example](https://docs.limitless.exchange/developers/sdk/python/orders#complete-example) [​](https://docs.limitless.exchange/developers/sdk/python/orders#overview) Overview -------------------------------------------------------------------------------------- The `OrderClient` handles order creation, EIP-712 signing, and order management. It supports both Good-Till-Cancelled (GTC) limit orders and Fill-or-Kill (FOK) market orders. [​](https://docs.limitless.exchange/developers/sdk/python/orders#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------ Before placing orders, you need four components: import asyncio from eth_account import Account from limitless_sdk.api import HttpClient from limitless_sdk.markets import MarketFetcher from limitless_sdk.orders import OrderClient from limitless_sdk.types import Side, OrderType http_client = HttpClient() # loads LIMITLESS_API_KEY from env account = Account.from_key("0xYOUR_PRIVATE_KEY") market_fetcher = MarketFetcher(http_client) order_client = OrderClient(http_client, account) | Component | Purpose | | --- | --- | | `HttpClient` | Authenticated HTTP client for API requests | | `Account` | eth-account wallet for EIP-712 order signing | | `MarketFetcher` | Fetches market data and caches venue addresses | | `OrderClient` | Creates, signs, and submits orders | The `OrderClient` constructor automatically fetches your user profile data (`userData`) from the API. This is used to populate the `ownerId` field on submitted orders. [​](https://docs.limitless.exchange/developers/sdk/python/orders#token-approvals) Token Approvals ---------------------------------------------------------------------------------------------------- Before your first trade on a given venue, you must approve the exchange contracts to spend your tokens. This is a **one-time on-chain setup** per venue. * Standard CLOB * NegRisk For standard CLOB markets, approve USDC and Conditional Tokens to the **exchange** contract: from web3 import Web3 w3 = Web3(Web3.HTTPProvider("https://mainnet.base.org")) USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" CT_ADDRESS = "0xC9c98965297Bc527861c898329Ee280632B76e18" # Conditional Token framework address market = await market_fetcher.get_market("your-market-slug") exchange = market.venue.exchange # Approve USDC for BUY orders usdc_contract = w3.eth.contract( address=Web3.to_checksum_address(USDC_ADDRESS), abi=[{\ "name": "approve",\ "type": "function",\ "inputs": [\ {"name": "spender", "type": "address"},\ {"name": "amount", "type": "uint256"},\ ],\ "outputs": [{"name": "", "type": "bool"}],\ }], ) tx = usdc_contract.functions.approve( Web3.to_checksum_address(exchange), 2**256 - 1, # max approval ).build_transaction({ "from": account.address, "nonce": w3.eth.get_transaction_count(account.address), }) signed = w3.eth.account.sign_transaction(tx, account.key) w3.eth.send_raw_transaction(signed.raw_transaction) # Approve Conditional Tokens for SELL orders ct_contract = w3.eth.contract( address=Web3.to_checksum_address(CT_ADDRESS), abi=[{\ "name": "setApprovalForAll",\ "type": "function",\ "inputs": [\ {"name": "operator", "type": "address"},\ {"name": "approved", "type": "bool"},\ ],\ "outputs": [],\ }], ) tx = ct_contract.functions.setApprovalForAll( Web3.to_checksum_address(exchange), True, ).build_transaction({ "from": account.address, "nonce": w3.eth.get_transaction_count(account.address), }) signed = w3.eth.account.sign_transaction(tx, account.key) w3.eth.send_raw_transaction(signed.raw_transaction) For NegRisk markets, you must additionally approve the **adapter** contract: market = await market_fetcher.get_market("your-negrisk-slug") exchange = market.venue.exchange adapter = market.venue.adapter # 1. Approve USDC to the exchange (same as CLOB) # ... (see Standard CLOB tab) # 2. Approve Conditional Tokens to the exchange # ... (see Standard CLOB tab) # 3. Approve Conditional Tokens to the adapter (NegRisk only) tx = ct_contract.functions.setApprovalForAll( Web3.to_checksum_address(adapter), True, ).build_transaction({ "from": account.address, "nonce": w3.eth.get_transaction_count(account.address), }) signed = w3.eth.account.sign_transaction(tx, account.key) w3.eth.send_raw_transaction(signed.raw_transaction) Approvals are on-chain transactions that cost gas. You only need to perform them once per venue. Use `venue.exchange` for both CLOB and NegRisk, and additionally `venue.adapter` for NegRisk markets. [​](https://docs.limitless.exchange/developers/sdk/python/orders#gtc-orders-good-till-cancelled) GTC Orders (Good-Till-Cancelled) ------------------------------------------------------------------------------------------------------------------------------------ GTC orders remain on the orderbook until filled or explicitly cancelled. Specify `price` (in dollars) and `size` (number of shares): market = await market_fetcher.get_market("btc-above-100k-march-2025") result = await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) print("Order placed:", result) ### [​](https://docs.limitless.exchange/developers/sdk/python/orders#post-only-gtc-order) Post-only GTC order Use `post_only=True` to ensure your order is never filled immediately as a taker. If the order would cross the spread (i.e., match against existing orders), it is **rejected** instead. This guarantees you always receive maker fees. result = await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", post_only=True, ) | Parameter | Type | Description | | --- | --- | --- | | `token_id` | `str` | Token ID from `market.tokens.yes` or `market.tokens.no` | | `price` | `float` | Price per share in dollars (0.01 to 0.99) | | `size` | `float` | Number of shares to buy or sell | | `side` | `Side` | `Side.BUY` or `Side.SELL` | | `order_type` | `OrderType` | `OrderType.GTC` | | `market_slug` | `str` | Market slug for venue lookup | | `post_only` | `bool` | Optional. When `True`, rejects the order if it would immediately match. Default `False`. | [​](https://docs.limitless.exchange/developers/sdk/python/orders#fok-orders-fill-or-kill) FOK Orders (Fill-or-Kill) ---------------------------------------------------------------------------------------------------------------------- FOK orders execute immediately and fully, or are rejected entirely. Instead of `price` and `size`, you specify `maker_amount`: * FOK BUY * FOK SELL When buying, `maker_amount` is the **total USDC you want to spend**. The exchange fills as many shares as possible at the best available price: result = await order_client.create_order( token_id=market.tokens.yes, maker_amount=10.0, # spend 10 USDC side=Side.BUY, order_type=OrderType.FOK, market_slug="btc-above-100k-march-2025", ) When selling, `maker_amount` is the **number of shares to sell**. The exchange returns USDC at the best available price: result = await order_client.create_order( token_id=market.tokens.yes, maker_amount=10.0, # sell 10 shares side=Side.SELL, order_type=OrderType.FOK, market_slug="btc-above-100k-march-2025", ) [​](https://docs.limitless.exchange/developers/sdk/python/orders#cancelling-orders) Cancelling Orders -------------------------------------------------------------------------------------------------------- * Cancel a single order * Cancel all orders on a market Cancel a specific order by its ID: await order_client.cancel(order_id="abc123-def456") Cancel every open order you have on a given market: await order_client.cancel_all(market_slug="btc-above-100k-march-2025") [​](https://docs.limitless.exchange/developers/sdk/python/orders#enums-reference) Enums Reference ---------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/sdk/python/orders#side) Side | Value | Description | | --- | --- | | `Side.BUY` | Buy shares with USDC | | `Side.SELL` | Sell shares for USDC | ### [​](https://docs.limitless.exchange/developers/sdk/python/orders#ordertype) OrderType | Value | Description | | --- | --- | | `OrderType.GTC` | Good-Till-Cancelled limit order (rests on the book) | | `OrderType.FOK` | Fill-or-Kill market order (fills immediately or rejects) | [​](https://docs.limitless.exchange/developers/sdk/python/orders#error-handling) Error Handling -------------------------------------------------------------------------------------------------- The SDK raises `APIError` for non-2xx responses. Always wrap order calls in try/except: from limitless_sdk.api import APIError try: result = await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) except APIError as e: print(f"Order failed — status {e.status_code}: {e.message}") See [Error Handling & Retry](https://docs.limitless.exchange/developers/sdk/python/error-handling) for details on `APIError` fields and the `@retry_on_errors` decorator. [​](https://docs.limitless.exchange/developers/sdk/python/orders#complete-example) Complete Example ------------------------------------------------------------------------------------------------------ import asyncio from eth_account import Account from limitless_sdk.api import HttpClient, APIError from limitless_sdk.markets import MarketFetcher from limitless_sdk.orders import OrderClient from limitless_sdk.types import Side, OrderType async def main(): http_client = HttpClient() account = Account.from_key("0xYOUR_PRIVATE_KEY") market_fetcher = MarketFetcher(http_client) order_client = OrderClient(http_client, account) try: # Fetch market (caches venue automatically) market = await market_fetcher.get_market("btc-above-100k-march-2025") # Place a GTC BUY order for 10 YES shares at $0.65 result = await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) print("GTC order placed:", result) # Place a FOK BUY order spending 5 USDC fok_result = await order_client.create_order( token_id=market.tokens.yes, maker_amount=5.0, side=Side.BUY, order_type=OrderType.FOK, market_slug="btc-above-100k-march-2025", ) print("FOK order placed:", fok_result) # Cancel all orders on this market await order_client.cancel_all(market_slug="btc-above-100k-march-2025") print("All orders cancelled") except APIError as e: print(f"API error — status {e.status_code}: {e.message}") finally: await http_client.close() asyncio.run(main()) Always call `await http_client.close()` when finished. Failing to close the client can leave open connections and cause resource leaks. [Market Pages](https://docs.limitless.exchange/developers/sdk/python/market-pages) [Portfolio & Positions](https://docs.limitless.exchange/developers/sdk/python/portfolio) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Venue System - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/venue-system#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Getting Started Venue System [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/venue-system#overview) * [How It Works](https://docs.limitless.exchange/developers/venue-system#how-it-works) * [Venue Response](https://docs.limitless.exchange/developers/venue-system#venue-response) * [Required Token Approvals](https://docs.limitless.exchange/developers/venue-system#required-token-approvals) [​](https://docs.limitless.exchange/developers/venue-system#overview) Overview --------------------------------------------------------------------------------- CLOB markets use a **venue system** where each market is associated with specific contract addresses. Before placing orders, you must fetch venue data for the market. [​](https://docs.limitless.exchange/developers/venue-system#how-it-works) How It Works ----------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/developers/venue-system#) Fetch market data `GET /markets/:slug` returns venue information for the market. 2 [](https://docs.limitless.exchange/developers/venue-system#) Use venue.exchange This address is the `verifyingContract` for EIP-712 order signing. 3 [](https://docs.limitless.exchange/developers/venue-system#) Cache the venue Venue data is **static** per market — fetch once and reuse. [​](https://docs.limitless.exchange/developers/venue-system#venue-response) Venue Response --------------------------------------------------------------------------------------------- { "venue": { "exchange": "0xA1b2C3...", "adapter": "0xD4e5F6..." } } [​](https://docs.limitless.exchange/developers/venue-system#required-token-approvals) Required Token Approvals ----------------------------------------------------------------------------------------------------------------- Before trading, set up token approvals based on your order type: | Order Type | Market Type | Approve To | | --- | --- | --- | | **BUY** | All CLOB | USDC → `venue.exchange` | | **SELL** | Simple CLOB | Conditional Tokens → `venue.exchange` | | **SELL** | NegRisk / Grouped | Conditional Tokens → `venue.exchange` **AND** `venue.adapter` | For NegRisk SELL orders, you must approve to **both** the exchange and the adapter addresses. [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) [EIP-712 Order Signing](https://docs.limitless.exchange/developers/eip712-signing) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Delegated Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Delegated Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Access](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#access) * [Create a GTC delegated order](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-gtc-delegated-order) * [Create a FAK delegated order](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-fak-delegated-order) * [Create a FOK delegated order](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-fok-delegated-order) * [Parameters](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#parameters) * [GTC order args](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#gtc-order-args) * [FAK order args](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#fak-order-args) * [FOK order args](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#fok-order-args) * [Cancel an order](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-an-order) * [Cancel on behalf of a sub-account](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-on-behalf-of-a-sub-account) * [Cancel all orders in a market](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-all-orders-in-a-market) * [Cancel all on behalf of a sub-account](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-all-on-behalf-of-a-sub-account) * [How it works](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#how-it-works) The `DelegatedOrderService` enables partners with the `delegated_signing` scope to place and cancel orders on behalf of their sub-accounts. The server signs orders using the sub-account’s managed Privy wallet — no private key management is needed on the partner side. Delegated signing requires a sub-account created with `createServerWallet: true`. EOA sub-accounts sign their own orders. **Recommended setup:** Store your HMAC credentials (`tokenId` / `secret`) on your backend. Use this SDK server-side to sign partner-authenticated requests. Expose only your own app-specific endpoints to the frontend. Never expose HMAC secrets in browser bundles or client-side storage. [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#access) Access ------------------------------------------------------------------------------------------------ import { Client } from '@limitless-exchange/sdk'; const client = new Client({ baseURL: 'https://api.limitless.exchange', hmacCredentials: { tokenId, secret }, }); // Use client.delegatedOrders.* [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-gtc-delegated-order) Create a GTC delegated order -------------------------------------------------------------------------------------------------------------------------------------------- Builds an unsigned GTC (Good-Til-Cancelled) limit order locally and submits it to `POST /orders` with the `onBehalfOf` profile ID. The server signs the order via the sub-account’s managed wallet. GTC orders remain on the orderbook until filled or explicitly cancelled. import { OrderType, Side } from '@limitless-exchange/sdk'; const response = await client.delegatedOrders.createOrder({ marketSlug: 'btc-100k', orderType: OrderType.GTC, onBehalfOf: partnerAccount.profileId, args: { tokenId: market.tokens.yes, side: Side.BUY, price: 0.55, size: 10, }, }); console.log(response.order.id); Use `postOnly: true` in the args to ensure the order only rests on the book and is never filled immediately as a taker: const response = await client.delegatedOrders.createOrder({ marketSlug: 'btc-100k', orderType: OrderType.GTC, onBehalfOf: partnerAccount.profileId, args: { tokenId: market.tokens.yes, side: Side.BUY, price: 0.55, size: 10, postOnly: true, }, }); [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-fak-delegated-order) Create a FAK delegated order -------------------------------------------------------------------------------------------------------------------------------------------- FAK (Fill-And-Kill) orders use the same `price` and `size` inputs as GTC, but they only consume immediately available liquidity and cancel any unmatched remainder. `postOnly` is not supported for FAK orders. import { OrderType, Side } from '@limitless-exchange/sdk'; const response = await client.delegatedOrders.createOrder({ marketSlug: 'btc-100k', orderType: OrderType.FAK, onBehalfOf: partnerAccount.profileId, args: { tokenId: market.tokens.yes, side: Side.BUY, price: 0.45, size: 10, }, }); if (response.makerMatches?.length) { console.log(`FAK order matched immediately with ${response.makerMatches.length} fill(s)`); } else { console.log('FAK remainder was cancelled.'); } [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#create-a-fok-delegated-order) Create a FOK delegated order -------------------------------------------------------------------------------------------------------------------------------------------- FOK (Fill-Or-Kill) orders execute immediately at the best available price or are cancelled entirely — there are no partial fills. Instead of `price` and `size`, FOK orders use `makerAmount`: * **BUY**: `makerAmount` is the USDC amount to spend (e.g., `50` = spend $50 USDC) * **SELL**: `makerAmount` is the number of shares to sell (e.g., `18.64` = sell 18.64 shares) import { OrderType, Side } from '@limitless-exchange/sdk'; // BUY FOK — spend 1 USDC at market price const buyResponse = await client.delegatedOrders.createOrder({ marketSlug: 'btc-100k', orderType: OrderType.FOK, onBehalfOf: partnerAccount.profileId, feeRateBps: 300, args: { tokenId: market.tokens.yes, side: Side.BUY, makerAmount: 1, }, }); if (buyResponse.makerMatches?.length) { console.log(`FOK order matched with ${buyResponse.makerMatches.length} fill(s)`); } else { console.log('FOK order was not matched — cancelled automatically'); } // SELL FOK — sell 10 shares at market price const sellResponse = await client.delegatedOrders.createOrder({ marketSlug: 'btc-100k', orderType: OrderType.FOK, onBehalfOf: partnerAccount.profileId, args: { tokenId: market.tokens.yes, side: Side.SELL, makerAmount: 10, }, }); [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#parameters) Parameters -------------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#gtc-order-args) GTC order args | Field | Type | Description | | --- | --- | --- | | `marketSlug` | `string` | Market identifier | | `orderType` | `OrderType` | `OrderType.GTC` | | `onBehalfOf` | `number` | Profile ID of the sub-account | | `args.tokenId` | `string` | Position token ID (YES or NO) from market data | | `args.side` | `Side` | `BUY` (0) or `SELL` (1) | | `args.price` | `number` | Price between 0 and 1 | | `args.size` | `number` | Number of contracts | | `args.postOnly` | `boolean` | Optional. `true` rejects the order if it would immediately match. Default `false`. | | `feeRateBps` | `number` | Fee rate in basis points (defaults to 300 if omitted) | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#fak-order-args) FAK order args | Field | Type | Description | | --- | --- | --- | | `marketSlug` | `string` | Market identifier | | `orderType` | `OrderType` | `OrderType.FAK` | | `onBehalfOf` | `number` | Profile ID of the sub-account | | `args.tokenId` | `string` | Position token ID (YES or NO) from market data | | `args.side` | `Side` | `BUY` (0) or `SELL` (1) | | `args.price` | `number` | Price between 0 and 1 | | `args.size` | `number` | Number of contracts | | `feeRateBps` | `number` | Fee rate in basis points (defaults to 300 if omitted) | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#fok-order-args) FOK order args | Field | Type | Description | | --- | --- | --- | | `marketSlug` | `string` | Market identifier | | `orderType` | `OrderType` | `OrderType.FOK` | | `onBehalfOf` | `number` | Profile ID of the sub-account | | `args.tokenId` | `string` | Position token ID (YES or NO) from market data | | `args.side` | `Side` | `BUY` (0) or `SELL` (1) | | `args.makerAmount` | `number` | BUY: USDC to spend. SELL: shares to sell. Max 6 decimals. | | `feeRateBps` | `number` | Fee rate in basis points (defaults to 300 if omitted) | [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-an-order) Cancel an order ------------------------------------------------------------------------------------------------------------------ Cancel an order placed by the partner or on behalf of a sub-account. await client.delegatedOrders.cancel(orderId); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-on-behalf-of-a-sub-account) Cancel on behalf of a sub-account await client.delegatedOrders.cancelOnBehalfOf(orderId, partnerAccount.profileId); [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-all-orders-in-a-market) Cancel all orders in a market ---------------------------------------------------------------------------------------------------------------------------------------------- await client.delegatedOrders.cancelAll(marketSlug); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#cancel-all-on-behalf-of-a-sub-account) Cancel all on behalf of a sub-account await client.delegatedOrders.cancelAllOnBehalfOf(marketSlug, partnerAccount.profileId); [​](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders#how-it-works) How it works ------------------------------------------------------------------------------------------------------------ 1. The SDK builds an unsigned order locally using `OrderBuilder` with a zero verifying address 2. For GTC and FAK orders, `price` and `size` are used; for FOK orders, `makerAmount` is used (with `takerAmount` always set to 1) 3. The order is posted to `POST /orders` with `onBehalfOf` and `ownerId` set to the sub-account’s profile ID 4. The server detects the `delegated_signing` scope and missing signature 5. The server looks up the sub-account’s server wallet, builds EIP-712 typed data, and signs via Privy 6. The signed order is submitted to the CLOB engine — GTC orders can rest on the book, FAK orders cancel unmatched remainder, and FOK orders either fully fill or cancel [Partner Accounts](https://docs.limitless.exchange/developers/sdk/typescript/partner-accounts) [WebSocket Streaming](https://docs.limitless.exchange/developers/sdk/typescript/websocket) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Portfolio & Positions - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Portfolio & Positions [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [PortfolioFetcher Setup](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#portfoliofetcher-setup) * [All Positions](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#all-positions) * [Response Structure](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#response-structure) * [CLOB Positions](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#clob-positions) * [CLOB Position Structure](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#clob-position-structure) * [AMM Positions](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#amm-positions) * [Trade History](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#trade-history) * [Parameters](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#parameters) * [Combining Positions with Market Data](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#combining-positions-with-market-data) * [Error Handling](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#error-handling) [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#portfoliofetcher-setup) PortfolioFetcher Setup ------------------------------------------------------------------------------------------------------------------------- `PortfolioFetcher` provides access to your positions, trade history, and accumulated points. An API key is required. import { HttpClient, PortfolioFetcher } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, }); const portfolio = new PortfolioFetcher(httpClient); [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#all-positions) All Positions ------------------------------------------------------------------------------------------------------- Fetch all positions across CLOB and AMM markets in a single call: const positions = await portfolio.getPositions(); console.log('CLOB positions:', positions.clob.length); console.log('AMM positions:', positions.amm.length); console.log('Accumulative points:', positions.accumulativePoints); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#response-structure) Response Structure interface PositionsResponse { clob: ClobPosition[]; amm: AmmPosition[]; accumulativePoints: number; } [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#clob-positions) CLOB Positions --------------------------------------------------------------------------------------------------------- Retrieve only your CLOB market positions: const clobPositions = await portfolio.getCLOBPositions(); for (const position of clobPositions) { console.log(`Market: ${position.market.slug}`); console.log(` YES — size: ${position.positions.yes.size}, PnL: ${position.positions.yes.unrealizedPnl}`); console.log(` NO — size: ${position.positions.no.size}, PnL: ${position.positions.no.unrealizedPnl}`); } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#clob-position-structure) CLOB Position Structure interface ClobPosition { market: { slug: string; title: string; }; positions: { yes: { size: number; collateral: number; unrealizedPnl: number; }; no: { size: number; collateral: number; unrealizedPnl: number; }; }; } | Field | Description | | --- | --- | | `size` | Number of shares held | | `collateral` | USDC value of collateral locked | | `unrealizedPnl` | Unrealized profit/loss in USDC based on current orderbook prices | [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#amm-positions) AMM Positions ------------------------------------------------------------------------------------------------------- Retrieve only your AMM market positions: const ammPositions = await portfolio.getAMMPositions(); for (const position of ammPositions) { console.log(`Market: ${position.market.slug}`); console.log(` YES — size: ${position.positions.yes.size}`); console.log(` NO — size: ${position.positions.no.size}`); } [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#trade-history) Trade History ------------------------------------------------------------------------------------------------------- Fetch paginated trade history: const history = await portfolio.getUserHistory(1, 25); for (const entry of history) { console.log(entry.type, entry.market.slug, entry.amount, entry.timestamp); } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#parameters) Parameters | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `page` | `number` | `1` | Page number (1-indexed) | | `limit` | `number` | `10` | Number of entries per page | [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#combining-positions-with-market-data) Combining Positions with Market Data ----------------------------------------------------------------------------------------------------------------------------------------------------- For a richer view, combine position data with live market information: import { MarketFetcher } from '@limitless-exchange/sdk'; const marketFetcher = new MarketFetcher(httpClient); const positions = await portfolio.getCLOBPositions(); for (const position of positions) { const market = await marketFetcher.getMarket(position.market.slug); const orderbook = await marketFetcher.getOrderBook(position.market.slug); const bestBid = orderbook.bids[0]?.price ?? 0; const bestAsk = orderbook.asks[0]?.price ?? 1; const midPrice = (bestBid + bestAsk) / 2; console.log(`${market.title}`); console.log(` Mid price: ${midPrice.toFixed(4)}`); console.log(` YES: ${position.positions.yes.size} shares, PnL: ${position.positions.yes.unrealizedPnl}`); console.log(` NO: ${position.positions.no.size} shares, PnL: ${position.positions.no.unrealizedPnl}`); } For real-time PnL tracking, combine `PortfolioFetcher` with WebSocket orderbook updates rather than repeatedly polling `getOrderBook()`. See the [WebSocket Streaming](https://docs.limitless.exchange/developers/sdk/typescript/websocket) guide. [​](https://docs.limitless.exchange/developers/sdk/typescript/portfolio#error-handling) Error Handling --------------------------------------------------------------------------------------------------------- Portfolio endpoints require a valid API key. If the key is missing or invalid, the SDK throws an `ApiError` with status `401`. import { ApiError } from '@limitless-exchange/sdk'; try { const positions = await portfolio.getPositions(); } catch (error) { if (error instanceof ApiError) { if (error.status === 401) { console.error('Authentication failed. Check your LIMITLESS_API_KEY.'); } else { console.error(`API error ${error.status}: ${error.message}`); } } else { throw error; } } See the [Error Handling and Retry](https://docs.limitless.exchange/developers/sdk/typescript/error-handling) guide for retry strategies and common error codes. [Trading & Orders](https://docs.limitless.exchange/developers/sdk/typescript/orders) [API Tokens](https://docs.limitless.exchange/developers/sdk/typescript/api-tokens) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # WebSocket Events - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/websocket-events#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation WebSocket WebSocket Events [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Connection](https://docs.limitless.exchange/developers/websocket-events#connection) * [Subscribing to Market Data](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-market-data) * [Subscribing to Position Updates](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-position-updates) * [Subscribing to Market Lifecycle Events](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-market-lifecycle-events) * [Event Reference](https://docs.limitless.exchange/developers/websocket-events#event-reference) * [Event Payloads](https://docs.limitless.exchange/developers/websocket-events#event-payloads) * [newPriceData](https://docs.limitless.exchange/developers/websocket-events#newpricedata) * [orderbookUpdate](https://docs.limitless.exchange/developers/websocket-events#orderbookupdate) * [positions](https://docs.limitless.exchange/developers/websocket-events#positions) * [marketCreated](https://docs.limitless.exchange/developers/websocket-events#marketcreated) * [marketResolved](https://docs.limitless.exchange/developers/websocket-events#marketresolved) [​](https://docs.limitless.exchange/developers/websocket-events#connection) Connection ----------------------------------------------------------------------------------------- **URL:** `wss://ws.limitless.exchange` **Namespace:** `/markets` **Transport:** WebSocket only (no polling fallback) import { io } from 'socket.io-client'; const socket = io('wss://ws.limitless.exchange/markets', { transports: ['websocket'], extraHeaders: { 'X-API-Key': 'lmts_your_key_here' } }); [​](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-market-data) Subscribing to Market Data ------------------------------------------------------------------------------------------------------------------------- Subscribe to price and orderbook updates by emitting `subscribe_market_prices`: // AMM price updates socket.emit('subscribe_market_prices', { marketAddresses: ['0x1234...'] }); // CLOB orderbook updates socket.emit('subscribe_market_prices', { marketSlugs: ['btc-100k-weekly'] }); // Both at once (recommended to avoid overwriting subscriptions) socket.emit('subscribe_market_prices', { marketAddresses: ['0x1234...'], marketSlugs: ['btc-100k-weekly'] }); Subscriptions **replace** previous ones. If you want both AMM prices and CLOB orderbook, send both `marketAddresses` and `marketSlugs` together in a single call. [​](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-position-updates) Subscribing to Position Updates ----------------------------------------------------------------------------------------------------------------------------------- Subscribe to real-time position changes by emitting `subscribe_positions`. This requires authentication via the `X-API-Key` header. `subscribe_positions` accepts the same payload as `subscribe_market_prices`: | Field | Type | Description | | --- | --- | --- | | `marketAddresses` | `string[]` | Contract addresses for AMM markets | | `marketSlugs` | `string[]` | Slugs for CLOB markets | import { io } from 'socket.io-client'; const socket = io('wss://ws.limitless.exchange/markets', { transports: ['websocket'], extraHeaders: { 'X-API-Key': 'lmts_your_key_here' }, }); socket.on('connect', () => { // Subscribe to position updates for specific markets socket.emit('subscribe_positions', { marketAddresses: ['0x1234...'], // AMM markets marketSlugs: ['btc-100k-weekly'], // CLOB markets }); }); // Confirmation socket.on('system', (data) => { console.log(data); // { message: 'Successfully subscribed to position updates', markets: { addresses: [...], slugs: [...] } } }); // Position updates socket.on('positions', (data) => { console.log('Position update:', data); }); Like `subscribe_market_prices`, calling `subscribe_positions` again **replaces** the previous subscription. Include all markets in a single call. Position updates are pushed automatically when your balances change (e.g. after a trade is mined). You do not need to poll. [​](https://docs.limitless.exchange/developers/websocket-events#subscribing-to-market-lifecycle-events) Subscribing to Market Lifecycle Events ------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe to market creation and resolution events by emitting `subscribe_market_lifecycle`. No authentication required. socket.on('connect', () => { socket.emit('subscribe_market_lifecycle'); }); socket.on('marketCreated', (data) => { console.log('New market:', data.slug, data.title); }); socket.on('marketResolved', (data) => { console.log('Market resolved:', data.slug, data.winningOutcome); }); `marketResolved` is also emitted to existing per-market room subscribers automatically (CLOB: `market:{slug}`, AMM: `market:{address}`) — you don’t need a separate lifecycle subscription to receive resolution events for markets you’re already watching. To unsubscribe: socket.emit('unsubscribe_market_lifecycle'); [​](https://docs.limitless.exchange/developers/websocket-events#event-reference) Event Reference --------------------------------------------------------------------------------------------------- | Event | Direction | Auth Required | Description | | --- | --- | --- | --- | | `connect` | Server → Client | No | Connection established | | `disconnect` | Server → Client | No | Connection lost | | `subscribe_market_prices` | Client → Server | No | Subscribe to price/orderbook updates | | `subscribe_positions` | Client → Server | Yes | Subscribe to position updates | | `subscribe_market_lifecycle` | Client → Server | No | Subscribe to market creation/resolution events | | `unsubscribe_market_lifecycle` | Client → Server | No | Unsubscribe from market lifecycle events | | `newPriceData` | Server → Client | No | AMM market price update | | `orderbookUpdate` | Server → Client | No | CLOB orderbook update | | `marketCreated` | Server → Client | No | New market created and visible | | `marketResolved` | Server → Client | No | Market resolved with winning outcome | | `positions` | Server → Client | Yes | Position balance update | | `system` | Server → Client | No | System notifications | | `authenticated` | Server → Client | Yes | Authentication confirmation | | `exception` | Server → Client | No | Error notifications | [​](https://docs.limitless.exchange/developers/websocket-events#event-payloads) Event Payloads ------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/websocket-events#newpricedata) `newPriceData` { "marketAddress": "0x1234...", "updatedPrices": { "yes": "0.65", "no": "0.35" }, "blockNumber": 12345678, "timestamp": "2024-01-01T00:00:00.000Z" } ### [​](https://docs.limitless.exchange/developers/websocket-events#orderbookupdate) `orderbookUpdate` { "marketSlug": "btc-100k-weekly", "orderbook": { ... }, "timestamp": "2024-01-01T00:00:00.000Z" } ### [​](https://docs.limitless.exchange/developers/websocket-events#positions) `positions` Position updates have different shapes depending on market type. **AMM markets:** { "account": "0xabcd...", "marketAddress": "0x1234...", "positions": [\ {\ "tokenId": "123456",\ "balance": "1000000",\ "outcomeIndex": 0,\ "collateralOutOnSell": "950000"\ }\ ], "type": "AMM" } **CLOB markets:** { "account": "0xabcd...", "marketSlug": "btc-100k-weekly", "positions": [\ {\ "tokenId": "19633204485790...",\ "ctfBalance": "10000000",\ "averageFillPrice": "0.65",\ "costBasis": "6500000",\ "marketValue": "7000000",\ "marketId": 7348\ }\ ], "tokenIds": ["19633204485790..."], "type": "CLOB" } ### [​](https://docs.limitless.exchange/developers/websocket-events#marketcreated) `marketCreated` Emitted when a new market is funded and visible. Hidden markets are excluded. { "slug": "btc-above-110k-apr-2026", "title": "$BTC above $110,000 on Apr 5, 2026?", "type": "CLOB", "groupSlug": "btc-price-markets", "categoryIds": [1, 5], "createdAt": "2026-04-02T12:00:00.000Z" } | Field | Type | Description | | --- | --- | --- | | `slug` | `string` | Market slug identifier | | `title` | `string` | Market title | | `type` | `'AMM' \| 'CLOB'` | Market type | | `groupSlug` | `string?` | Parent group slug (for NegRisk submarkets) | | `categoryIds` | `number[]?` | Category IDs the market belongs to | | `createdAt` | `string` | ISO-8601 creation timestamp | ### [​](https://docs.limitless.exchange/developers/websocket-events#marketresolved) `marketResolved` Emitted when a market resolves. Sent to both `market_lifecycle` subscribers and existing `market:{slug}` room subscribers. { "slug": "btc-above-110k-apr-2026", "type": "CLOB", "winningOutcome": "YES", "winningIndex": 0, "resolutionDate": "2026-04-05T14:00:00.000Z" } | Field | Type | Description | | --- | --- | --- | | `slug` | `string` | Market slug identifier | | `type` | `'AMM' \| 'CLOB'` | Market type | | `winningOutcome` | `'YES' \| 'NO'` | The winning outcome | | `winningIndex` | `0 \| 1` | Index of the winning outcome (0 = YES, 1 = NO) | | `resolutionDate` | `string` | ISO-8601 resolution timestamp | [Error Handling & Retry](https://docs.limitless.exchange/developers/sdk/go/error-handling) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Pages - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Market Pages [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#overview) * [Setup](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#setup) * [Navigation Tree](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#navigation-tree) * [NavigationNode Fields](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#navigationnode-fields) * [Resolving a Page by Path](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#resolving-a-page-by-path) * [MarketPage Fields](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#marketpage-fields) * [Fetching Markets for a Page](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#fetching-markets-for-a-page) * [Offset Pagination](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#offset-pagination) * [Cursor Pagination](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#cursor-pagination) * [Filtering](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#filtering) * [Parameters](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#parameters) * [Sort Options](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#sort-options) * [Property Keys](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#property-keys) * [Single Key and Options](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#single-key-and-options) * [PropertyKey Fields](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#propertykey-fields) * [Complete Example](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#complete-example) [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#overview) Overview ------------------------------------------------------------------------------------------------ The `MarketPageFetcher` class provides access to the Market Navigation API — a hierarchical system for browsing markets by category, applying dynamic filters, and paginating results. All endpoints are public and require no authentication. [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#setup) Setup ------------------------------------------------------------------------------------------ import { HttpClient, MarketPageFetcher } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', }); const pageFetcher = new MarketPageFetcher(httpClient); [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#navigation-tree) Navigation Tree -------------------------------------------------------------------------------------------------------------- Fetch the full navigation hierarchy. Each node represents a browseable category with a URL path. const navigation = await pageFetcher.getNavigation(); for (const node of navigation) { console.log(`${node.name} → ${node.path}`); for (const child of node.children) { console.log(` ${child.name} → ${child.path}`); } } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#navigationnode-fields) NavigationNode Fields | Field | Type | Description | | --- | --- | --- | | `id` | `string` | Unique identifier | | `name` | `string` | Display name | | `slug` | `string` | URL-friendly identifier | | `path` | `string` | Full URL path (e.g. `/crypto`) | | `icon` | `string \| undefined` | Optional icon name | | `children` | `NavigationNode[]` | Nested child nodes | [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#resolving-a-page-by-path) Resolving a Page by Path -------------------------------------------------------------------------------------------------------------------------------- Convert a URL path into a `MarketPage` with its filters, metadata, and breadcrumb. The SDK handles 301 redirects internally. const page = await pageFetcher.getMarketPageByPath('/crypto'); console.log(`Page: ${page.name}`); console.log(`Filters: ${page.filterGroups.length} groups`); console.log(`Breadcrumb: ${page.breadcrumb.map(b => b.name).join(' > ')}`); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#marketpage-fields) MarketPage Fields | Field | Type | Description | | --- | --- | --- | | `id` | `string` | Page identifier (used for `getMarkets()`) | | `name` | `string` | Display name | | `slug` | `string` | URL-friendly identifier | | `fullPath` | `string` | Full URL path | | `description` | `string \| undefined` | Page description | | `baseFilter` | `Record` | Default filter applied to this page | | `filterGroups` | `FilterGroup[]` | Available filter groups | | `metadata` | `Record` | Page metadata | | `breadcrumb` | `BreadcrumbItem[]` | Navigation breadcrumb | [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#fetching-markets-for-a-page) Fetching Markets for a Page -------------------------------------------------------------------------------------------------------------------------------------- Use `getMarkets()` with the page ID to fetch markets. Supports offset and cursor pagination, sorting, and dynamic filters. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#offset-pagination) Offset Pagination const result = await pageFetcher.getMarkets(page.id, { page: 1, limit: 20, sort: '-updatedAt', }); for (const market of result.data) { console.log(`${market.slug} — ${market.title}`); } if ('pagination' in result) { console.log(`Page ${result.pagination.page} of ${result.pagination.totalPages}`); } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#cursor-pagination) Cursor Pagination const firstPage = await pageFetcher.getMarkets(page.id, { cursor: '', limit: 20, sort: '-updatedAt', }); for (const market of firstPage.data) { console.log(market.slug); } if ('cursor' in firstPage && firstPage.cursor.nextCursor) { const nextPage = await pageFetcher.getMarkets(page.id, { cursor: firstPage.cursor.nextCursor, limit: 20, }); } You cannot use `cursor` and `page` in the same request. Choose one pagination strategy. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#filtering) Filtering Pass a `filters` object. Values can be a single primitive or an array for multi-select filters. // Single filter const result = await pageFetcher.getMarkets(page.id, { filters: { ticker: 'btc' }, }); // Multiple values (OR logic) const result = await pageFetcher.getMarkets(page.id, { filters: { ticker: ['btc', 'eth'] }, }); // Combined filters const result = await pageFetcher.getMarkets(page.id, { limit: 10, sort: '-updatedAt', filters: { ticker: ['btc', 'eth'], duration: 'hourly', }, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#parameters) Parameters | Parameter | Type | Description | | --- | --- | --- | | `page` | `number` | Page number (offset pagination) | | `limit` | `number` | Results per page | | `sort` | `string` | Sort field with optional `-` prefix for descending | | `cursor` | `string` | Cursor token (cursor pagination). Use `""` for the first request. | | `filters` | `Record` | Filter key-value pairs. Values can be primitives or arrays. | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#sort-options) Sort Options | Value | Description | | --- | --- | | `createdAt` / `-createdAt` | Sort by creation date (ascending / descending) | | `updatedAt` / `-updatedAt` | Sort by last update | | `deadline` / `-deadline` | Sort by expiration deadline | | `id` / `-id` | Sort by market ID | [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#property-keys) Property Keys ---------------------------------------------------------------------------------------------------------- Property keys define the available filter dimensions (e.g. “ticker”, “duration”). Each key has a set of options. const keys = await pageFetcher.getPropertyKeys(); for (const key of keys) { console.log(`${key.name} (${key.type})`); if (key.options) { for (const opt of key.options.slice(0, 3)) { console.log(` ${opt.label}: ${opt.value}`); } } } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#single-key-and-options) Single Key and Options const key = await pageFetcher.getPropertyKey(keys[0].id); console.log(`${key.name} — ${key.options?.length ?? 0} options`); // Fetch options separately (supports parent filtering for hierarchical keys) const options = await pageFetcher.getPropertyOptions(key.id); // Child options filtered by parent const childOptions = await pageFetcher.getPropertyOptions(key.id, options[0]?.id); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#propertykey-fields) PropertyKey Fields | Field | Type | Description | | --- | --- | --- | | `id` | `string` | Unique identifier | | `name` | `string` | Display name | | `slug` | `string` | URL-friendly identifier | | `type` | `string` | `"select"` or `"multi-select"` | | `isSystem` | `boolean` | Whether this is a system-defined key | | `options` | `PropertyOption[] \| undefined` | Available options (when fetched inline) | | `metadata` | `Record` | Key metadata | | `createdAt` | `string` | ISO 8601 creation timestamp | | `updatedAt` | `string` | ISO 8601 last update timestamp | [​](https://docs.limitless.exchange/developers/sdk/typescript/market-pages#complete-example) Complete Example ---------------------------------------------------------------------------------------------------------------- import { HttpClient, MarketPageFetcher } from '@limitless-exchange/sdk'; async function main() { const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', }); const pageFetcher = new MarketPageFetcher(httpClient); // Browse the navigation tree const navigation = await pageFetcher.getNavigation(); console.log(`Top-level categories: ${navigation.length}`); // Resolve a page const page = await pageFetcher.getMarketPageByPath('/crypto'); console.log(`\nPage: ${page.name}`); console.log(`Available filters: ${page.filterGroups.map(fg => fg.name)}`); // Fetch markets with filters const result = await pageFetcher.getMarkets(page.id, { limit: 5, sort: '-updatedAt', filters: { ticker: ['btc', 'eth'] }, }); for (const market of result.data) { console.log(` ${market.slug} — ${market.title}`); } // Explore property keys const keys = await pageFetcher.getPropertyKeys(); for (const key of keys) { console.log(`\n${key.name} (${key.type}):`); const options = await pageFetcher.getPropertyOptions(key.id); for (const opt of options.slice(0, 5)) { console.log(` ${opt.label}`); } } } main(); [Markets](https://docs.limitless.exchange/developers/sdk/typescript/markets) [Trading & Orders](https://docs.limitless.exchange/developers/sdk/typescript/orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Markets - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/markets#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Markets [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [MarketFetcher Setup](https://docs.limitless.exchange/developers/sdk/typescript/markets#marketfetcher-setup) * [Active Markets](https://docs.limitless.exchange/developers/sdk/typescript/markets#active-markets) * [Parameters](https://docs.limitless.exchange/developers/sdk/typescript/markets#parameters) * [Sort Options](https://docs.limitless.exchange/developers/sdk/typescript/markets#sort-options) * [Single Market](https://docs.limitless.exchange/developers/sdk/typescript/markets#single-market) * [Market Response Structure](https://docs.limitless.exchange/developers/sdk/typescript/markets#market-response-structure) * [Orderbook](https://docs.limitless.exchange/developers/sdk/typescript/markets#orderbook) * [Orderbook Response Structure](https://docs.limitless.exchange/developers/sdk/typescript/markets#orderbook-response-structure) * [Handling illiquid markets](https://docs.limitless.exchange/developers/sdk/typescript/markets#handling-illiquid-markets) * [User Orders](https://docs.limitless.exchange/developers/sdk/typescript/markets#user-orders) * [NegRisk Group Markets](https://docs.limitless.exchange/developers/sdk/typescript/markets#negrisk-group-markets) * [Best Practices](https://docs.limitless.exchange/developers/sdk/typescript/markets#best-practices) [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#marketfetcher-setup) MarketFetcher Setup ----------------------------------------------------------------------------------------------------------------- `MarketFetcher` provides read-only access to market data. No API key is required for public endpoints. import { HttpClient, MarketFetcher } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', }); const marketFetcher = new MarketFetcher(httpClient); [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#active-markets) Active Markets ------------------------------------------------------------------------------------------------------- Retrieve a paginated list of currently active markets with optional sorting. const markets = await marketFetcher.getActiveMarkets({ limit: 20, page: 1, sortBy: 'newest', }); for (const market of markets) { console.log(`${market.slug} — ${market.title}`); } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#parameters) Parameters | Parameter | Type | Default | Description | | --- | --- | --- | --- | | `limit` | `number` | `10` | Number of markets per page | | `page` | `number` | `1` | Page number (1-indexed) | | `sortBy` | `string` | `'newest'` | Sort order for results | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#sort-options) Sort Options | Value | Description | | --- | --- | | `'lp_rewards'` | Markets with the highest LP rewards | | `'ending_soon'` | Markets closest to resolution | | `'newest'` | Most recently created markets | | `'high_value'` | Markets with the highest volume or liquidity | [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#single-market) Single Market ----------------------------------------------------------------------------------------------------- Fetch a single market by slug. The response includes venue contract addresses and token IDs needed for trading. const market = await marketFetcher.getMarket('btc-100k-weekly'); console.log('Slug:', market.slug); console.log('Venue exchange:', market.venue.exchange); console.log('YES token ID:', market.positionIds[0]); console.log('NO token ID:', market.positionIds[1]); `getMarket()` automatically caches the venue data for the returned market. Subsequent calls for the same slug return the cached result. Always fetch the market before placing orders to ensure the venue is cached. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#market-response-structure) Market Response Structure interface Market { slug: string; title: string; venue: { exchange: string; // EIP-712 verifyingContract address adapter: string | null; // Adapter contract address (null for some CLOB markets) }; positionIds: [string, string]; // [YES token ID, NO token ID] openInterest?: string; liquidity?: string; imageUrl?: string | null; automationType?: 'manual' | 'lumy' | 'sports'; // ... additional fields } [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#orderbook) Orderbook --------------------------------------------------------------------------------------------- Fetch the current orderbook for a CLOB market. Returns bids, asks, and the current spread. const orderbook = await marketFetcher.getOrderBook('btc-100k-weekly'); console.log('Best bid:', orderbook.bids[0]?.price); console.log('Best ask:', orderbook.asks[0]?.price); // Calculate spread if (orderbook.bids.length > 0 && orderbook.asks.length > 0) { const spread = orderbook.asks[0].price - orderbook.bids[0].price; console.log('Spread:', spread.toFixed(4)); } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#orderbook-response-structure) Orderbook Response Structure interface Orderbook { bids: OrderbookLevel[]; asks: OrderbookLevel[]; } interface OrderbookLevel { price: number; // 0 to 1 size: number; // Number of shares } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#handling-illiquid-markets) Handling illiquid markets Markets with empty or one-sided orderbooks can produce misleading midpoint prices. When there are no bids, the midpoint defaults to `(0 + bestAsk) / 2`, which may show 50% even though no one is actively trading. To detect these markets: const orderbook = await marketFetcher.getOrderBook('some-market'); const hasBids = orderbook.bids.length > 0; const hasAsks = orderbook.asks.length > 0; if (!hasBids || !hasAsks) { console.log('No two-sided market — skip or flag as illiquid'); } else { const spread = orderbook.asks[0].price - orderbook.bids[0].price; if (spread > 0.20) { console.log('Wide spread — market may have low liquidity'); } } [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#user-orders) User Orders ------------------------------------------------------------------------------------------------- Retrieve your open orders for a specific market using the fluent API. Requires an API key. const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, }); const marketFetcher = new MarketFetcher(httpClient); const market = await marketFetcher.getMarket('btc-100k-weekly'); const orders = await market.getUserOrders(); for (const order of orders) { console.log(order.id, order.side, order.price, order.status); } The `getUserOrders()` method is available on the market object returned by `getMarket()`. It requires an authenticated `HttpClient` (with an API key). [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#negrisk-group-markets) NegRisk Group Markets --------------------------------------------------------------------------------------------------------------------- NegRisk markets are organized into groups. Each group contains multiple submarkets (outcomes). To trade a specific outcome, fetch the group first, then access the submarket you need. 1 [](https://docs.limitless.exchange/developers/sdk/typescript/markets#) Fetch the NegRisk group const group = await marketFetcher.getMarket('us-election-2024'); console.log('Group:', group.slug); console.log('Submarkets:', group.submarkets.length); 2 [](https://docs.limitless.exchange/developers/sdk/typescript/markets#) Access a submarket const submarket = group.submarkets[0]; console.log('Submarket:', submarket.slug, submarket.title); 3 [](https://docs.limitless.exchange/developers/sdk/typescript/markets#) Fetch the submarket for token IDs You must call `getMarket()` on the submarket slug to get the venue and token IDs required for placing orders. const submarketDetail = await marketFetcher.getMarket(submarket.slug); console.log('YES token:', submarketDetail.positionIds[0]); console.log('NO token:', submarketDetail.positionIds[1]); Always use the **submarket slug** (not the group slug) when placing orders on NegRisk markets. The group slug does not have token IDs associated with it. [​](https://docs.limitless.exchange/developers/sdk/typescript/markets#best-practices) Best Practices ------------------------------------------------------------------------------------------------------- Cache venue data Always call `getMarket()` before placing orders. The SDK caches venue data (exchange and adapter addresses) internally. This avoids redundant API calls and ensures the `OrderClient` has the information it needs to sign orders. Use WebSocket instead of polling For real-time orderbook data, subscribe to WebSocket events rather than polling `getOrderBook()`. The WebSocket pushes `orderbookUpdate` events whenever the book changes, reducing latency and API usage. See the [WebSocket Streaming](https://docs.limitless.exchange/developers/sdk/typescript/websocket) guide. Paginate large result sets When fetching active markets, always use `limit` and `page` parameters. Requesting unbounded result sets can cause timeouts and high memory usage. [TypeScript SDK](https://docs.limitless.exchange/developers/sdk/typescript/getting-started) [Market Pages](https://docs.limitless.exchange/developers/sdk/typescript/market-pages) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Error Handling & Retry - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Error Handling & Retry [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [ApiError Class](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#apierror-class) * [ApiError Properties](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#apierror-properties) * [Common Status Codes](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#common-status-codes) * [withRetry Wrapper](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#withretry-wrapper) * [withRetry Options](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#withretry-options) * [@retryOnErrors Decorator](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#%40retryonerrors-decorator) * [Decorator Options](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#decorator-options) * [Rate Limiting with OrderQueue](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#rate-limiting-with-orderqueue) * [Best Practices](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#best-practices) * [Logging](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#logging) * [Quick Start](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#quick-start) * [Log Levels](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#log-levels) * [Custom Logger for Production](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#custom-logger-for-production) * [Passing Logger to SDK Components](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#passing-logger-to-sdk-components) [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#apierror-class) ApiError Class -------------------------------------------------------------------------------------------------------------- All HTTP errors from the SDK are thrown as `ApiError` instances. Inspect the `status`, `message`, and `data` properties to determine what went wrong. import { ApiError } from '@limitless-exchange/sdk'; try { await orderClient.createOrder({ /* ... */ }); } catch (error) { if (error instanceof ApiError) { console.error('Status:', error.status); // HTTP status code console.error('Message:', error.message); // Human-readable error console.error('Data:', error.data); // Raw response body (if any) } } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#apierror-properties) ApiError Properties | Property | Type | Description | | --- | --- | --- | | `status` | `number` | HTTP status code (400, 401, 429, 500, etc.) | | `message` | `string` | Error description from the server | | `data` | `unknown` | Raw response body, useful for debugging | [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#common-status-codes) Common Status Codes ------------------------------------------------------------------------------------------------------------------------ | Code | Meaning | Action | | --- | --- | --- | | `400` | Bad request (invalid parameters) | Fix request parameters | | `401` | Unauthorized (invalid or missing API key) | Check your `LIMITLESS_API_KEY` | | `403` | Forbidden (insufficient permissions) | Verify account permissions | | `404` | Not found (invalid slug or resource) | Check market slug or resource ID | | `429` | Rate limited | Back off and retry with delay | | `500` | Internal server error | Retry with exponential backoff | | `502` | Bad gateway | Retry with exponential backoff | | `503` | Service unavailable | Retry with exponential backoff | | `504` | Gateway timeout | Retry with exponential backoff | [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#withretry-wrapper) withRetry Wrapper -------------------------------------------------------------------------------------------------------------------- The SDK provides a `withRetry` utility function that wraps any async operation with configurable retry logic. import { withRetry, ApiError } from '@limitless-exchange/sdk'; const result = await withRetry( () => orderClient.createOrder({ marketSlug: 'btc-100k-weekly', tokenId: market.positionIds[0], side: 'BUY', price: 0.65, size: 100, orderType: 'GTC', }), { statusCodes: [429, 500, 502, 503, 504], maxRetries: 3, delays: [1000, 2000, 4000], // Milliseconds between retries onRetry: (error, attempt) => { console.warn(`Retry ${attempt}: ${error.message}`); }, } ); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#withretry-options) withRetry Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `statusCodes` | `number[]` | `[429, 500, 502, 503, 504]` | HTTP status codes that trigger a retry | | `maxRetries` | `number` | `3` | Maximum number of retry attempts | | `delays` | `number[]` | `[1000, 2000, 4000]` | Delay in ms before each retry. If fewer delays than retries, the last delay is reused. | | `onRetry` | `(error: ApiError, attempt: number) => void` | — | Callback invoked before each retry | Only `ApiError` instances with a matching `status` code trigger retries. Other errors (network failures, timeouts) are thrown immediately. [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#@retryonerrors-decorator) @retryOnErrors Decorator ---------------------------------------------------------------------------------------------------------------------------------- For class-based architectures, use the `@retryOnErrors` decorator to add retry logic to individual methods. import { retryOnErrors } from '@limitless-exchange/sdk'; class TradingBot { private orderClient: OrderClient; constructor(orderClient: OrderClient) { this.orderClient = orderClient; } @retryOnErrors({ statusCodes: [429, 500, 502, 503, 504], maxRetries: 5, exponentialBase: 2, maxDelay: 30_000, }) async placeOrder(params: CreateOrderParams) { return this.orderClient.createOrder(params); } } ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#decorator-options) Decorator Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `statusCodes` | `number[]` | `[429, 500, 502, 503, 504]` | HTTP status codes that trigger a retry | | `maxRetries` | `number` | `3` | Maximum number of retry attempts | | `exponentialBase` | `number` | `2` | Base for exponential backoff calculation (`base^attempt * 1000` ms) | | `maxDelay` | `number` | `30000` | Maximum delay in milliseconds between retries | The delay for each retry is calculated as: delay = min(exponentialBase ^ attempt * 1000, maxDelay) For example, with `exponentialBase: 2` and `maxDelay: 30000`: | Attempt | Delay | | --- | --- | | 1 | 2,000 ms | | 2 | 4,000 ms | | 3 | 8,000 ms | | 4 | 16,000 ms | | 5 | 30,000 ms (capped) | [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#rate-limiting-with-orderqueue) Rate Limiting with OrderQueue -------------------------------------------------------------------------------------------------------------------------------------------- For high-frequency trading scenarios, implement an `OrderQueue` to throttle outgoing requests and avoid 429 errors: import { ApiError } from '@limitless-exchange/sdk'; class OrderQueue { private queue: Array<() => Promise> = []; private processing = false; private minDelayMs: number; constructor(minDelayMs = 200) { this.minDelayMs = minDelayMs; } async enqueue(fn: () => Promise): Promise { return new Promise((resolve, reject) => { this.queue.push(async () => { try { resolve(await fn()); } catch (error) { reject(error); } }); this.processQueue(); }); } private async processQueue() { if (this.processing) return; this.processing = true; while (this.queue.length > 0) { const task = this.queue.shift()!; await task(); await new Promise((r) => setTimeout(r, this.minDelayMs)); } this.processing = false; } } // Usage const orderQueue = new OrderQueue(250); // 250ms between requests const result = await orderQueue.enqueue(() => orderClient.createOrder({ marketSlug: 'btc-100k-weekly', tokenId: market.positionIds[0], side: 'BUY', price: 0.65, size: 100, orderType: 'GTC', }) ); [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#best-practices) Best Practices -------------------------------------------------------------------------------------------------------------- Always handle ApiError specifically Catch `ApiError` separately from other errors. Network failures, JSON parse errors, and timeouts are not `ApiError` instances and should be handled differently. try { await orderClient.createOrder({ /* ... */ }); } catch (error) { if (error instanceof ApiError) { // Server responded with an error status handleApiError(error); } else if (error instanceof TypeError) { // Network error (DNS, connection refused, etc.) console.error('Network error:', error.message); } else { // Unexpected error throw error; } } Do not retry 400 or 401 errors Client errors (400, 401, 403) indicate a problem with your request or credentials. Retrying them wastes time and API quota. Only retry transient server errors (429, 5xx). Use exponential backoff for 429 responses When rate limited, the server may include a `Retry-After` header. If available, respect it. Otherwise, use exponential backoff starting at 1 second. Combine retry with OrderQueue For the most robust setup, use `OrderQueue` to throttle request rate _and_ `withRetry` or `@retryOnErrors` to handle transient failures: const result = await orderQueue.enqueue(() => withRetry( () => orderClient.createOrder({ /* ... */ }), { statusCodes: [429, 500, 502, 503, 504], maxRetries: 3 } ) ); [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#logging) Logging ------------------------------------------------------------------------------------------------ The SDK provides optional logging through a simple `ILogger` interface. Logging is completely opt-in with zero overhead by default. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#quick-start) Quick Start import { HttpClient, ConsoleLogger } from '@limitless-exchange/sdk'; const logger = new ConsoleLogger('info'); const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, logger, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#log-levels) Log Levels | Level | What’s Logged | | --- | --- | | `debug` | Request headers (API key redacted), request/response bodies, WebSocket events | | `info` | API requests (method + URL), successful responses, order creation/cancellation | | `warn` | Warnings only | | `error` | API errors (with status code), network errors, WebSocket connection errors | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#custom-logger-for-production) Custom Logger for Production Implement the `ILogger` interface to integrate with your own logging infrastructure: import { ILogger } from '@limitless-exchange/sdk'; class MyLogger implements ILogger { debug(message: string, meta?: Record): void { /* ... */ } info(message: string, meta?: Record): void { /* ... */ } warn(message: string, meta?: Record): void { /* ... */ } error(message: string, error?: Error, meta?: Record): void { /* ... */ } } const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, logger: new MyLogger(), }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/error-handling#passing-logger-to-sdk-components) Passing Logger to SDK Components All SDK components accept an optional logger: const logger = new ConsoleLogger('info'); const httpClient = new HttpClient({ baseURL: '...', logger }); const marketFetcher = new MarketFetcher(httpClient, logger); const orderClient = new OrderClient({ httpClient, wallet, logger }); The SDK automatically redacts API keys in logs (shown as `***`). Private keys are never logged. [WebSocket Streaming](https://docs.limitless.exchange/developers/sdk/typescript/websocket) [Python SDK](https://docs.limitless.exchange/developers/sdk/python/getting-started) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Trading & Orders - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/orders#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK Trading & Orders [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Prerequisites](https://docs.limitless.exchange/developers/sdk/typescript/orders#prerequisites) * [OrderClient Constructor](https://docs.limitless.exchange/developers/sdk/typescript/orders#orderclient-constructor) * [Token Approvals](https://docs.limitless.exchange/developers/sdk/typescript/orders#token-approvals) * [Approval Requirements](https://docs.limitless.exchange/developers/sdk/typescript/orders#approval-requirements) * [Manual Approval with ethers](https://docs.limitless.exchange/developers/sdk/typescript/orders#manual-approval-with-ethers) * [GTC Orders (Good-Til-Cancelled)](https://docs.limitless.exchange/developers/sdk/typescript/orders#gtc-orders-good-til-cancelled) * [Buy YES shares](https://docs.limitless.exchange/developers/sdk/typescript/orders#buy-yes-shares) * [Post-only GTC order](https://docs.limitless.exchange/developers/sdk/typescript/orders#post-only-gtc-order) * [Sell NO shares](https://docs.limitless.exchange/developers/sdk/typescript/orders#sell-no-shares) * [GTC Parameter Reference](https://docs.limitless.exchange/developers/sdk/typescript/orders#gtc-parameter-reference) * [FOK Orders (Fill-Or-Kill)](https://docs.limitless.exchange/developers/sdk/typescript/orders#fok-orders-fill-or-kill) * [Buy with FOK](https://docs.limitless.exchange/developers/sdk/typescript/orders#buy-with-fok) * [Sell with FOK](https://docs.limitless.exchange/developers/sdk/typescript/orders#sell-with-fok) * [FOK Parameter Reference](https://docs.limitless.exchange/developers/sdk/typescript/orders#fok-parameter-reference) * [NegRisk Orders](https://docs.limitless.exchange/developers/sdk/typescript/orders#negrisk-orders) * [Cancel Orders](https://docs.limitless.exchange/developers/sdk/typescript/orders#cancel-orders) * [Order States](https://docs.limitless.exchange/developers/sdk/typescript/orders#order-states) * [Error Handling](https://docs.limitless.exchange/developers/sdk/typescript/orders#error-handling) * [Validation Rules](https://docs.limitless.exchange/developers/sdk/typescript/orders#validation-rules) [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#prerequisites) Prerequisites ---------------------------------------------------------------------------------------------------- Before placing orders, initialize the required clients: import { ethers } from 'ethers'; import { HttpClient, MarketFetcher, OrderClient, } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, }); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!); const marketFetcher = new MarketFetcher(httpClient); const orderClient = new OrderClient({ httpClient, wallet, marketFetcher, // Optional: enables venue caching for faster order creation }); [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#orderclient-constructor) OrderClient Constructor ------------------------------------------------------------------------------------------------------------------------ | Option | Type | Required | Description | | --- | --- | --- | --- | | `httpClient` | `HttpClient` | Yes | Authenticated HTTP client | | `wallet` | `ethers.Wallet` | Yes | Wallet for EIP-712 signing | | `marketFetcher` | `MarketFetcher` | No | Enables automatic venue caching. If omitted, venue data is fetched on each order. | The `OrderClient` automatically fetches your user profile data (including `ownerId`) from the API on the first order. You do not need to supply it manually. [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#token-approvals) Token Approvals -------------------------------------------------------------------------------------------------------- Before trading, your wallet must approve the relevant venue contracts to spend USDC and conditional tokens. This is a one-time setup per venue. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#approval-requirements) Approval Requirements | Market Type | USDC Approval | Conditional Token Approval | | --- | --- | --- | | CLOB | Venue `exchange` contract | Venue `exchange` contract | | NegRisk | NegRisk `exchange` contract | NegRisk `exchange` contract | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#manual-approval-with-ethers) Manual Approval with ethers import { ethers } from 'ethers'; const USDC_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC on Base const ERC20_ABI = [\ 'function approve(address spender, uint256 amount) returns (bool)',\ ]; const ERC1155_ABI = [\ 'function setApprovalForAll(address operator, bool approved)',\ ]; const provider = new ethers.JsonRpcProvider('https://mainnet.base.org'); const signer = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); async function approveVenue(venueExchange: string) { const usdc = new ethers.Contract(USDC_ADDRESS, ERC20_ABI, signer); const tx1 = await usdc.approve(venueExchange, ethers.MaxUint256); await tx1.wait(); console.log('USDC approved for', venueExchange); } Run approvals once per venue. After approval, all subsequent orders on markets using that venue work without additional on-chain transactions. [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#gtc-orders-good-til-cancelled) GTC Orders (Good-Til-Cancelled) -------------------------------------------------------------------------------------------------------------------------------------- GTC orders remain on the orderbook until filled, cancelled, or the market resolves. Specify `price` (probability between 0 and 1) and `size` (number of shares). ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#buy-yes-shares) Buy YES shares import { OrderType, Side } from '@limitless-exchange/sdk'; const market = await marketFetcher.getMarket('btc-100k-weekly'); const result = await orderClient.createOrder({ marketSlug: market.slug, tokenId: market.positionIds[0], // YES token side: Side.BUY, price: 0.65, size: 100, orderType: OrderType.GTC, }); console.log('Order created:', result.order.id); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#post-only-gtc-order) Post-only GTC order Use `postOnly: true` to ensure your order is never filled immediately as a taker. If the order would cross the spread (i.e., match against existing orders), it is **rejected** instead. This guarantees you always receive maker fees. const result = await orderClient.createOrder({ marketSlug: market.slug, tokenId: market.positionIds[0], // YES token side: Side.BUY, price: 0.65, size: 100, orderType: OrderType.GTC, postOnly: true, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#sell-no-shares) Sell NO shares const result = await orderClient.createOrder({ marketSlug: market.slug, tokenId: market.positionIds[1], // NO token side: Side.SELL, price: 0.40, size: 50, orderType: OrderType.GTC, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#gtc-parameter-reference) GTC Parameter Reference | Parameter | Type | Description | | --- | --- | --- | | `marketSlug` | `string` | Market slug identifier | | `tokenId` | `string` | YES or NO token ID from `market.positionIds` | | `side` | `Side` | `Side.BUY` (0) or `Side.SELL` (1) | | `price` | `number` | Price between 0 and 1 (exclusive), tick-aligned | | `size` | `number` | Number of shares (positive, step-aligned) | | `orderType` | `OrderType` | `OrderType.GTC` | | `postOnly` | `boolean` | Optional. When `true`, rejects the order if it would immediately match. Default `false`. | [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#fok-orders-fill-or-kill) FOK Orders (Fill-Or-Kill) -------------------------------------------------------------------------------------------------------------------------- FOK orders execute immediately against the existing orderbook or are rejected entirely. Instead of `price` and `size`, specify `makerAmount` which represents the total value to trade. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#buy-with-fok) Buy with FOK For a BUY FOK order, `makerAmount` is the amount of USDC you are willing to spend: import { OrderType, Side } from '@limitless-exchange/sdk'; const result = await orderClient.createOrder({ marketSlug: market.slug, tokenId: market.positionIds[0], // YES token side: Side.BUY, makerAmount: 50, // Spend up to 50 USDC orderType: OrderType.FOK, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#sell-with-fok) Sell with FOK For a SELL FOK order, `makerAmount` is the number of shares you want to sell: const result = await orderClient.createOrder({ marketSlug: market.slug, tokenId: market.positionIds[0], // YES token side: Side.SELL, makerAmount: 100, // Sell 100 shares orderType: OrderType.FOK, }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#fok-parameter-reference) FOK Parameter Reference | Parameter | Type | Description | | --- | --- | --- | | `marketSlug` | `string` | Market slug identifier | | `tokenId` | `string` | YES or NO token ID from `market.positionIds` | | `side` | `Side` | `Side.BUY` (0) or `Side.SELL` (1) | | `makerAmount` | `number` | BUY: USDC to spend. SELL: shares to sell. Max 6 decimals. | | `orderType` | `OrderType` | `OrderType.FOK` | [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#negrisk-orders) NegRisk Orders ------------------------------------------------------------------------------------------------------ When trading NegRisk markets, always use the **submarket slug** — not the group slug. Fetch the group to discover submarkets, then fetch the specific submarket to get its token IDs. import { OrderType, Side } from '@limitless-exchange/sdk'; // 1. Fetch the NegRisk group const group = await marketFetcher.getMarket('us-election-2024'); // 2. Pick a submarket from the group's markets array const submarket = group.markets[0]; // 3. Fetch submarket details to get token IDs const submarketDetail = await marketFetcher.getMarket(submarket.slug); // 4. Place an order using the submarket slug and token IDs const result = await orderClient.createOrder({ marketSlug: submarketDetail.slug, tokenId: submarketDetail.positionIds[0], // YES token side: Side.BUY, price: 0.55, size: 25, orderType: OrderType.GTC, }); Passing the group slug to `createOrder()` will fail. The group slug does not resolve to a tradeable market. Always use the submarket slug. [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#cancel-orders) Cancel Orders ---------------------------------------------------------------------------------------------------- Cancel an open order by its ID: const result = await orderClient.cancel('order_abc123'); console.log(result.message); Cancel all orders in a market: const result = await orderClient.cancelAll('btc-100k-weekly'); console.log(result.message); [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#order-states) Order States -------------------------------------------------------------------------------------------------- | State | Description | | --- | --- | | `OPEN` | Order is live on the orderbook | | `PARTIALLY_FILLED` | Some shares have been matched | | `FILLED` | Order fully matched | | `CANCELLED` | Order cancelled by user or system | | `REJECTED` | Order rejected (insufficient funds, invalid params, etc.) | [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#error-handling) Error Handling ------------------------------------------------------------------------------------------------------ The SDK throws `ApiError` for HTTP-level failures. Inspect `status` and `message` for details. import { ApiError, OrderType, Side } from '@limitless-exchange/sdk'; try { await orderClient.createOrder({ marketSlug: 'btc-100k-weekly', tokenId: market.positionIds[0], side: Side.BUY, price: 0.65, size: 100, orderType: OrderType.GTC, }); } catch (error) { if (error instanceof ApiError) { switch (error.status) { case 400: console.error('Bad request:', error.message); break; case 401: console.error('Unauthorized: check your API key'); break; case 429: console.error('Rate limited: slow down requests'); break; default: console.error(`API error ${error.status}:`, error.message); } } else { throw error; } } See the [Error Handling and Retry](https://docs.limitless.exchange/developers/sdk/typescript/error-handling) guide for retry strategies. [​](https://docs.limitless.exchange/developers/sdk/typescript/orders#validation-rules) Validation Rules ---------------------------------------------------------------------------------------------------------- Price validation Prices must be between 0 and 1 (exclusive). A price of `0.65` means you value the outcome at 65%. Prices outside this range will be rejected by the API. // Valid price: 0.01 price: 0.99 // Invalid (will throw) price: 0 price: 1 price: 1.5 price: -0.1 Size validation Size must be a positive number. Fractional sizes are allowed if they align to the shares step (0.001). Max 3 decimal places. // Valid size: 1 size: 100 size: 1.5 size: 0.001 // Invalid (will throw) size: 0 size: -1 size: 0.0001 // too many decimals [Market Pages](https://docs.limitless.exchange/developers/sdk/typescript/market-pages) [Portfolio & Positions](https://docs.limitless.exchange/developers/sdk/typescript/portfolio) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # WebSocket Streaming - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/websocket#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK WebSocket Streaming [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [WebSocketClient Setup](https://docs.limitless.exchange/developers/sdk/typescript/websocket#websocketclient-setup) * [Constructor Options](https://docs.limitless.exchange/developers/sdk/typescript/websocket#constructor-options) * [Public Subscriptions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#public-subscriptions) * [Market Prices](https://docs.limitless.exchange/developers/sdk/typescript/websocket#market-prices) * [Authenticated Subscriptions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#authenticated-subscriptions) * [Positions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#positions) * [Transactions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#transactions) * [Events](https://docs.limitless.exchange/developers/sdk/typescript/websocket#events) * [orderbookUpdate (CLOB markets)](https://docs.limitless.exchange/developers/sdk/typescript/websocket#orderbookupdate-clob-markets) * [newPriceData (AMM markets)](https://docs.limitless.exchange/developers/sdk/typescript/websocket#newpricedata-amm-markets) * [positions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#positions-2) * [tx](https://docs.limitless.exchange/developers/sdk/typescript/websocket#tx) * [Type Definitions](https://docs.limitless.exchange/developers/sdk/typescript/websocket#type-definitions) * [Connection Management](https://docs.limitless.exchange/developers/sdk/typescript/websocket#connection-management) * [Disconnect handling](https://docs.limitless.exchange/developers/sdk/typescript/websocket#disconnect-handling) * [Graceful shutdown](https://docs.limitless.exchange/developers/sdk/typescript/websocket#graceful-shutdown) * [Debugging](https://docs.limitless.exchange/developers/sdk/typescript/websocket#debugging) * [Full Example](https://docs.limitless.exchange/developers/sdk/typescript/websocket#full-example) [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#websocketclient-setup) WebSocketClient Setup ----------------------------------------------------------------------------------------------------------------------- The `WebSocketClient` connects to the Limitless Exchange WebSocket server for real-time market data, position updates, and transaction notifications. import { WebSocketClient } from '@limitless-exchange/sdk'; const ws = new WebSocketClient({ url: 'wss://ws.limitless.exchange', autoReconnect: true, }); ws.connect(); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#constructor-options) Constructor Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `url` | `string` | — | WebSocket server URL | | `autoReconnect` | `boolean` | `true` | Automatically reconnect on disconnection | | `apiKey` | `string` | — | Required for authenticated subscriptions (positions, transactions) | Public subscriptions (market prices) do not require an API key. Authenticated subscriptions (positions, transactions) require the `apiKey` option to be set. [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#public-subscriptions) Public Subscriptions --------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#market-prices) Market Prices Subscribe to real-time price updates for one or more markets. No authentication required. const ws = new WebSocketClient({ url: 'wss://ws.limitless.exchange', }); ws.connect(); ws.subscribe('subscribe_market_prices', { marketSlugs: ['btc-100k-weekly', 'eth-5k-daily'], marketAddresses: ['0x1234...'], // For AMM markets }); Subscriptions **replace** previous ones. To listen to both CLOB (by slug) and AMM (by address) markets, include both `marketSlugs` and `marketAddresses` in a single `subscribe_market_prices` call. [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#authenticated-subscriptions) Authenticated Subscriptions ----------------------------------------------------------------------------------------------------------------------------------- These subscriptions require an API key passed to the constructor. const ws = new WebSocketClient({ url: 'wss://ws.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, }); ws.connect(); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#positions) Positions Subscribe to real-time updates when your positions change: ws.subscribe('subscribe_positions'); ws.on('positions', (data) => { console.log('Position update:', data); }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#transactions) Transactions Subscribe to transaction confirmations: ws.subscribe('subscribe_transactions'); ws.on('tx', (data) => { console.log('Transaction:', data.hash, data.status); }); [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#events) Events ----------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#orderbookupdate-clob-markets) orderbookUpdate (CLOB markets) Fired when a CLOB market orderbook changes. Contains the full updated orderbook. ws.on('orderbookUpdate', (data: OrderbookUpdate) => { console.log('Market:', data.marketSlug); console.log('Bids:', data.orderbook.bids.length); console.log('Asks:', data.orderbook.asks.length); if (data.orderbook.bids.length > 0 && data.orderbook.asks.length > 0) { const spread = data.orderbook.asks[0].price - data.orderbook.bids[0].price; console.log('Spread:', spread.toFixed(4)); } }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#newpricedata-amm-markets) newPriceData (AMM markets) Fired when AMM market prices update. ws.on('newPriceData', (data: NewPriceData) => { console.log('Market:', data.marketAddress); console.log('YES:', data.updatedPrices.yes); console.log('NO:', data.updatedPrices.no); }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#positions-2) positions Fired when any of your positions change (fill, cancel, resolution). ws.on('positions', (data: PositionEvent) => { console.log('Updated positions:', data); }); ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#tx) tx Fired on transaction events related to your account. ws.on('tx', (data: TransactionEvent) => { console.log('Tx hash:', data.hash); console.log('Status:', data.status); }); [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#type-definitions) Type Definitions ------------------------------------------------------------------------------------------------------------- interface OrderbookUpdate { marketSlug: string; orderbook: { bids: { price: number; size: number }[]; asks: { price: number; size: number }[]; }; } interface NewPriceData { marketAddress: string; updatedPrices: { yes: string; no: string; }; } interface PositionEvent { clob: Array<{ market: { slug: string }; positions: { yes: { size: number; collateral: number }; no: { size: number; collateral: number }; }; }>; } interface TransactionEvent { hash: string; status: 'pending' | 'confirmed' | 'failed'; type: string; } [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#connection-management) Connection Management ----------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#disconnect-handling) Disconnect handling Listen for disconnections and clean up resources: ws.on('disconnect', (reason: string) => { console.log('Disconnected:', reason); }); ws.on('reconnect', () => { console.log('Reconnected — resubscribing...'); ws.subscribe('subscribe_market_prices', { marketSlugs: ['btc-100k-weekly'], }); }); When `autoReconnect` is enabled, the client automatically attempts to reconnect. However, you must re-send your subscriptions after reconnection. Listen for the `reconnect` event to resubscribe. ### [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#graceful-shutdown) Graceful shutdown Clean up the WebSocket connection on process exit: process.on('SIGINT', () => { console.log('Shutting down...'); ws.disconnect(); process.exit(0); }); [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#debugging) Debugging ----------------------------------------------------------------------------------------------- Log all raw events to inspect the data the server sends: ws.onAny((eventName: string, ...args: unknown[]) => { console.log(`[WS] ${eventName}:`, JSON.stringify(args, null, 2)); }); Use raw event logging during development to discover event shapes and debug subscription issues. Remove it before deploying to production. [​](https://docs.limitless.exchange/developers/sdk/typescript/websocket#full-example) Full Example ----------------------------------------------------------------------------------------------------- A complete script that subscribes to market prices and positions: import { WebSocketClient } from '@limitless-exchange/sdk'; const ws = new WebSocketClient({ url: 'wss://ws.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, autoReconnect: true, }); ws.connect(); ws.subscribe('subscribe_market_prices', { marketSlugs: ['btc-100k-weekly'], }); ws.subscribe('subscribe_positions'); ws.subscribe('subscribe_transactions'); ws.on('orderbookUpdate', (data) => { const best_bid = data.orderbook.bids[0]; const best_ask = data.orderbook.asks[0]; console.log(`[${data.marketSlug}] Bid: ${best_bid?.price ?? '-'} | Ask: ${best_ask?.price ?? '-'}`); }); ws.on('positions', (data) => { console.log('[Positions]', JSON.stringify(data)); }); ws.on('tx', (data) => { console.log(`[Tx] ${data.hash} — ${data.status}`); }); ws.on('disconnect', (reason) => { console.log('[Disconnected]', reason); }); ws.on('reconnect', () => { ws.subscribe('subscribe_market_prices', { marketSlugs: ['btc-100k-weekly'], }); ws.subscribe('subscribe_positions'); ws.subscribe('subscribe_transactions'); }); process.on('SIGINT', () => { ws.disconnect(); process.exit(0); }); console.log('Listening for events... (Ctrl+C to stop)'); [Delegated Orders](https://docs.limitless.exchange/developers/sdk/typescript/delegated-orders) [Error Handling & Retry](https://docs.limitless.exchange/developers/sdk/typescript/error-handling) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # TypeScript SDK - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation TypeScript SDK TypeScript SDK [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#overview) * [Installation](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#installation) * [Quick Start](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#quick-start) * [Environment Variables](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#environment-variables) * [Client constructor](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#client-constructor) * [HttpClient (lower-level)](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#httpclient-lower-level) * [What You Can Build](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#what-you-can-build) * [Server Wallet Redemption and Withdrawal](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#server-wallet-redemption-and-withdrawal) * [Disclaimer](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#disclaimer) [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#overview) Overview --------------------------------------------------------------------------------------------------- The Limitless Exchange TypeScript SDK provides a type-safe client for interacting with both **CLOB** and **NegRisk** prediction markets. It handles authentication, EIP-712 order signing, market data fetching, portfolio tracking, and real-time WebSocket streaming out of the box. Source code and issue tracker are available on [GitHub](https://github.com/limitless-labs-group/limitless-exchange-ts-sdk) . [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#installation) Installation ----------------------------------------------------------------------------------------------------------- * npm * yarn * pnpm npm install @limitless-exchange/sdk yarn add @limitless-exchange/sdk pnpm add @limitless-exchange/sdk [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#quick-start) Quick Start --------------------------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#) Configure environment variables Create a `.env` file in your project root (and add it to `.gitignore`): LIMITLESS_API_KEY=lmts_your_api_key_here PRIVATE_KEY=0xYourPrivateKeyHere # Partner/programmatic mode (HMAC) LMTS_TOKEN_ID=your_token_id LMTS_TOKEN_SECRET=your_base64_secret The SDK automatically reads `LIMITLESS_API_KEY` from the environment if no `apiKey` is passed to the constructor. 2 [](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#) Initialize the HTTP client import { HttpClient } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', }); 3 [](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#) Fetch active markets import { MarketFetcher } from '@limitless-exchange/sdk'; const marketFetcher = new MarketFetcher(httpClient); const markets = await marketFetcher.getActiveMarkets({ limit: 10, sortBy: 'newest', }); for (const market of markets) { console.log(market.slug, market.title); } 4 [](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#) Authenticate for trading For operations that require authentication (placing orders, fetching portfolio), supply your API key and wallet: import { ethers } from 'ethers'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: process.env.LIMITLESS_API_KEY, }); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!); [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#environment-variables) Environment Variables ----------------------------------------------------------------------------------------------------------------------------- | Variable | Required | Description | | --- | --- | --- | | `LIMITLESS_API_KEY` | Legacy auth only | Deprecated API key value, auto-loaded by the SDK. | | `LMTS_TOKEN_ID` | Partner/programmatic mode | Scoped token ID used for HMAC request signing. | | `LMTS_TOKEN_SECRET` | Partner/programmatic mode | Base64 token secret used for HMAC request signing. | | `PRIVATE_KEY` | For order signing | Ethereum private key used for EIP-712 order signatures. Never commit to version control. | [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#client-constructor) Client constructor ----------------------------------------------------------------------------------------------------------------------- The recommended entrypoint is the root `Client` class, which composes all domain services (markets, portfolio, orders, API tokens, partner accounts, delegated orders): import { Client } from '@limitless-exchange/sdk'; const client = new Client({ baseURL: 'https://api.limitless.exchange', apiKey: 'lmts_...', }); For partner integrations using HMAC authentication: const client = new Client({ baseURL: 'https://api.limitless.exchange', hmacCredentials: { tokenId: process.env.LMTS_TOKEN_ID!, secret: process.env.LMTS_TOKEN_SECRET!, }, }); With `hmacCredentials` set, the SDK automatically generates and sends `lmts-api-key`, `lmts-timestamp`, and `lmts-signature` on each request. Do not manually build HMAC headers when using the SDK client. | Option | Type | Default | Description | | --- | --- | --- | --- | | `baseURL` | `string` | — | API base URL | | `apiKey` | `string` | `process.env.LIMITLESS_API_KEY` | Legacy API key authentication | | `hmacCredentials` | `{ tokenId, secret }` | — | HMAC credentials for scoped API token auth (see [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api)
) | | `timeout` | `number` | `30000` | Request timeout in milliseconds | | `additionalHeaders` | `Record` | `{}` | Additional headers sent with every request | ### [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#httpclient-lower-level) HttpClient (lower-level) You can also use `HttpClient` directly for more control: import { HttpClient } from '@limitless-exchange/sdk'; const httpClient = new HttpClient({ baseURL: 'https://api.limitless.exchange', apiKey: 'lmts_...', }); [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#what-you-can-build) What You Can Build ----------------------------------------------------------------------------------------------------------------------- Markets ------- Discover markets, fetch orderbooks, and query NegRisk groups. Market Pages ------------ Browse markets by category with navigation, filters, and pagination. Trading and Orders ------------------ Create GTC and FOK orders, manage approvals, and cancel orders. Portfolio and Positions ----------------------- Track CLOB and AMM positions, PnL, and trade history. API Tokens ---------- Derive, list, and revoke scoped HMAC tokens for partner integrations. Partner Accounts ---------------- Create sub-accounts with server wallets or EOA verification. Delegated Orders ---------------- Place orders on behalf of sub-accounts with server-side signing. WebSocket Streaming ------------------- Real-time orderbook, price, position, and transaction events. [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#server-wallet-redemption-and-withdrawal) Server Wallet Redemption and Withdrawal ----------------------------------------------------------------------------------------------------------------------------------------------------------------- For partner server-wallet sub-accounts, the SDK now provides helper methods for payout settlement and treasury movement (v1.0.6+): * [`POST /portfolio/redeem`](https://docs.limitless.exchange/api-reference/portfolio/redeem) — claim resolved positions * [`POST /portfolio/withdraw`](https://docs.limitless.exchange/api-reference/portfolio/withdraw) — transfer ERC20 funds from managed sub-accounts Required scopes for `apiToken` auth: `trading` for redeem and `withdrawal` for withdraw. See the full flow and scope guidance in [Programmatic API](https://docs.limitless.exchange/developers/programmatic-api) . [​](https://docs.limitless.exchange/developers/sdk/typescript/getting-started#disclaimer) Disclaimer ------------------------------------------------------------------------------------------------------- **USE AT YOUR OWN RISK.** This SDK and the Limitless Exchange protocol are provided as-is with no warranties. You are solely responsible for any funds used or lost. By using this SDK, you acknowledge that prediction markets involve financial risk. The Limitless Exchange is not available to users in the United States or other restricted jurisdictions. Ensure compliance with your local laws before trading. [WebSocket Integration](https://docs.limitless.exchange/developers/quickstart/websocket) [Markets](https://docs.limitless.exchange/developers/sdk/typescript/markets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Error Handling & Retry - Limitless Exchange [Skip to main content](https://docs.limitless.exchange/developers/sdk/python/error-handling#content-area) [Limitless Exchange home page![light logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b)![dark logo](https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max&auto=format&n=r7gW3TwphUtCZ8zM&q=85&s=6500e01609e582f758db1a9610b63bd8)](https://docs.limitless.exchange/) Search... ⌘KAsk AI Search... Navigation Python SDK Error Handling & Retry [User Guide](https://docs.limitless.exchange/) [For Developers](https://docs.limitless.exchange/developers/introduction) [API Reference](https://docs.limitless.exchange/api-reference/introduction) On this page * [Overview](https://docs.limitless.exchange/developers/sdk/python/error-handling#overview) * [APIError](https://docs.limitless.exchange/developers/sdk/python/error-handling#apierror) * [Common Status Codes](https://docs.limitless.exchange/developers/sdk/python/error-handling#common-status-codes) * [Retry Decorator](https://docs.limitless.exchange/developers/sdk/python/error-handling#retry-decorator) * [RetryableClient](https://docs.limitless.exchange/developers/sdk/python/error-handling#retryableclient) * [Debugging with ConsoleLogger](https://docs.limitless.exchange/developers/sdk/python/error-handling#debugging-with-consolelogger) * [Best Practices](https://docs.limitless.exchange/developers/sdk/python/error-handling#best-practices) * [Known Issues and Workarounds](https://docs.limitless.exchange/developers/sdk/python/error-handling#known-issues-and-workarounds) [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#overview) Overview ---------------------------------------------------------------------------------------------- The SDK provides structured error types, a retry decorator for transient failures, and configurable logging to help you build resilient trading applications. [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#apierror) APIError ---------------------------------------------------------------------------------------------- All non-2xx HTTP responses from the API raise an `APIError` exception: from limitless_sdk.api import APIError try: result = await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) except APIError as e: print(f"Status: {e.status_code}") print(f"Message: {e.message}") | Property | Type | Description | | --- | --- | --- | | `status_code` | `int` | HTTP status code (e.g. `400`, `401`, `429`, `500`) | | `message` | `str` | Raw JSON response body from the API | ### [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#common-status-codes) Common Status Codes | Code | Meaning | Typical Cause | | --- | --- | --- | | `400` | Bad Request | Invalid order parameters, malformed payload | | `401` | Unauthorized | Missing or invalid API key | | `403` | Forbidden | Insufficient permissions or geographic restriction | | `404` | Not Found | Invalid market slug or order ID | | `429` | Too Many Requests | Rate limit exceeded | | `500` | Internal Server Error | Transient server-side failure | [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#retry-decorator) Retry Decorator ------------------------------------------------------------------------------------------------------------ Use the `@retry_on_errors` decorator to automatically retry operations that fail with specific status codes: from limitless_sdk.api import retry_on_errors @retry_on_errors( status_codes={500, 429}, max_retries=3, delays=[1, 2, 4], # seconds between retries (exponential backoff) on_retry=lambda attempt, error: print(f"Retry {attempt}: {error}"), ) async def place_order_with_retry(): return await order_client.create_order( token_id=market.tokens.yes, price=0.65, size=10.0, side=Side.BUY, order_type=OrderType.GTC, market_slug="btc-above-100k-march-2025", ) result = await place_order_with_retry() | Parameter | Type | Description | | --- | --- | --- | | `status_codes` | `set[int]` | HTTP status codes that trigger a retry | | `max_retries` | `int` | Maximum number of retry attempts | | `delays` | `list[float]` | Delay in seconds before each retry (supports exponential backoff) | | `on_retry` | `callable \| None` | Optional callback invoked on each retry with `(attempt, error)` | The decorator only retries on `APIError` exceptions whose `status_code` is in the `status_codes` set. All other exceptions propagate immediately. [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#retryableclient) RetryableClient ------------------------------------------------------------------------------------------------------------ For broader retry coverage, wrap your `HttpClient` with the `RetryableClient`. This applies retry logic to **all** API calls made through the client: from limitless_sdk.api import HttpClient, RetryableClient http_client = HttpClient() retryable_client = RetryableClient( client=http_client, status_codes={500, 502, 503, 429}, max_retries=3, delays=[1, 2, 4], ) # Use retryable_client in place of http_client market_fetcher = MarketFetcher(retryable_client) order_client = OrderClient(retryable_client, account) Use `RetryableClient` for automated trading bots that need resilience against transient failures without decorating every function individually. [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#debugging-with-consolelogger) Debugging with ConsoleLogger -------------------------------------------------------------------------------------------------------------------------------------- Enable verbose logging to trace requests, responses, and internal operations: from limitless_sdk.types import ConsoleLogger, LogLevel logger = ConsoleLogger(level=LogLevel.DEBUG) At `DEBUG` level, the logger outputs: * Request and response headers * Venue cache hits and misses * Full API response bodies * Retry attempts and delays * WebSocket connection state changes Example DEBUG output [DEBUG] GET /markets/btc-above-100k-march-2025 [DEBUG] Headers: {'X-API-Key': 'lmts_***', 'Content-Type': 'application/json'} [DEBUG] Response 200 in 142ms [DEBUG] Venue cached for btc-above-100k-march-2025: exchange=0xA1b2... adapter=0xD4e5... [DEBUG] POST /orders [DEBUG] Response 429 in 38ms [DEBUG] Retry 1/3 after 1s — status 429 [DEBUG] POST /orders [DEBUG] Response 200 in 156ms [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#best-practices) Best Practices ---------------------------------------------------------------------------------------------------------- 1 [](https://docs.limitless.exchange/developers/sdk/python/error-handling#) Always handle APIError Wrap every API call in a try/except block. Log the `status_code` and `message` for diagnostics: try: result = await order_client.create_order(...) except APIError as e: logger.error(f"Order failed: {e.status_code} — {e.message}") 2 [](https://docs.limitless.exchange/developers/sdk/python/error-handling#) Retry only transient errors Limit retries to status codes like `429` (rate limit) and `5xx` (server errors). Do not retry `400` (bad request) or `401` (auth failure) as these require corrective action: @retry_on_errors(status_codes={429, 500, 502, 503}) async def resilient_call(): ... 3 [](https://docs.limitless.exchange/developers/sdk/python/error-handling#) Use exponential backoff Increase delays between retries to avoid overwhelming the API: @retry_on_errors( status_codes={429, 500}, max_retries=4, delays=[1, 2, 4, 8], ) async def backoff_call(): ... 4 [](https://docs.limitless.exchange/developers/sdk/python/error-handling#) Close the client on exit Always close the `HttpClient` to release connections, even if an error occurs: try: # ... your trading logic finally: await http_client.close() 5 [](https://docs.limitless.exchange/developers/sdk/python/error-handling#) Use DEBUG logging during development Enable `LogLevel.DEBUG` to see the full request/response cycle. Switch to `INFO` or `WARN` in production to reduce noise. [​](https://docs.limitless.exchange/developers/sdk/python/error-handling#known-issues-and-workarounds) Known Issues and Workarounds -------------------------------------------------------------------------------------------------------------------------------------- NoOpLogger .warning() bug The SDK’s `NoOpLogger` calls `.warning()` but the logger interface only defines `.warn()`. Add this patch at the top of your script: from limitless_sdk.types.logger import NoOpLogger NoOpLogger.warning = lambda self, msg, context=None: None get\_orderbook() Pydantic validation error `MarketFetcher.get_orderbook()` may throw a Pydantic `ValidationError` when `lastTradePrice` is `null`. Use `curl` as a workaround: import subprocess, json def get_orderbook(slug: str): r = subprocess.run( ['curl', '-s', f'https://api.limitless.exchange/markets/{slug}/orderbook'], capture_output=True, text=True, ) return json.loads(r.stdout) urllib.request returns 403 Python’s built-in `urllib.request` gets blocked by the API (403 Forbidden). Use the SDK’s `HttpClient`, the `requests` library, or `curl` via subprocess instead. [WebSocket Streaming](https://docs.limitless.exchange/developers/sdk/python/websocket) [Go SDK](https://docs.limitless.exchange/developers/sdk/go/getting-started) ⌘I Assistant Responses are generated using AI and may contain mistakes. ---