CCXT

limitless

limitless prediction-market exchange — CCXT unified API: methods, parameters and endpoints.

limitless

Kind: global class
Extends: Exchange

fetchMarkets

fetches all active limitless markets paginated and returns one CCXT market per child market, each containing a list of outcome objects (YES/NO)

Kind: instance method of limitless
Returns: Array<object> - an array of objects representing market data

See: https://docs.limitless.exchange/api-reference/markets/get-active-markets

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.querystringNoa single search query string to filter markets by
params.queriesArray<string>Nomultiple search query strings (alternative to query)
params.limitintNomax number of markets to collect (defaults to options.fetchMarketsLimit, 1000); caps the pages fetched
limitless.fetchMarkets (params?)

fetchEvent

fetches a single prediction-market event by its market slug or address

Kind: instance method of limitless
Returns: object - a prediction event structure

See: https://docs.limitless.exchange/api-reference/markets/get-market

ParamTypeRequiredDescription
idstringYesthe market slug or address
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchEvent (id, params?)

fetchTicker

fetches the current price and best bid/ask for a single outcome token, combining the market detail and order book endpoints

Kind: instance method of limitless
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
outcomestringYesunified outcome like TRUMP_OUT_PRESIDENT_2027:YES or an outcome token id
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchTicker (outcome, params?)

fetchTickers

fetches tickers for multiple outcome tokens, grouping requested outcomes by their parent market (two requests per market: detail + order book)

Kind: instance method of limitless
Returns: object - a dictionary of ticker structures indexed by outcome

See

ParamTypeRequiredDescription
outcomesArray<string>Yesunified outcomes or outcome token ids — required: limitless has no endpoint returning all tickers at once, so an unscoped call is not supported
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchTickers (outcomes, params?)

fetchTrades

fetches recent public trades for a single outcome token from the market events feed

Kind: instance method of limitless
Returns: Array<object> - a list of trade structures

See: https://docs.limitless.exchange/api-reference/trading/market-events

ParamTypeRequiredDescription
outcomestringYesunified outcome like TRUMP_OUT_PRESIDENT_2027:YES or an outcome token id
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum number of trades to return
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchTrades (outcome, since?, limit?, params?)

fetchOrderBook

fetches the order book for a single outcome token, converting 6-decimal USDC sizes to whole units, no outcomes are quoted at 1 - price with the sides swapped

Kind: instance method of limitless
Returns: object - an order book structure

See: https://docs.limitless.exchange/api-reference/trading/orderbook

ParamTypeRequiredDescription
outcomestringYesunified outcome like TRUMP_OUT_PRESIDENT_2027:YES or an outcome token id
limitintNonot used by limitless fetchOrderBook
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOrderBook (outcome, limit?, params?)

fetchOHLCV

fetches historical prices for a single limitless market outcome and maps them to OHLCV format, uses the interval query parameter and selects the YES/NO series that matches the requested outcome

Kind: instance method of limitless
Returns: Array<Array<int>> - a list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.limitless.exchange/api-reference/trading/historical-price

ParamTypeRequiredDescription
outcomestringYesoutcome, e.g. "TRUMP_OUT:YES"
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum number of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOHLCV (outcome, timeframe, since?, limit?, params?)

fetchOrders

fetches orders for the authenticated user for a single outcome

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/orders/get-user-orders

ParamTypeRequiredDescription
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOrders (outcome?, since?, limit?, params?)

fetchOpenOrders

fetches open orders for the authenticated user for a single outcome

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/orders/get-user-orders

ParamTypeRequiredDescription
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOpenOrders (outcome?, since?, limit?, params?)

fetchClosedOrders

fetches closed orders for the authenticated user for a single outcome

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/orders/get-user-orders

ParamTypeRequiredDescription
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchClosedOrders (outcome?, since?, limit?, params?)

fetchOrdersByIds

fetch orders by the list of order id

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/trading/order-status-batch

ParamTypeRequiredDescription
idsArray<string>Yeslist of order id
outcomestringNomarket outcome, e.g. "TRUMP_OUT:YES"
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOrdersByIds (ids, outcome?, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of limitless
Returns: object - an order structure

See: https://docs.limitless.exchange/api-reference/trading/order-status-batch

ParamTypeRequiredDescription
idstringYesthe order id
outcomestringNomarket outcome, e.g. "TRUMP_OUT:YES"
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchOrder (id, outcome?, params?)

fetchAccounts

query for account id and info

Kind: instance method of limitless
Returns: Array<object> - a list of [account structures]

See: https://docs.limitless.exchange/api-reference/portfolio/get-current-profile

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchAccounts (params?)

createOrder

places a limit or market order on limitless for the given outcome token

Kind: instance method of limitless
Returns: object - an order structure

See: https://docs.limitless.exchange/api-reference/orders/create-order

ParamTypeRequiredDescription
outcomestringYesoutcome, e.g. "TRUMP_OUT:YES"
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesamount of outcome tokens
pricefloatNolimit price (0–1 range)
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.createOrder (outcome, type, side, amount, price?, params?)

approve

sets the on-chain ERC20 collateral (USDC) allowance for the limitless exchange contract on Base, which is required before an EOA maker can place orders ("Insufficient collateral allowance" otherwise). Sends a real on-chain transaction signed with the privateKey and waits for the receipt

Kind: instance method of limitless
Returns: object - the transaction receipt

ParamTypeRequiredDescription
paramsobjectNoextra parameters
params.tokenstringNothe collateral token address (default USDC on Base)
params.spenderstringNothe exchange contract to approve (default the limitless CTF exchange); read from a market's venue when omitted
params.ownerstringNothe token holder address (default this.walletAddress or the address derived from the privateKey)
params.amountfloatNothe allowance in USDC (default: unlimited / maxUint256)
params.rpcUrlstringNothe Base RPC url to broadcast through
params.gasLimitstringNogas limit hex for the approve tx (default '0x186a0')
limitless.approve (params?)

cancelOrder

cancels a single open order by id

Kind: instance method of limitless
Returns: object - an order structure

See: https://docs.limitless.exchange/api-reference/orders/cancel-order

ParamTypeRequiredDescription
idstringYesorder id
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.cancelOrder (id, outcome?, params?)

redeem

redeem a resolved winning position back to collateral (gasless — the operator settles on-chain)

Kind: instance method of limitless
Returns: object - the raw redemption response

See: https://docs.limitless.exchange/api-reference/portfolio/redeem

ParamTypeRequiredDescription
outcomestringNoa unified outcome on the resolved market to redeem (used to resolve the market conditionId)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.conditionIdstringNothe CTF condition id (bytes32 hex) to redeem directly, instead of resolving it from an outcome
limitless.redeem (outcome?, params?)

cancelOrders

cancel multiple orders at the same time

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/trading/cancel-batch

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
outcomestringNounified market outcome, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.cancelOrders (ids, outcome?, params?)

cancelAllOrders

cancels all open orders for one market slug

Kind: instance method of limitless
Returns: Array<object> - a list of order structures

See: https://docs.limitless.exchange/api-reference/orders/cancel-all-orders

ParamTypeRequiredDescription
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
paramsobjectNoextra parameters specific to the exchange API endpoint
params.slugstringNothe market slug to cancel all orders for
limitless.cancelAllOrders (outcome?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of limitless
Returns: Array<object> - a list of trade structures

See: https://docs.limitless.exchange/api-reference/trades/get-trades

ParamTypeRequiredDescription
outcomestringNooutcome, e.g. "TRUMP_OUT:YES"
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchMyTrades (outcome?, since?, limit?, params?)

fetchPositions

fetches open positions for the authenticated limitless user from the portfolio endpoint

Kind: instance method of limitless
Returns: Array<object> - a list of position structures

See: https://docs.limitless.exchange/api-reference/portfolio/get-positions

ParamTypeRequiredDescription
outcomesArray<string>Nofilter by outcome ids or outcomes
paramsobjectNoextra parameters specific to the exchange API endpoint
limitless.fetchPositions (outcomes?, params?)

fetchEvents

fetches prediction-market events matching the given scope (query/queries/tags/eventId/slug — required) and caches their markets and outcomes on the instance

Kind: instance method of limitless
Returns: Array<object> - an array of event structures

See: https://docs.limitless.exchange/api-reference/markets/search

ParamTypeRequiredDescription
paramsobjectNoextra exchange-specific parameters
params.querystringNoa single search term; an eventId/slug does a direct lookup and tags resolve to limitless categories, paging only those categories' listings
params.queriesArray<string>Nomultiple search terms (alternative to query)
params.tagsArray<string>Nocategory names to scope by (matched against GET /categories, e.g. ['crypto'])
params.eventIdstringNodirect lookup by market address or slug
params.limitintNomaximum number of markets per query, defaults to 50
limitless.fetchEvents (params?)

On this page