pmxtjs - API Reference

A unified TypeScript SDK for interacting with multiple prediction market exchanges (Polymarket, Kalshi, Limitless) identically.

Installation

npm install pmxtjs

Quick Start

import pmxt from 'pmxtjs';

// Initialize exchanges (server starts automatically!)
const poly = new pmxt.Polymarket();
const kalshi = new pmxt.Kalshi();
const limitless = new pmxt.Limitless(); // Requires API key for authenticated operations

// Search for markets
const markets = await poly.fetchMarkets({ query: "Trump" });
console.log(markets[0].title);

Note: This SDK automatically manages the PMXT sidecar server.


Server Management

The SDK provides global functions to manage the background sidecar server. This is useful for clearing state or resolving "port busy" errors.

stopServer

Stop the background PMXT sidecar server and clean up lock files.

import pmxt from 'pmxtjs';
await pmxt.stopServer();

restartServer

Restart the background PMXT sidecar server. Equivalent to calling stopServer() followed by a fresh start.

import pmxt from 'pmxtjs';
await pmxt.restartServer();

Methods

loadMarkets

How long (ms) a market snapshot created by fetchMarketsPaginated remains valid

Signature:

async loadMarkets(reload: boolean): Promise<Record<string, UnifiedMarket>>

Parameters:

  • reload (boolean): Force a fresh fetch from the API even if markets are already loaded

Returns: Promise<Record<string, UnifiedMarket>> - Dictionary of markets indexed by marketId

Example:

// Stable pagination
await exchange.loadMarkets();
const all = Object.values(exchange.markets);
const page1 = all.slice(0, 100);
const page2 = all.slice(100, 200);

fetchMarkets

Fetch markets with optional filtering, search, or slug lookup.

Signature:

async fetchMarkets(params?: MarketFetchParams): Promise<UnifiedMarket[]>

Parameters:

  • params (MarketFetchParams) - Optional: Optional parameters for filtering and search
    • params.query - Search keyword to filter markets
    • params.slug - Market slug/ticker for direct lookup
    • params.limit - Maximum number of results
    • params.offset - Pagination offset
    • params.sort - Sort order ('volume' | 'liquidity' | 'newest')
    • params.searchIn - Where to search ('title' | 'description' | 'both')

Returns: Promise<UnifiedMarket[]> - Array of unified markets

Example:

// Fetch markets
const markets = await exchange.fetchMarkets({ query: 'Trump', limit: 10000 });
console.log(markets[0].title);

// Get market by slug
const markets = await exchange.fetchMarkets({ slug: 'will-trump-win' });

Notes: ordering — exchanges may reorder or add markets between requests. For stable iteration across pages, use loadMarkets() and paginate over Object.values(exchange.markets). Some exchanges (like Limitless) may only support status 'active' for search results.


fetchMarketsPaginated

Fetch markets with cursor-based pagination backed by a stable in-memory snapshot.

Signature:

async fetchMarketsPaginated(params?: { limit?: number; cursor?: string }): Promise<PaginatedMarketsResult>

Parameters:

  • params ({ limit?: number; cursor?: string }) - Optional: params
    • params.limit - Page size (default: return all markets)
    • params.cursor - Opaque cursor returned by a previous call

Returns: Promise<PaginatedMarketsResult> - PaginatedMarketsResult with data, total, and optional nextCursor

Example:

// No example available

fetchEvents

Fetch events with optional keyword search.

Signature:

async fetchEvents(params?: EventFetchParams): Promise<UnifiedEvent[]>

Parameters:

  • params (EventFetchParams) - Optional: Optional parameters for search and filtering
    • params.query - Search keyword to filter events. If omitted, returns top events by volume.
    • params.limit - Maximum number of results
    • params.offset - Pagination offset
    • params.searchIn - Where to search ('title' | 'description' | 'both')

Returns: Promise<UnifiedEvent[]> - Array of unified events

Example:

// Search events
const events = await exchange.fetchEvents({ query: 'Fed Chair' });
const fedEvent = events[0];
console.log(fedEvent.title, fedEvent.markets.length, 'markets');

Notes: Some exchanges (like Limitless) may only support status 'active' for search results.


fetchMarket

Fetch a single market by lookup parameters.

Signature:

async fetchMarket(params?: MarketFetchParams): Promise<UnifiedMarket>

Parameters:

  • params (MarketFetchParams) - Optional: Lookup parameters (marketId, outcomeId, slug, etc.)

Returns: Promise<UnifiedMarket> - A single unified market

Example:

// Fetch by market ID
const market = await exchange.fetchMarket({ marketId: '663583' });

// Fetch by outcome ID
const market = await exchange.fetchMarket({ outcomeId: '10991849...' });

fetchEvent

Fetch a single event by lookup parameters.

Signature:

async fetchEvent(params?: EventFetchParams): Promise<UnifiedEvent>

Parameters:

  • params (EventFetchParams) - Optional: Lookup parameters (eventId, slug, query)

Returns: Promise<UnifiedEvent> - A single unified event

Example:

// Fetch by event ID
const event = await exchange.fetchEvent({ eventId: 'TRUMP25DEC' });

fetchOHLCV

Fetch historical OHLCV (candlestick) price data for a specific market outcome.

Signature:

async fetchOHLCV(id: string, params: OHLCVParams): Promise<PriceCandle[]>

Parameters:

  • id (string): The Outcome ID (outcomeId). Use outcome.outcomeId, NOT market.marketId
  • params (OHLCVParams): OHLCV parameters including resolution (required)

Returns: Promise<PriceCandle[]> - Array of price candles

Example:

// Fetch hourly candles
const markets = await exchange.fetchMarkets({ query: 'Trump' });
const outcomeId = markets[0].yes.outcomeId;
const candles = await exchange.fetchOHLCV(outcomeId, {
  resolution: '1h',
  limit: 100
});
console.log(`Latest close: ${candles[candles.length - 1].close}`);

Notes: CRITICAL: Use outcome.outcomeId (TS) / outcome.outcome_id (Python), not the market ID. Polymarket: outcomeId is the CLOB Token ID. Kalshi: outcomeId is the Market Ticker. Resolution options: '1m' | '5m' | '15m' | '1h' | '6h' | '1d'


fetchOrderBook

Fetch the current order book (bids/asks) for a specific outcome.

Signature:

async fetchOrderBook(id: string): Promise<OrderBook>

Parameters:

  • id (string): The Outcome ID (outcomeId)

Returns: Promise<OrderBook> - Current order book with bids and asks

Example:

// Fetch order book
const book = await exchange.fetchOrderBook(outcome.outcomeId);
console.log(`Best bid: ${book.bids[0].price}`);
console.log(`Best ask: ${book.asks[0].price}`);
console.log(`Spread: ${(book.asks[0].price - book.bids[0].price) * 100}%`);

fetchTrades

Fetch raw trade history for a specific outcome.

Signature:

async fetchTrades(id: string, params: TradesParams | HistoryFilterParams): Promise<Trade[]>

Parameters:

  • id (string): The Outcome ID (outcomeId)
  • params (TradesParams | HistoryFilterParams): Trade filter parameters

Returns: Promise<Trade[]> - Array of recent trades

Example:

// Fetch recent trades
const trades = await exchange.fetchTrades(outcome.outcomeId, { limit: 100 });
for (const trade of trades) {
  console.log(`${trade.side} ${trade.amount} @ ${trade.price}`);
}

Notes: Polymarket requires an API key for trade history. Use fetchOHLCV for public historical data.


createOrder

Place a new order on the exchange.

Signature:

async createOrder(params: CreateOrderParams): Promise<Order>

Parameters:

Returns: Promise<Order> - The created order

Example:

// Place a limit order
const order = await exchange.createOrder({
  marketId: market.marketId,
  outcomeId: market.yes.outcomeId,
  side: 'buy',
  type: 'limit',
  amount: 10,
  price: 0.55
});
console.log(`Order ${order.id}: ${order.status}`);

// Place a market order
const order = await exchange.createOrder({
  marketId: market.marketId,
  outcomeId: market.yes.outcomeId,
  side: 'buy',
  type: 'market',
  amount: 5
});

buildOrder

Build an order payload without submitting it to the exchange.

Signature:

async buildOrder(params: CreateOrderParams): Promise<BuiltOrder>

Parameters:

Returns: Promise<BuiltOrder> - A BuiltOrder containing the exchange-native payload

Example:

// Build then inspect a Polymarket order
const built = await exchange.buildOrder({
  marketId: market.marketId,
  outcomeId: market.yes.outcomeId,
  side: 'buy',
  type: 'limit',
  amount: 10,
  price: 0.55
});
console.log(built.signedOrder); // EIP-712 signed order struct
const order = await exchange.submitOrder(built);

submitOrder

Submit a pre-built order returned by buildOrder().

Signature:

async submitOrder(built: BuiltOrder): Promise<Order>

Parameters:

  • built (BuiltOrder): A BuiltOrder from buildOrder()

Returns: Promise<Order> - The submitted order

Example:

// Submit a pre-built order
const built = await exchange.buildOrder(params);
const order = await exchange.submitOrder(built);
console.log(`Order ${order.id}: ${order.status}`);

cancelOrder

Cancel an existing open order.

Signature:

async cancelOrder(orderId: string): Promise<Order>

Parameters:

  • orderId (string): The order ID to cancel

Returns: Promise<Order> - The cancelled order

Example:

// Cancel an order
const cancelled = await exchange.cancelOrder('order-123');
console.log(cancelled.status); // 'cancelled'

fetchOrder

Fetch a specific order by ID.

Signature:

async fetchOrder(orderId: string): Promise<Order>

Parameters:

  • orderId (string): The order ID to look up

Returns: Promise<Order> - The order details

Example:

// Fetch order status
const order = await exchange.fetchOrder('order-456');
console.log(`Filled: ${order.filled}/${order.amount}`);

fetchOpenOrders

Fetch all open orders, optionally filtered by market.

Signature:

async fetchOpenOrders(marketId?: string): Promise<Order[]>

Parameters:

  • marketId (string) - Optional: Optional market ID to filter by

Returns: Promise<Order[]> - Array of open orders

Example:

// Fetch all open orders
const orders = await exchange.fetchOpenOrders();
for (const order of orders) {
  console.log(`${order.side} ${order.amount} @ ${order.price}`);
}

// Fetch orders for a specific market
const orders = await exchange.fetchOpenOrders('FED-25JAN');

fetchPositions

Fetch current user positions across all markets.

Signature:

async fetchPositions(): Promise<Position[]>

Parameters:

  • None

Returns: Promise<Position[]> - Array of user positions

Example:

// Fetch positions
const positions = await exchange.fetchPositions();
for (const pos of positions) {
  console.log(`${pos.outcomeLabel}: ${pos.size} @ $${pos.entryPrice}`);
  console.log(`Unrealized P&L: $${pos.unrealizedPnL.toFixed(2)}`);
}

fetchBalance

Fetch account balances.

Signature:

async fetchBalance(): Promise<Balance[]>

Parameters:

  • None

Returns: Promise<Balance[]> - Array of account balances

Example:

// Fetch balance
const balances = await exchange.fetchBalance();
console.log(`Available: $${balances[0].available}`);

getExecutionPrice

Calculate the volume-weighted average execution price for a given order size.

Signature:

async getExecutionPrice(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): Promise<number>

Parameters:

  • orderBook (OrderBook): The current order book
  • side ('buy' | 'sell'): 'buy' or 'sell'
  • amount (number): Number of contracts to simulate

Returns: Promise<number> - Average execution price, or 0 if insufficient liquidity

Example:

// Get execution price
const book = await exchange.fetchOrderBook(outcome.outcomeId);
const price = exchange.getExecutionPrice(book, 'buy', 100);
console.log(`Avg price for 100 contracts: ${price}`);

getExecutionPriceDetailed

Calculate detailed execution price information including partial fill data.

Signature:

async getExecutionPriceDetailed(orderBook: OrderBook, side: 'buy' | 'sell', amount: number): Promise<ExecutionPriceResult>

Parameters:

  • orderBook (OrderBook): The current order book
  • side ('buy' | 'sell'): 'buy' or 'sell'
  • amount (number): Number of contracts to simulate

Returns: Promise<ExecutionPriceResult> - Detailed execution result with price, filled amount, and fill status

Example:

// Get detailed execution price
const book = await exchange.fetchOrderBook(outcome.outcomeId);
const result = exchange.getExecutionPriceDetailed(book, 'buy', 100);
console.log(`Price: ${result.price}`);
console.log(`Filled: ${result.filledAmount}/${100}`);
console.log(`Fully filled: ${result.fullyFilled}`);

filterMarkets

Filter a list of markets by criteria.

Signature:

async filterMarkets(markets: UnifiedMarket[], criteria: string | MarketFilterCriteria | MarketFilterFunction): Promise<UnifiedMarket[]>

Parameters:

  • markets (UnifiedMarket[]): Array of markets to filter
  • criteria (string | MarketFilterCriteria | MarketFilterFunction): Filter criteria: string (text search), object (structured), or function (predicate)

Returns: Promise<UnifiedMarket[]> - Filtered array of markets

Example:

// Simple text search
const filtered = exchange.filterMarkets(markets, 'Trump');

// Advanced criteria
const undervalued = exchange.filterMarkets(markets, {
  text: 'Election',
  volume24h: { min: 10000 },
  price: { outcome: 'yes', max: 0.4 }
});

// Custom predicate
const volatile = exchange.filterMarkets(markets,
  m => m.yes?.priceChange24h < -0.1
);

filterEvents

Filter a list of events by criteria.

Signature:

async filterEvents(events: UnifiedEvent[], criteria: string | EventFilterCriteria | EventFilterFunction): Promise<UnifiedEvent[]>

Parameters:

  • events (UnifiedEvent[]): Array of events to filter
  • criteria (string | EventFilterCriteria | EventFilterFunction): Filter criteria: string (text search), object (structured), or function (predicate)

Returns: Promise<UnifiedEvent[]> - Filtered array of events

Example:

// Filter by category
const filtered = exchange.filterEvents(events, {
  category: 'Politics',
  marketCount: { min: 5 }
});

watchOrderBook

Watch order book updates in real-time via WebSocket.

Signature:

async watchOrderBook(id: string, limit?: number): Promise<OrderBook>

Parameters:

  • id (string): The Outcome ID to watch
  • limit (number) - Optional: Optional limit for orderbook depth

Returns: Promise<OrderBook> - Promise that resolves with the current orderbook state

Example:

// Stream order book
while (true) {
  const book = await exchange.watchOrderBook(outcome.outcomeId);
  console.log(`Bid: ${book.bids[0]?.price} Ask: ${book.asks[0]?.price}`);
}

watchTrades

Watch trade executions in real-time via WebSocket.

Signature:

async watchTrades(id: string, since?: number, limit?: number): Promise<Trade[]>

Parameters:

  • id (string): The Outcome ID to watch
  • since (number) - Optional: Optional timestamp to filter trades from
  • limit (number) - Optional: Optional limit for number of trades

Returns: Promise<Trade[]> - Promise that resolves with recent trades

Example:

// Stream trades
while (true) {
  const trades = await exchange.watchTrades(outcome.outcomeId);
  for (const trade of trades) {
    console.log(`${trade.side} ${trade.amount} @ ${trade.price}`);
  }
}

close

Close all WebSocket connections and clean up resources.

Signature:

async close(): Promise<void>

Parameters:

  • None

Returns: Promise<void> - Result

Example:

// Close connections
await exchange.close();

implicitApi

Introspection getter: returns info about all implicit API methods.

Signature:

async implicitApi(): Promise<ImplicitApiMethodInfo[]>

Parameters:

  • None

Returns: Promise<ImplicitApiMethodInfo[]> - Result

Example:

// No example available

watchPrices

Watch AMM price updates for a market address (Limitless only).

Note: This method is only available on limitless exchange.

Signature:

async watchPrices(marketAddress: string, callback: (data: any)): Promise<void>

Parameters:

  • marketAddress (string): Market contract address
  • callback ((data: any)): Callback for price updates

Returns: Promise<void> - Result

Example:

// Watch prices
await exchange.watchPrices(marketAddress, (data) => {
  console.log('Price update:', data);
});

watchUserPositions

Watch user positions in real-time (Limitless only).

Note: This method is only available on limitless exchange.

Signature:

async watchUserPositions(callback: (data: any)): Promise<void>

Parameters:

  • callback ((data: any)): Callback for position updates

Returns: Promise<void> - Result

Example:

// Watch positions
await exchange.watchUserPositions((data) => {
  console.log('Position update:', data);
});

watchUserTransactions

Watch user transactions in real-time (Limitless only).

Note: This method is only available on limitless exchange.

Signature:

async watchUserTransactions(callback: (data: any)): Promise<void>

Parameters:

  • callback ((data: any)): Callback for transaction updates

Returns: Promise<void> - Result

Example:

// Watch transactions
await exchange.watchUserTransactions((data) => {
  console.log('Transaction:', data);
});

initAuth

Initialize L2 API credentials for implicit API signing.

Note: This method is only available on polymarket exchange.

Signature:

async initAuth(): Promise<void>

Parameters:

  • None

Returns: Promise<void> - Result

Example:

// No example available

preWarmMarket

Pre-warm the SDK's internal caches for a market outcome.

Note: This method is only available on polymarket exchange.

Signature:

async preWarmMarket(outcomeId: string): Promise<void>

Parameters:

  • outcomeId (string): The CLOB Token ID for the outcome (use outcome.outcomeId)

Returns: Promise<void> - Result

Example:

// Pre-warm before placing orders
const markets = await exchange.fetchMarkets({ query: 'Trump' });
const outcomeId = markets[0].outcomes[0].outcomeId;
await exchange.preWarmMarket(outcomeId);
// Subsequent createOrder calls are faster

getEventById

Fetch a single event by its numeric ID (Probable only).

Note: This method is only available on probable exchange.

Signature:

async getEventById(id: string): Promise<UnifiedEvent | null>

Parameters:

  • id (string): The numeric event ID

Returns: Promise<UnifiedEvent | null> - The UnifiedEvent, or null if not found

Example:

// Get event by ID
const event = await exchange.getEventById('42');
if (event) {
  console.log(event.title);
  console.log(event.markets.length, 'markets');
}

getEventBySlug

Fetch a single event by its URL slug (Probable only).

Note: This method is only available on probable exchange.

Signature:

async getEventBySlug(slug: string): Promise<UnifiedEvent | null>

Parameters:

  • slug (string): The event's URL slug (e.g. "trump-2024-election")

Returns: Promise<UnifiedEvent | null> - The UnifiedEvent, or null if not found

Example:

// Get event by slug
const event = await exchange.getEventBySlug('trump-2024-election');
if (event) {
  console.log(event.title);
}

Complete Trading Workflow

import pmxt from 'pmxtjs';

const exchange = new pmxt.Polymarket({
  privateKey: process.env.POLYMARKET_PRIVATE_KEY
});

// 1. Check balance
const [balance] = await exchange.fetchBalance();
console.log(`Available: $${balance.available}`);

// 2. Search for a market
const markets = await exchange.fetchMarkets({ query: 'Trump' });
const market = markets[0];
const outcome = market.yes;

console.log(market.title);
console.log(`Price: ${(outcome.price * 100).toFixed(1)}%`);

// 3. Place a limit order
const order = await exchange.createOrder({
  marketId: market.marketId,
  outcomeId: outcome.outcomeId,
  side: 'buy',
  type: 'limit',
  amount: 10,
  price: 0.50
});

console.log(`Order placed: ${order.id}`);

// 4. Check order status
const updatedOrder = await exchange.fetchOrder(order.id);
console.log(`Status: ${updatedOrder.status}`);
console.log(`Filled: ${updatedOrder.filled}/${updatedOrder.amount}`);

// 5. Cancel if needed
if (updatedOrder.status === 'open') {
  await exchange.cancelOrder(order.id);
  console.log('Order cancelled');
}

// 6. Check positions
const positions = await exchange.fetchPositions();
positions.forEach(pos => {
  console.log(`${pos.outcomeLabel}: ${pos.unrealizedPnL > 0 ? '+' : ''}$${pos.unrealizedPnL.toFixed(2)}`);
});

Data Models

UnifiedMarket

interface UnifiedMarket {
marketId: string; // The unique identifier for this market
title: string; // 
description: string; // 
outcomes: MarketOutcome[]; // 
eventId: string; // Link to parent event
resolutionDate: string; // 
volume24h: number; // 
volume: number; // 
liquidity: number; // 
openInterest: number; // 
url: string; // 
image: string; // 
category: string; // 
tags: string[]; // 
yes: MarketOutcome; // 
no: MarketOutcome; // 
up: MarketOutcome; // 
down: MarketOutcome; // 
}

MarketOutcome

interface MarketOutcome {
outcomeId: string; // Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)
marketId: string; // The market this outcome belongs to (set automatically)
label: string; // 
price: number; // 
priceChange24h: number; // 
metadata: object; // Exchange-specific metadata (e.g., clobTokenId for Polymarket)
}

UnifiedEvent

A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)

interface UnifiedEvent {
id: string; // 
title: string; // 
description: string; // 
slug: string; // 
markets: UnifiedMarket[]; // 
url: string; // 
image: string; // 
category: string; // 
tags: string[]; // 
}

PriceCandle

interface PriceCandle {
timestamp: number; // 
open: number; // 
high: number; // 
low: number; // 
close: number; // 
volume: number; // 
}

OrderBook

interface OrderBook {
bids: OrderLevel[]; // 
asks: OrderLevel[]; // 
timestamp: number; // 
}

OrderLevel

interface OrderLevel {
price: number; // 
size: number; // 
}

Trade

interface Trade {
id: string; // 
price: number; // 
amount: number; // 
side: string; // 
timestamp: number; // 
}

UserTrade

interface UserTrade {
id: string; // 
price: number; // 
amount: number; // 
side: string; // 
timestamp: number; // 
orderId: string; // 
outcomeId: string; // 
marketId: string; // 
}

Order

interface Order {
id: string; // 
marketId: string; // 
outcomeId: string; // 
side: string; // 
type: string; // 
price: number; // 
amount: number; // 
status: string; // 
filled: number; // 
remaining: number; // 
timestamp: number; // 
fee: number; // 
}

Position

interface Position {
marketId: string; // 
outcomeId: string; // 
outcomeLabel: string; // 
size: number; // 
entryPrice: number; // 
currentPrice: number; // 
unrealizedPnL: number; // 
realizedPnL: number; // 
}

Balance

interface Balance {
currency: string; // 
total: number; // 
available: number; // 
locked: number; // 
}

ExecutionPriceResult

interface ExecutionPriceResult {
price: number; // 
filledAmount: number; // 
fullyFilled: boolean; // 
}

PaginatedMarketsResult

interface PaginatedMarketsResult {
data: UnifiedMarket[]; // 
total: number; // 
nextCursor: string; // 
}

BuiltOrder

An order built but not yet submitted, ready for inspection or middleware forwarding

interface BuiltOrder {
exchange: string; // The exchange name this order was built for
params: CreateOrderParams; // 
signedOrder: object; // For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST
tx: object; // For on-chain AMM exchanges: the EVM transaction payload (reserved for future use)
raw: any; // The raw, exchange-native payload. Always present.
}

ExchangeCredentials

Optional authentication credentials for exchange operations

interface ExchangeCredentials {
apiKey: string; // API key for the exchange
privateKey: string; // Private key for signing transactions
apiSecret: string; // API secret (if required by exchange)
passphrase: string; // Passphrase (if required by exchange)
funderAddress: string; // The address funding the trades (Proxy address)
signatureType: any; // Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like 'gnosis_safe')
}

Filter Parameters

BaseRequest

Base request structure with optional credentials

interface BaseRequest {
credentials?: ExchangeCredentials; // 
}

MarketFilterParams

interface MarketFilterParams {
limit?: number; // 
offset?: number; // 
sort?: string; // 
status?: string; // Filter by market status (default: active)
searchIn?: string; // 
query?: string; // 
slug?: string; // 
marketId?: string; // Direct lookup by market ID
outcomeId?: string; // Reverse lookup -- find market containing this outcome
eventId?: string; // Find markets belonging to an event
page?: number; // 
similarityThreshold?: number; // 
}

EventFetchParams

interface EventFetchParams {
query?: string; // 
sort?: string; // 
limit?: number; // 
offset?: number; // 
status?: string; // Filter by event status (default: active)
searchIn?: string; // 
eventId?: string; // Direct lookup by event ID
slug?: string; // Lookup by event slug
}

HistoryFilterParams

Deprecated - use OHLCVParams or TradesParams instead. Resolution is optional for backward compatibility.

interface HistoryFilterParams {
resolution?: string; // 
start?: string; // 
end?: string; // 
limit?: number; // 
}

OHLCVParams

interface OHLCVParams {
resolution: string; // Candle interval for aggregation
start?: string; // 
end?: string; // 
limit?: number; // 
}

TradesParams

Parameters for fetching trade history. No resolution parameter - trades are discrete events.

interface TradesParams {
start?: string; // 
end?: string; // 
limit?: number; // 
}

CreateOrderParams

interface CreateOrderParams {
marketId: string; // 
outcomeId: string; // 
side: string; // 
type: string; // 
amount: number; // 
price?: number; // 
fee?: number; // 
}

MyTradesParams

interface MyTradesParams {
outcomeId?: string; // Filter to specific outcome/ticker
marketId?: string; // Filter to specific market
since?: string; // 
until?: string; // 
limit?: number; // 
cursor?: string; // For Kalshi cursor pagination
}

OrderHistoryParams

interface OrderHistoryParams {
marketId?: string; // Required for Limitless (slug)
since?: string; // 
until?: string; // 
limit?: number; // 
cursor?: string; // 
}

Low-Level API Reference

Advanced: call exchange-specific REST endpoints directly via exchange.callApi(name, params).

// Example
const result = await exchange.callApi('operationName', { param: 'value' });

Polymarket

callApi() nameMethodPathSummaryAuth
getGammaStatusGET/statusGamma API Health checkPublic
listTeamsGET/teamsList teamsPublic
getSportsMetadataGET/sportsGet sports metadata informationPublic
getSportsMarketTypesGET/sports/market-typesGet valid sports market typesPublic
listTagsGET/tagsList tagsPublic
getTagGET/tags/{id}Get tag by idPublic
getRelatedTagsByIdGET/tags/{id}/related-tagsGet related tags (relationships) by tag idPublic
getRelatedTagsBySlugGET/tags/slug/{slug}/related-tagsGet related tags (relationships) by tag slugPublic
getTagsRelatedToATagByIdGET/tags/{id}/related-tags/tagsGet tags related to a tag idPublic
getTagsRelatedToATagBySlugGET/tags/slug/{slug}/related-tags/tagsGet tags related to a tag slugPublic
listEventsGET/eventsList eventsPublic
getEventGET/events/{id}Get event by idPublic
getEventTagsGET/events/{id}/tagsGet event tagsPublic
getEventBySlugGET/events/slug/{slug}Get event by slugPublic
listMarketsGET/marketsList marketsPublic
getMarketGET/markets/{id}Get market by idPublic
getMarketTagsGET/markets/{id}/tagsGet market tags by idPublic
getMarketBySlugGET/markets/slug/{slug}Get market by slugPublic
listSeriesGET/seriesList seriesPublic
getSeriesGET/series/{id}Get series by idPublic
listCommentsGET/commentsList commentsPublic
getCommentsByIdGET/comments/{id}Get comments by comment idPublic
getPublicProfileGET/public-profileGet public profile by wallet addressPublic
publicSearchGET/public-searchSearch markets, events, and profilesPublic
getBookGET/bookGet order book summaryPublic
postBooksPOST/booksGet multiple order books summariesPublic
getPriceGET/priceGet market pricePublic
getPricesGET/pricesGet multiple market pricesPublic
postPricesPOST/pricesGet multiple market prices by requestPublic
getMidpointGET/midpointGet midpoint pricePublic
postSpreadsPOST/spreadsGet bid-ask spreadsPublic
getPricesHistoryGET/prices-historyGet price history for a traded tokenPublic
postAuthApiKeyPOST/auth/api-keyCreate API KeyRequired
getAuthDeriveApiKeyGET/auth/derive-api-keyDerive API KeyRequired
postOrderPOST/orderPlace Single OrderRequired
deleteOrderDELETE/orderCancel Single OrderRequired
postOrdersPOST/ordersPlace Multiple Orders (Batch)Required
deleteOrdersDELETE/ordersCancel Multiple OrdersRequired
deleteCancelAllDELETE/cancel-allCancel All OrdersRequired
deleteCancelMarketOrdersDELETE/cancel-market-ordersCancel Market OrdersRequired
getDataOrderGET/data/order/{id}Get OrderRequired
getDataOrdersGET/data/ordersGet Active OrdersRequired
getDataTradesGET/data/tradesGet TradesRequired
getOrderScoringGET/order-scoringCheck Order Reward ScoringRequired
postOrdersScoringPOST/orders-scoringCheck Multiple Orders ScoringRequired
getGeoblockGET/geoblockCheck Geoblock StatusPublic
getDataApiHealthGET/Data API Health checkPublic
getPositionsGET/positionsGet current positions for a userPublic
getV1AccountingSnapshotGET/v1/accounting/snapshotDownload an accounting snapshot (ZIP of CSVs)Public
getTradedGET/tradedGet total markets a user has tradedPublic
getOiGET/oiGet open interestPublic
getLiveVolumeGET/live-volumeGet live volume for an eventPublic
getTradesGET/tradesGet trades for a user or marketsPublic
getActivityGET/activityGet user activityPublic
getHoldersGET/holdersGet top holders for marketsPublic
getValueGET/valueGet total value of a user's positionsPublic
getClosedPositionsGET/closed-positionsGet closed positions for a userPublic
getV1MarketPositionsGET/v1/market-positionsGet positions for a marketPublic
getV1LeaderboardGET/v1/leaderboardGet trader leaderboard rankingsPublic
getV1BuildersLeaderboardGET/v1/builders/leaderboardGet aggregated builder leaderboardPublic

Endpoint Details

getGammaStatus

GET /status

Gamma API Health check


listTeams

GET /teams

List teams

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • league (query, array)
  • name (query, array)
  • abbreviation (query, array)

getSportsMetadata

GET /sports

Get sports metadata information


getSportsMarketTypes

GET /sports/market-types

Get valid sports market types


listTags

GET /tags

List tags

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • include_template (query, boolean)
  • is_carousel (query, boolean)

getTag

GET /tags/{id}

Get tag by id

Parameters:

  • `` (, string)
  • include_template (query, boolean)

getRelatedTagsById

GET /tags/{id}/related-tags

Get related tags (relationships) by tag id

Parameters:

  • `` (, string)
  • omit_empty (query, boolean)
  • status (query, string) — enum: active,closed,all

getRelatedTagsBySlug

GET /tags/slug/{slug}/related-tags

Get related tags (relationships) by tag slug

Parameters:

  • `` (, string)
  • omit_empty (query, boolean)
  • status (query, string) — enum: active,closed,all

getTagsRelatedToATagById

GET /tags/{id}/related-tags/tags

Get tags related to a tag id

Parameters:

  • `` (, string)
  • omit_empty (query, boolean)
  • status (query, string) — enum: active,closed,all

getTagsRelatedToATagBySlug

GET /tags/slug/{slug}/related-tags/tags

Get tags related to a tag slug

Parameters:

  • `` (, string)
  • omit_empty (query, boolean)
  • status (query, string) — enum: active,closed,all

listEvents

GET /events

List events

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • id (query, array)
  • tag_id (query, integer)
  • exclude_tag_id (query, array)
  • slug (query, array)
  • tag_slug (query, string)
  • related_tags (query, boolean)
  • active (query, boolean)
  • archived (query, boolean)
  • featured (query, boolean)
  • cyom (query, boolean)
  • include_chat (query, boolean)
  • include_template (query, boolean)
  • recurrence (query, string)
  • closed (query, boolean)
  • liquidity_min (query, number)
  • liquidity_max (query, number)
  • volume_min (query, number)
  • volume_max (query, number)
  • start_date_min (query, string)
  • start_date_max (query, string)
  • end_date_min (query, string)
  • end_date_max (query, string)

getEvent

GET /events/{id}

Get event by id

Parameters:

  • `` (, string)
  • include_chat (query, boolean)
  • include_template (query, boolean)

getEventTags

GET /events/{id}/tags

Get event tags

Parameters:

  • `` (, string)

getEventBySlug

GET /events/slug/{slug}

Get event by slug

Parameters:

  • `` (, string)
  • include_chat (query, boolean)
  • include_template (query, boolean)

listMarkets

GET /markets

List markets

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • id (query, array)
  • slug (query, array)
  • clob_token_ids (query, array)
  • condition_ids (query, array)
  • market_maker_address (query, array)
  • liquidity_num_min (query, number)
  • liquidity_num_max (query, number)
  • volume_num_min (query, number)
  • volume_num_max (query, number)
  • start_date_min (query, string)
  • start_date_max (query, string)
  • end_date_min (query, string)
  • end_date_max (query, string)
  • tag_id (query, integer)
  • related_tags (query, boolean)
  • cyom (query, boolean)
  • uma_resolution_status (query, string)
  • game_id (query, string)
  • sports_market_types (query, array)
  • rewards_min_size (query, number)
  • question_ids (query, array)
  • include_tag (query, boolean)
  • closed (query, boolean)

getMarket

GET /markets/{id}

Get market by id

Parameters:

  • `` (, string)
  • include_tag (query, boolean)

getMarketTags

GET /markets/{id}/tags

Get market tags by id

Parameters:

  • `` (, string)

getMarketBySlug

GET /markets/slug/{slug}

Get market by slug

Parameters:

  • `` (, string)
  • include_tag (query, boolean)

listSeries

GET /series

List series

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • slug (query, array)
  • categories_ids (query, array)
  • categories_labels (query, array)
  • closed (query, boolean)
  • include_chat (query, boolean)
  • recurrence (query, string)

getSeries

GET /series/{id}

Get series by id

Parameters:

  • `` (, string)
  • include_chat (query, boolean)

listComments

GET /comments

List comments

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • parent_entity_type (query, string) — enum: Event,Series,market
  • parent_entity_id (query, integer)
  • get_positions (query, boolean)
  • holders_only (query, boolean)

getCommentsById

GET /comments/{id}

Get comments by comment id

Parameters:

  • id (path, integer) required
  • get_positions (query, boolean)

getPublicProfile

GET /public-profile

Get public profile by wallet address

Parameters:

  • address (query, string) required — The wallet address (proxy wallet or user address)

publicSearch

GET /public-search

Search markets, events, and profiles

Parameters:

  • q (query, string) required
  • cache (query, boolean)
  • events_status (query, string)
  • limit_per_type (query, integer)
  • page (query, integer)
  • events_tag (query, array)
  • keep_closed_markets (query, integer)
  • sort (query, string)
  • ascending (query, boolean)
  • search_tags (query, boolean)
  • search_profiles (query, boolean)
  • recurrence (query, string)
  • exclude_tag_id (query, array)
  • optimized (query, boolean)

getBook

GET /book

Get order book summary

Parameters:

  • token_id (query, string) required

postBooks

POST /books

Get multiple order books summaries


getPrice

GET /price

Get market price

Parameters:

  • token_id (query, string) required
  • side (query, string) required — enum: BUY,SELL

getPrices

GET /prices

Get multiple market prices


postPrices

POST /prices

Get multiple market prices by request


getMidpoint

GET /midpoint

Get midpoint price

Parameters:

  • token_id (query, string) required

postSpreads

POST /spreads

Get bid-ask spreads


getPricesHistory

GET /prices-history

Get price history for a traded token

Parameters:

  • market (query, string) required
  • startTs (query, number)
  • endTs (query, number)
  • interval (query, string) — enum: 1m,1w,1d,6h,1h,max
  • fidelity (query, number)

postAuthApiKey

POST /auth/api-key

Create API Key (Auth required)

Parameters:

  • `` (, string)

getAuthDeriveApiKey

GET /auth/derive-api-key

Derive API Key (Auth required)

Parameters:

  • `` (, string)

postOrder

POST /order

Place Single Order (Auth required)

Parameters:

  • `` (, string)

deleteOrder

DELETE /order

Cancel Single Order (Auth required)

Parameters:

  • `` (, string)

postOrders

POST /orders

Place Multiple Orders (Batch) (Auth required)

Parameters:

  • `` (, string)

deleteOrders

DELETE /orders

Cancel Multiple Orders (Auth required)

Parameters:

  • `` (, string)

deleteCancelAll

DELETE /cancel-all

Cancel All Orders (Auth required)

Parameters:

  • `` (, string)

deleteCancelMarketOrders

DELETE /cancel-market-orders

Cancel Market Orders (Auth required)

Parameters:

  • `` (, string)

getDataOrder

GET /data/order/{id}

Get Order (Auth required)

Parameters:

  • `` (, string)
  • id (path, string) required

getDataOrders

GET /data/orders

Get Active Orders (Auth required)

Parameters:

  • `` (, string)
  • id (query, string)
  • market (query, string)
  • asset_id (query, string)

getDataTrades

GET /data/trades

Get Trades (Auth required)

Parameters:

  • `` (, string)
  • id (query, string)
  • market (query, string)
  • maker (query, string)
  • taker (query, string)
  • before (query, string)
  • after (query, string)

getOrderScoring

GET /order-scoring

Check Order Reward Scoring (Auth required)

Parameters:

  • `` (, string)
  • orderId (query, string) required

postOrdersScoring

POST /orders-scoring

Check Multiple Orders Scoring (Auth required)

Parameters:

  • `` (, string)

getGeoblock

GET /geoblock

Check Geoblock Status


getDataApiHealth

GET /

Data API Health check


getPositions

GET /positions

Get current positions for a user

Parameters:

  • user (query, string) required — User address (required)
  • market (query, array) — Comma-separated list of condition IDs. Mutually exclusive with eventId.
  • eventId (query, array) — Comma-separated list of event IDs. Mutually exclusive with market.
  • sizeThreshold (query, number)
  • redeemable (query, boolean)
  • mergeable (query, boolean)
  • limit (query, integer)
  • offset (query, integer)
  • sortBy (query, string) — enum: CURRENT,INITIAL,TOKENS,CASHPNL,PERCENTPNL,TITLE,RESOLVING,PRICE,AVGPRICE
  • sortDirection (query, string) — enum: ASC,DESC
  • title (query, string)

getV1AccountingSnapshot

GET /v1/accounting/snapshot

Download an accounting snapshot (ZIP of CSVs)

Parameters:

  • user (query, string) required — User address (0x-prefixed)

getTraded

GET /traded

Get total markets a user has traded

Parameters:

  • user (query, string) required

getOi

GET /oi

Get open interest

Parameters:

  • market (query, array)

getLiveVolume

GET /live-volume

Get live volume for an event

Parameters:

  • id (query, integer) required

getTrades

GET /trades

Get trades for a user or markets

Parameters:

  • limit (query, integer)
  • offset (query, integer)
  • takerOnly (query, boolean)
  • filterType (query, string) — Must be provided together with filterAmount. — enum: CASH,TOKENS
  • filterAmount (query, number) — Must be provided together with filterType.
  • market (query, array) — Comma-separated list of condition IDs. Mutually exclusive with eventId.
  • eventId (query, array) — Comma-separated list of event IDs. Mutually exclusive with market.
  • user (query, string)
  • side (query, string) — enum: BUY,SELL

getActivity

GET /activity

Get user activity

Parameters:

  • limit (query, integer)
  • offset (query, integer)
  • user (query, string) required
  • market (query, array) — Comma-separated list of condition IDs. Mutually exclusive with eventId.
  • eventId (query, array) — Comma-separated list of event IDs. Mutually exclusive with market.
  • type (query, array)
  • start (query, integer)
  • end (query, integer)
  • sortBy (query, string) — enum: TIMESTAMP,TOKENS,CASH
  • sortDirection (query, string) — enum: ASC,DESC
  • side (query, string) — enum: BUY,SELL

getHolders

GET /holders

Get top holders for markets

Parameters:

  • limit (query, integer) — Maximum number of holders to return per token. Capped at 20.
  • market (query, array) required — Comma-separated list of condition IDs.
  • minBalance (query, integer)

getValue

GET /value

Get total value of a user's positions

Parameters:

  • user (query, string) required
  • market (query, array)

getClosedPositions

GET /closed-positions

Get closed positions for a user

Parameters:

  • user (query, string) required — The address of the user in question
  • market (query, array) — The conditionId of the market in question. Supports multiple csv separated values. Cannot be used with the eventId param.
  • title (query, string) — Filter by market title
  • eventId (query, array) — The event id of the event in question. Supports multiple csv separated values. Returns positions for all markets for those event ids. Cannot be used with the market param.
  • limit (query, integer) — The max number of positions to return
  • offset (query, integer) — The starting index for pagination
  • sortBy (query, string) — The sort criteria — enum: REALIZEDPNL,TITLE,PRICE,AVGPRICE,TIMESTAMP
  • sortDirection (query, string) — The sort direction — enum: ASC,DESC

getV1MarketPositions

GET /v1/market-positions

Get positions for a market

Parameters:

  • market (query, string) required — The condition ID of the market to query positions for
  • user (query, string) — Filter to a single user by proxy wallet address
  • status (query, string) — Filter positions by status.
  • OPEN — Only positions with size > 0.01
  • CLOSED — Only positions with size <= 0.01
  • ALL — All positions regardless of size — enum: OPEN,CLOSED,ALL
  • sortBy (query, string) — Sort positions by:
  • TOKENS — Position size (number of tokens)
  • CASH_PNL — Unrealized cash PnL
  • REALIZED_PNL — Realized PnL
  • TOTAL_PNL — Total PnL (cash_pnl + realized_pnl) — enum: TOKENS,CASH_PNL,REALIZED_PNL,TOTAL_PNL
  • sortDirection (query, string) — enum: ASC,DESC
  • limit (query, integer) — Max number of positions to return per outcome token
  • offset (query, integer) — Pagination offset per outcome token

getV1Leaderboard

GET /v1/leaderboard

Get trader leaderboard rankings

Parameters:

  • category (query, string) — Market category for the leaderboard — enum: OVERALL,POLITICS,SPORTS,CRYPTO,CULTURE,MENTIONS,WEATHER,ECONOMICS,TECH,FINANCE
  • timePeriod (query, string) — Time period for leaderboard results — enum: DAY,WEEK,MONTH,ALL
  • orderBy (query, string) — Leaderboard ordering criteria — enum: PNL,VOL
  • limit (query, integer) — Max number of leaderboard traders to return
  • offset (query, integer) — Starting index for pagination
  • user (query, string) — Limit leaderboard to a single user by address
  • userName (query, string) — Limit leaderboard to a single username

getV1BuildersLeaderboard

GET /v1/builders/leaderboard

Get aggregated builder leaderboard

Parameters:

  • timePeriod (query, string) — The time period to aggregate results over. — enum: DAY,WEEK,MONTH,ALL
  • limit (query, string)

Kalshi

callApi() nameMethodPathSummaryAuth
GetHistoricalCutoffGET/historical/cutoffGet Historical Cutoff TimestampsPublic
GetMarketCandlesticksHistoricalGET/historical/markets/{ticker}/candlesticksGet Historical Market CandlesticksPublic
GetFillsHistoricalGET/historical/fillsGet Historical FillsRequired
GetHistoricalOrdersGET/historical/ordersGet Historical OrdersRequired
GetHistoricalMarketsGET/historical/marketsGet Historical MarketsPublic
GetHistoricalMarketGET/historical/markets/{ticker}Get Historical MarketPublic
GetExchangeStatusGET/exchange/statusGet Exchange StatusPublic
GetExchangeAnnouncementsGET/exchange/announcementsGet Exchange AnnouncementsPublic
GetSeriesFeeChangesGET/series/fee_changesGet Series Fee ChangesPublic
GetExchangeScheduleGET/exchange/scheduleGet Exchange SchedulePublic
GetUserDataTimestampGET/exchange/user_data_timestampGet User Data TimestampPublic
GetOrdersGET/portfolio/ordersGet OrdersRequired
CreateOrderPOST/portfolio/ordersCreate OrderRequired
GetOrderGET/portfolio/orders/{order_id}Get OrderRequired
CancelOrderDELETE/portfolio/orders/{order_id}Cancel OrderRequired
BatchCreateOrdersPOST/portfolio/orders/batchedBatch Create OrdersRequired
BatchCancelOrdersDELETE/portfolio/orders/batchedBatch Cancel OrdersRequired
AmendOrderPOST/portfolio/orders/{order_id}/amendAmend OrderRequired
DecreaseOrderPOST/portfolio/orders/{order_id}/decreaseDecrease OrderRequired
GetOrderQueuePositionsGET/portfolio/orders/queue_positionsGet Queue Positions for OrdersRequired
GetOrderQueuePositionGET/portfolio/orders/{order_id}/queue_positionGet Order Queue PositionRequired
GetOrderGroupsGET/portfolio/order_groupsGet Order GroupsRequired
CreateOrderGroupPOST/portfolio/order_groups/createCreate Order GroupRequired
GetOrderGroupGET/portfolio/order_groups/{order_group_id}Get Order GroupRequired
DeleteOrderGroupDELETE/portfolio/order_groups/{order_group_id}Delete Order GroupRequired
ResetOrderGroupPUT/portfolio/order_groups/{order_group_id}/resetReset Order GroupRequired
TriggerOrderGroupPUT/portfolio/order_groups/{order_group_id}/triggerTrigger Order GroupRequired
UpdateOrderGroupLimitPUT/portfolio/order_groups/{order_group_id}/limitUpdate Order Group LimitRequired
GetBalanceGET/portfolio/balanceGet BalanceRequired
CreateSubaccountPOST/portfolio/subaccountsCreate SubaccountRequired
ApplySubaccountTransferPOST/portfolio/subaccounts/transferTransfer Between SubaccountsRequired
GetSubaccountBalancesGET/portfolio/subaccounts/balancesGet All Subaccount BalancesRequired
GetSubaccountTransfersGET/portfolio/subaccounts/transfersGet Subaccount TransfersRequired
GetPositionsGET/portfolio/positionsGet PositionsRequired
GetSettlementsGET/portfolio/settlementsGet SettlementsRequired
GetPortfolioRestingOrderTotalValueGET/portfolio/summary/total_resting_order_valueGet Total Resting Order ValueRequired
GetFillsGET/portfolio/fillsGet FillsRequired
GetApiKeysGET/api_keysGet API KeysRequired
CreateApiKeyPOST/api_keysCreate API KeyRequired
GenerateApiKeyPOST/api_keys/generateGenerate API KeyRequired
DeleteApiKeyDELETE/api_keys/{api_key}Delete API KeyRequired
GetTagsForSeriesCategoriesGET/search/tags_by_categoriesGet Tags for Series CategoriesPublic
GetFiltersForSportsGET/search/filters_by_sportGet Filters for SportsPublic
GetAccountApiLimitsGET/account/limitsGet Account API LimitsRequired
GetMarketCandlesticksGET/series/{series_ticker}/markets/{ticker}/candlesticksGet Market CandlesticksPublic
GetTradesGET/markets/tradesGet TradesPublic
GetMarketCandlesticksByEventGET/series/{series_ticker}/events/{ticker}/candlesticksGet Event CandlesticksPublic
GetEventsGET/eventsGet EventsPublic
GetMultivariateEventsGET/events/multivariateGet Multivariate EventsPublic
GetEventGET/events/{event_ticker}Get EventPublic
GetEventMetadataGET/events/{event_ticker}/metadataGet Event MetadataPublic
GetEventForecastPercentilesHistoryGET/series/{series_ticker}/events/{ticker}/forecast_percentile_historyGet Event Forecast Percentile HistoryRequired
GetLiveDataGET/live_data/{type}/milestone/{milestone_id}Get Live DataPublic
GetLiveDatasGET/live_data/batchGet Multiple Live DataPublic
GetIncentiveProgramsGET/incentive_programsGet IncentivesPublic
GetFCMOrdersGET/fcm/ordersGet FCM OrdersRequired
GetFCMPositionsGET/fcm/positionsGet FCM PositionsRequired
GetStructuredTargetsGET/structured_targetsGet Structured TargetsPublic
GetStructuredTargetGET/structured_targets/{structured_target_id}Get Structured TargetPublic
GetMarketOrderbookGET/markets/{ticker}/orderbookGet Market OrderbookRequired
GetMilestoneGET/milestones/{milestone_id}Get MilestonePublic
GetMilestonesGET/milestonesGet MilestonesPublic
GetCommunicationsIDGET/communications/idGet Communications IDRequired
GetRFQsGET/communications/rfqsGet RFQsRequired
CreateRFQPOST/communications/rfqsCreate RFQRequired
GetRFQGET/communications/rfqs/{rfq_id}Get RFQRequired
DeleteRFQDELETE/communications/rfqs/{rfq_id}Delete RFQRequired
GetQuotesGET/communications/quotesGet QuotesRequired
CreateQuotePOST/communications/quotesCreate QuoteRequired
GetQuoteGET/communications/quotes/{quote_id}Get QuoteRequired
DeleteQuoteDELETE/communications/quotes/{quote_id}Delete QuoteRequired
AcceptQuotePUT/communications/quotes/{quote_id}/acceptAccept QuoteRequired
ConfirmQuotePUT/communications/quotes/{quote_id}/confirmConfirm QuoteRequired
GetMultivariateEventCollectionGET/multivariate_event_collections/{collection_ticker}Get Multivariate Event CollectionPublic
CreateMarketInMultivariateEventCollectionPOST/multivariate_event_collections/{collection_ticker}Create Market In Multivariate Event CollectionRequired
GetMultivariateEventCollectionsGET/multivariate_event_collectionsGet Multivariate Event CollectionsPublic
LookupTickersForMarketInMultivariateEventCollectionPUT/multivariate_event_collections/{collection_ticker}/lookupLookup Tickers For Market In Multivariate Event CollectionRequired
GetMultivariateEventCollectionLookupHistoryGET/multivariate_event_collections/{collection_ticker}/lookupGet Multivariate Event Collection Lookup HistoryPublic
GetSeriesGET/series/{series_ticker}Get SeriesPublic
GetSeriesListGET/seriesGet Series ListPublic
GetMarketsGET/marketsGet MarketsPublic
GetMarketGET/markets/{ticker}Get MarketPublic
BatchGetMarketCandlesticksGET/markets/candlesticksBatch Get Market CandlesticksPublic

Endpoint Details

GetHistoricalCutoff

GET /historical/cutoff

Get Historical Cutoff Timestamps


GetMarketCandlesticksHistorical

GET /historical/markets/{ticker}/candlesticks

Get Historical Market Candlesticks

Parameters:

  • ticker (path, string) required — Market ticker - unique identifier for the specific market
  • start_ts (query, integer) required — Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
  • end_ts (query, integer) required — End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
  • period_interval (query, integer) required — Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day). — enum: 1,60,1440

GetFillsHistorical

GET /historical/fills

Get Historical Fills (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetHistoricalOrders

GET /historical/orders

Get Historical Orders (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetHistoricalMarkets

GET /historical/markets

Get Historical Markets

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetHistoricalMarket

GET /historical/markets/{ticker}

Get Historical Market

Parameters:

  • `` (, string)

GetExchangeStatus

GET /exchange/status

Get Exchange Status


GetExchangeAnnouncements

GET /exchange/announcements

Get Exchange Announcements


GetSeriesFeeChanges

GET /series/fee_changes

Get Series Fee Changes

Parameters:

  • series_ticker (query, string)
  • show_historical (query, boolean)

GetExchangeSchedule

GET /exchange/schedule

Get Exchange Schedule


GetUserDataTimestamp

GET /exchange/user_data_timestamp

Get User Data Timestamp


GetOrders

GET /portfolio/orders

Get Orders (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

CreateOrder

POST /portfolio/orders

Create Order (Auth required)


GetOrder

GET /portfolio/orders/{order_id}

Get Order (Auth required)

Parameters:

  • `` (, string)

CancelOrder

DELETE /portfolio/orders/{order_id}

Cancel Order (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

BatchCreateOrders

POST /portfolio/orders/batched

Batch Create Orders (Auth required)


BatchCancelOrders

DELETE /portfolio/orders/batched

Batch Cancel Orders (Auth required)


AmendOrder

POST /portfolio/orders/{order_id}/amend

Amend Order (Auth required)

Parameters:

  • `` (, string)

DecreaseOrder

POST /portfolio/orders/{order_id}/decrease

Decrease Order (Auth required)

Parameters:

  • `` (, string)

GetOrderQueuePositions

GET /portfolio/orders/queue_positions

Get Queue Positions for Orders (Auth required)

Parameters:

  • market_tickers (query, string) — Comma-separated list of market tickers to filter by
  • event_ticker (query, string) — Event ticker to filter by
  • `` (, string)

GetOrderQueuePosition

GET /portfolio/orders/{order_id}/queue_position

Get Order Queue Position (Auth required)

Parameters:

  • `` (, string)

GetOrderGroups

GET /portfolio/order_groups

Get Order Groups (Auth required)

Parameters:

  • `` (, string)

CreateOrderGroup

POST /portfolio/order_groups/create

Create Order Group (Auth required)


GetOrderGroup

GET /portfolio/order_groups/{order_group_id}

Get Order Group (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

DeleteOrderGroup

DELETE /portfolio/order_groups/{order_group_id}

Delete Order Group (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

ResetOrderGroup

PUT /portfolio/order_groups/{order_group_id}/reset

Reset Order Group (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

TriggerOrderGroup

PUT /portfolio/order_groups/{order_group_id}/trigger

Trigger Order Group (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

UpdateOrderGroupLimit

PUT /portfolio/order_groups/{order_group_id}/limit

Update Order Group Limit (Auth required)

Parameters:

  • `` (, string)

GetBalance

GET /portfolio/balance

Get Balance (Auth required)


CreateSubaccount

POST /portfolio/subaccounts

Create Subaccount (Auth required)


ApplySubaccountTransfer

POST /portfolio/subaccounts/transfer

Transfer Between Subaccounts (Auth required)


GetSubaccountBalances

GET /portfolio/subaccounts/balances

Get All Subaccount Balances (Auth required)


GetSubaccountTransfers

GET /portfolio/subaccounts/transfers

Get Subaccount Transfers (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)

GetPositions

GET /portfolio/positions

Get Positions (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetSettlements

GET /portfolio/settlements

Get Settlements (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetPortfolioRestingOrderTotalValue

GET /portfolio/summary/total_resting_order_value

Get Total Resting Order Value (Auth required)


GetFills

GET /portfolio/fills

Get Fills (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetApiKeys

GET /api_keys

Get API Keys (Auth required)


CreateApiKey

POST /api_keys

Create API Key (Auth required)


GenerateApiKey

POST /api_keys/generate

Generate API Key (Auth required)


DeleteApiKey

DELETE /api_keys/{api_key}

Delete API Key (Auth required)

Parameters:

  • api_key (path, string) required — API key ID to delete

GetTagsForSeriesCategories

GET /search/tags_by_categories

Get Tags for Series Categories


GetFiltersForSports

GET /search/filters_by_sport

Get Filters for Sports


GetAccountApiLimits

GET /account/limits

Get Account API Limits (Auth required)


GetMarketCandlesticks

GET /series/{series_ticker}/markets/{ticker}/candlesticks

Get Market Candlesticks

Parameters:

  • series_ticker (path, string) required — Series ticker - the series that contains the target market
  • ticker (path, string) required — Market ticker - unique identifier for the specific market
  • start_ts (query, integer) required — Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
  • end_ts (query, integer) required — End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
  • period_interval (query, integer) required — Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day). — enum: 1,60,1440
  • include_latest_before_start (query, boolean) — If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by:
  1. Finding the most recent real candlestick before start_ts
  2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts)
  3. Setting all OHLC prices to null, and previous_price to the close price from the real candlestick

GetTrades

GET /markets/trades

Get Trades

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetMarketCandlesticksByEvent

GET /series/{series_ticker}/events/{ticker}/candlesticks

Get Event Candlesticks

Parameters:

  • ticker (path, string) required — The event ticker
  • series_ticker (path, string) required — The series ticker
  • start_ts (query, integer) required — Start timestamp for the range
  • end_ts (query, integer) required — End timestamp for the range
  • period_interval (query, integer) required — Specifies the length of each candlestick period, in minutes. Must be one minute, one hour, or one day. — enum: 1,60,1440

GetEvents

GET /events

Get Events

Parameters:

  • limit (query, integer) — Parameter to specify the number of results per page. Defaults to 200. Maximum value is 200.
  • cursor (query, string) — Parameter to specify the pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
  • with_nested_markets (query, boolean) — Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.
  • with_milestones (query, boolean) — If true, includes related milestones as a field alongside events.
  • status (query, string) — Filter by event status. Possible values are 'open', 'closed', 'settled'. Leave empty to return events with any status. — enum: open,closed,settled
  • `` (, string)
  • min_close_ts (query, integer) — Filter events with at least one market with close timestamp greater than this Unix timestamp (in seconds).

GetMultivariateEvents

GET /events/multivariate

Get Multivariate Events

Parameters:

  • limit (query, integer) — Number of results per page. Defaults to 100. Maximum value is 200.
  • cursor (query, string) — Pagination cursor. Use the cursor value returned from the previous response to get the next page of results.
  • `` (, string)
  • collection_ticker (query, string) — Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.
  • with_nested_markets (query, boolean) — Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.

GetEvent

GET /events/{event_ticker}

Get Event

Parameters:

  • event_ticker (path, string) required — Event ticker
  • with_nested_markets (query, boolean) — If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response.

GetEventMetadata

GET /events/{event_ticker}/metadata

Get Event Metadata

Parameters:

  • event_ticker (path, string) required — Event ticker

GetEventForecastPercentilesHistory

GET /series/{series_ticker}/events/{ticker}/forecast_percentile_history

Get Event Forecast Percentile History (Auth required)

Parameters:

  • ticker (path, string) required — The event ticker
  • series_ticker (path, string) required — The series ticker
  • percentiles (query, array) required — Array of percentile values to retrieve (0-10000, max 10 values)
  • start_ts (query, integer) required — Start timestamp for the range
  • end_ts (query, integer) required — End timestamp for the range
  • period_interval (query, integer) required — Specifies the length of each forecast period, in minutes. 0 for 5-second intervals, or 1, 60, or 1440 for minute-based intervals. — enum: 0,1,60,1440

GetLiveData

GET /live_data/{type}/milestone/{milestone_id}

Get Live Data

Parameters:

  • type (path, string) required — Type of live data
  • milestone_id (path, string) required — Milestone ID

GetLiveDatas

GET /live_data/batch

Get Multiple Live Data

Parameters:

  • milestone_ids (query, array) required — Array of milestone IDs

GetIncentivePrograms

GET /incentive_programs

Get Incentives

Parameters:

  • status (query, string) — Status filter. Can be "all", "active", "upcoming", "closed", or "paid_out". Default is "all". — enum: all,active,upcoming,closed,paid_out
  • type (query, string) — Type filter. Can be "all", "liquidity", or "volume". Default is "all". — enum: all,liquidity,volume
  • limit (query, integer) — Number of results per page. Defaults to 100. Maximum value is 10000.
  • cursor (query, string) — Cursor for pagination

GetFCMOrders

GET /fcm/orders

Get FCM Orders (Auth required)

Parameters:

  • subtrader_id (query, string) required — Restricts the response to orders for a specific subtrader (FCM members only)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • min_ts (query, integer) — Restricts the response to orders after a timestamp, formatted as a Unix Timestamp
  • max_ts (query, integer) — Restricts the response to orders before a timestamp, formatted as a Unix Timestamp
  • status (query, string) — Restricts the response to orders that have a certain status — enum: resting,canceled,executed
  • limit (query, integer) — Parameter to specify the number of results per page. Defaults to 100

GetFCMPositions

GET /fcm/positions

Get FCM Positions (Auth required)

Parameters:

  • subtrader_id (query, string) required — Restricts the response to positions for a specific subtrader (FCM members only)
  • ticker (query, string) — Ticker of desired positions
  • event_ticker (query, string) — Event ticker of desired positions
  • count_filter (query, string) — Restricts the positions to those with any of following fields with non-zero values, as a comma separated list
  • settlement_status (query, string) — Settlement status of the markets to return. Defaults to unsettled — enum: all,unsettled,settled
  • limit (query, integer) — Parameter to specify the number of results per page. Defaults to 100
  • cursor (query, string) — The Cursor represents a pointer to the next page of records in the pagination

GetStructuredTargets

GET /structured_targets

Get Structured Targets

Parameters:

  • type (query, string) — Filter by structured target type
  • competition (query, string) — Filter by competition
  • page_size (query, integer) — Number of items per page (min 1, max 2000, default 100)
  • cursor (query, string) — Pagination cursor

GetStructuredTarget

GET /structured_targets/{structured_target_id}

Get Structured Target

Parameters:

  • structured_target_id (path, string) required — Structured target ID

GetMarketOrderbook

GET /markets/{ticker}/orderbook

Get Market Orderbook (Auth required)

Parameters:

  • `` (, string)
  • depth (query, integer) — Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)

GetMilestone

GET /milestones/{milestone_id}

Get Milestone

Parameters:

  • milestone_id (path, string) required — Milestone ID

GetMilestones

GET /milestones

Get Milestones

Parameters:

  • limit (query, integer) required — Number of milestones to return per page
  • minimum_start_date (query, string) — Minimum start date to filter milestones. Format RFC3339 timestamp
  • category (query, string) — Filter by milestone category
  • competition (query, string) — Filter by competition
  • source_id (query, string) — Filter by source id
  • type (query, string) — Filter by milestone type
  • related_event_ticker (query, string) — Filter by related event ticker
  • cursor (query, string) — Pagination cursor. Use the cursor value returned from the previous response to get the next page of results

GetCommunicationsID

GET /communications/id

Get Communications ID (Auth required)


GetRFQs

GET /communications/rfqs

Get RFQs (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • limit (query, integer) — Parameter to specify the number of results per page. Defaults to 100.
  • status (query, string) — Filter RFQs by status
  • creator_user_id (query, string) — Filter RFQs by creator user ID

CreateRFQ

POST /communications/rfqs

Create RFQ (Auth required)


GetRFQ

GET /communications/rfqs/{rfq_id}

Get RFQ (Auth required)

Parameters:

  • `` (, string)

DeleteRFQ

DELETE /communications/rfqs/{rfq_id}

Delete RFQ (Auth required)

Parameters:

  • `` (, string)

GetQuotes

GET /communications/quotes

Get Quotes (Auth required)

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • limit (query, integer) — Parameter to specify the number of results per page. Defaults to 500.
  • status (query, string) — Filter quotes by status
  • quote_creator_user_id (query, string) — Filter quotes by quote creator user ID
  • rfq_creator_user_id (query, string) — Filter quotes by RFQ creator user ID
  • rfq_creator_subtrader_id (query, string) — Filter quotes by RFQ creator subtrader ID (FCM members only)
  • rfq_id (query, string) — Filter quotes by RFQ ID

CreateQuote

POST /communications/quotes

Create Quote (Auth required)


GetQuote

GET /communications/quotes/{quote_id}

Get Quote (Auth required)

Parameters:

  • `` (, string)

DeleteQuote

DELETE /communications/quotes/{quote_id}

Delete Quote (Auth required)

Parameters:

  • `` (, string)

AcceptQuote

PUT /communications/quotes/{quote_id}/accept

Accept Quote (Auth required)

Parameters:

  • `` (, string)

ConfirmQuote

PUT /communications/quotes/{quote_id}/confirm

Confirm Quote (Auth required)

Parameters:

  • `` (, string)

GetMultivariateEventCollection

GET /multivariate_event_collections/{collection_ticker}

Get Multivariate Event Collection

Parameters:

  • collection_ticker (path, string) required — Collection ticker

CreateMarketInMultivariateEventCollection

POST /multivariate_event_collections/{collection_ticker}

Create Market In Multivariate Event Collection (Auth required)

Parameters:

  • collection_ticker (path, string) required — Collection ticker

GetMultivariateEventCollections

GET /multivariate_event_collections

Get Multivariate Event Collections

Parameters:

  • status (query, string) — Only return collections of a certain status. Can be unopened, open, or closed. — enum: unopened,open,closed
  • associated_event_ticker (query, string) — Only return collections associated with a particular event ticker.
  • series_ticker (query, string) — Only return collections with a particular series ticker.
  • limit (query, integer) — Specify the maximum number of results.
  • cursor (query, string) — The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.

LookupTickersForMarketInMultivariateEventCollection

PUT /multivariate_event_collections/{collection_ticker}/lookup

Lookup Tickers For Market In Multivariate Event Collection (Auth required)

Parameters:

  • collection_ticker (path, string) required — Collection ticker

GetMultivariateEventCollectionLookupHistory

GET /multivariate_event_collections/{collection_ticker}/lookup

Get Multivariate Event Collection Lookup History

Parameters:

  • collection_ticker (path, string) required — Collection ticker
  • lookback_seconds (query, integer) required — Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600. — enum: 10,60,300,3600

GetSeries

GET /series/{series_ticker}

Get Series

Parameters:

  • series_ticker (path, string) required — The ticker of the series to retrieve
  • include_volume (query, boolean) — If true, includes the total volume traded across all events in this series.

GetSeriesList

GET /series

Get Series List

Parameters:

  • category (query, string)
  • tags (query, string)
  • include_product_metadata (query, boolean)
  • include_volume (query, boolean) — If true, includes the total volume traded across all events in each series.

GetMarkets

GET /markets

Get Markets

Parameters:

  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)
  • `` (, string)

GetMarket

GET /markets/{ticker}

Get Market

Parameters:

  • `` (, string)

BatchGetMarketCandlesticks

GET /markets/candlesticks

Batch Get Market Candlesticks

Parameters:

  • market_tickers (query, string) required — Comma-separated list of market tickers (maximum 100)
  • start_ts (query, integer) required — Start timestamp in Unix seconds
  • end_ts (query, integer) required — End timestamp in Unix seconds
  • period_interval (query, integer) required — Candlestick period interval in minutes
  • include_latest_before_start (query, boolean) — If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by:
  1. Finding the most recent real candlestick before start_ts
  2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts)
  3. Setting all OHLC prices to null, and previous_price to the close price from the real candlestick

Limitless

callApi() nameMethodPathSummaryAuth
AuthController_getSigningMessageGET/auth/signing-messageGet signing messagePublic
AuthController_verifyAuthGET/auth/verify-authVerify authenticationRequired
AuthController_loginPOST/auth/loginUser loginPublic
AuthController_logoutPOST/auth/logoutUser logoutRequired
MarketController_getActiveMarkets[0]GET/markets/active/{categoryId}Browse Active MarketsPublic
MarketController_getActiveMarkets[1]GET/markets/activeBrowse Active MarketsPublic
MarketController_getActiveMarketCountPerCategoryGET/markets/categories/countGet active market count per categoryPublic
MarketController_getActiveSlugsGET/markets/active/slugsGet active market slugs with metadataPublic
MarketController_findGET/markets/{addressOrSlug}Get Market DetailsPublic
MarketController_getFeedEventGET/markets/{slug}/get-feed-eventsGet feed events for a marketRequired
MarketOrderbookController_getHistoricalPriceGET/markets/{slug}/historical-priceGet Historical PricesPublic
MarketOrderbookController_getOrderbookGET/markets/{slug}/orderbookGet OrderbookPublic
MarketOrderbookController_getLockedBalanceGET/markets/{slug}/locked-balanceGet Locked BalanceRequired
MarketOrderbookController_getUserOrdersGET/markets/{slug}/user-ordersUser OrdersRequired
MarketOrderbookController_getMarketEventsGET/markets/{slug}/eventsMarket EventsPublic
MarketSearchController_searchGET/markets/searchSearch for markets based on semantic similarityPublic
PortfolioController_getTradesGET/portfolio/tradesGet TradesRequired
PortfolioController_getPositionsGET/portfolio/positionsGet PositionsRequired
PortfolioController_getPnlChartGET/portfolio/pnl-chartGet portfolio PnL chartRequired
PortfolioController_getHistoryGET/portfolio/historyGet HistoryRequired
PortfolioController_getPointsBreakdownGET/portfolio/pointsGet points breakdownRequired
PublicPortfolioController_tradedVolumeGET/portfolio/{account}/traded-volumeUser Total VolumePublic
PublicPortfolioController_getPositionsGET/portfolio/{account}/positionsGet All User PositionsPublic
PublicPortfolioController_getPnlChartGET/portfolio/{account}/pnl-chartGet portfolio PnL chart (public)Public
TradingPortfolioController_getAllowanceGET/portfolio/trading/allowanceGet User Trading AllowanceRequired
OrderController_createOrderPOST/ordersCreate OrderRequired
OrderController_cancelOrderDELETE/orders/{orderId}Cancel OrderRequired
OrderController_cancelOrderBatchPOST/orders/cancel-batchCancel multiple orders in batchRequired
OrderController_cancelAllOrdersDELETE/orders/all/{slug}Cancel all of a user's orders in a specific marketRequired

Endpoint Details

AuthController_getSigningMessage

GET /auth/signing-message

Get signing message


AuthController_verifyAuth

GET /auth/verify-auth

Verify authentication (Auth required)


AuthController_login

POST /auth/login

User login

Parameters:

  • x-account (header, string) required — The Ethereum address of the user
  • x-signing-message (header, string) required — The signing message generated by the server
  • x-signature (header, string) required — The signature generated by signing the message with the user's wallet

AuthController_logout

POST /auth/logout

User logout (Auth required)


MarketController_getActiveMarkets[0]

GET /markets/active/{categoryId}

Browse Active Markets

Parameters:

  • page (query, number) — Page number for pagination
  • limit (query, number) — Number of items per page
  • sortBy (query, string) — Sort by query parameter
  • tradeType (query, string) — Filter by trade type (amm, clob, or group) — enum: amm,clob,group
  • automationType (query, string) — Filter by automation type (manual, lumy, or sports) — enum: manual,lumy,sports
  • categoryId (path, number) required — Filter markets by category ID

MarketController_getActiveMarkets[1]

GET /markets/active

Browse Active Markets

Parameters:

  • page (query, number) — Page number for pagination
  • limit (query, number) — Number of items per page
  • sortBy (query, string) — Sort by query parameter
  • tradeType (query, string) — Filter by trade type (amm, clob, or group) — enum: amm,clob,group
  • automationType (query, string) — Filter by automation type (manual, lumy, or sports) — enum: manual,lumy,sports
  • categoryId (path, number) required — Filter markets by category ID

MarketController_getActiveMarketCountPerCategory

GET /markets/categories/count

Get active market count per category


MarketController_getActiveSlugs

GET /markets/active/slugs

Get active market slugs with metadata


MarketController_find

GET /markets/{addressOrSlug}

Get Market Details

Parameters:

  • addressOrSlug (path, string) required — Market/group address (0x...) or slug identifier (my-market-name)

MarketController_getFeedEvent

GET /markets/{slug}/get-feed-events

Get feed events for a market (Auth required)

Parameters:

  • page (query, number) — Page number for pagination
  • limit (query, number) — Number of events per page
  • slug (path, string) required — Slug of the market

MarketOrderbookController_getHistoricalPrice

GET /markets/{slug}/historical-price

Get Historical Prices

Parameters:

  • to (query, string) — End date for historical data
  • from (query, string) — Start date for historical data
  • interval (query, string) — Time interval for data points — enum: 1h,6h,1d,1w,1m,all
  • slug (path, string) required — Market slug identifier

MarketOrderbookController_getOrderbook

GET /markets/{slug}/orderbook

Get Orderbook

Parameters:

  • slug (path, string) required — Market slug identifier

MarketOrderbookController_getLockedBalance

GET /markets/{slug}/locked-balance

Get Locked Balance (Auth required)

Parameters:

  • slug (path, string) required — Market slug identifier

MarketOrderbookController_getUserOrders

GET /markets/{slug}/user-orders

User Orders (Auth required)

Parameters:

  • statuses (query, array) — Order status(es) to filter by. Defaults to [LIVE] if not provided
  • limit (query, number) — Maximum number of orders to return
  • slug (path, string) required — Market slug identifier

MarketOrderbookController_getMarketEvents

GET /markets/{slug}/events

Market Events

Parameters:

  • page (query, number) — Page number for pagination
  • limit (query, number) — Number of events per page
  • slug (path, string) required — Market slug identifier

MarketSearchController_search

GET /markets/search

Search for markets based on semantic similarity

Parameters:

  • query (query, string) required — Search query text
  • limit (query, number) — Maximum number of results to return
  • page (query, number) — Number of page
  • similarityThreshold (query, number) — Minimum similarity score (0-1)

PortfolioController_getTrades

GET /portfolio/trades

Get Trades (Auth required)


PortfolioController_getPositions

GET /portfolio/positions

Get Positions (Auth required)


PortfolioController_getPnlChart

GET /portfolio/pnl-chart

Get portfolio PnL chart (Auth required)

Parameters:

  • timeframe (query, string) — Timeframe window for percent change and chart series

PortfolioController_getHistory

GET /portfolio/history

Get History (Auth required)

Parameters:

  • page (query, number) required — Page number
  • limit (query, number) required — Number of items per page
  • from (query, string) — Start date for filtering (ISO 8601 format)
  • to (query, string) — End date for filtering (ISO 8601 format)

PortfolioController_getPointsBreakdown

GET /portfolio/points

Get points breakdown (Auth required)


PublicPortfolioController_tradedVolume

GET /portfolio/{account}/traded-volume

User Total Volume

Parameters:

  • account (path, string) required — User Ethereum address

PublicPortfolioController_getPositions

GET /portfolio/{account}/positions

Get All User Positions

Parameters:

  • account (path, string) required — User Ethereum address

PublicPortfolioController_getPnlChart

GET /portfolio/{account}/pnl-chart

Get portfolio PnL chart (public)

Parameters:

  • account (path, string) required — User Ethereum address
  • timeframe (query, string) — Timeframe window for percent change and chart series

TradingPortfolioController_getAllowance

GET /portfolio/trading/allowance

Get User Trading Allowance (Auth required)

Parameters:

  • type (query, string) required — Trading type: CLOB or NegRisk — enum: clob,negrisk
  • spender (query, string) — Optional spender address override (e.g., venue exchange address)

OrderController_createOrder

POST /orders

Create Order (Auth required)


OrderController_cancelOrder

DELETE /orders/{orderId}

Cancel Order (Auth required)

Parameters:

  • orderId (path, string) required — Unique identifier of the order to be cancelled

OrderController_cancelOrderBatch

POST /orders/cancel-batch

Cancel multiple orders in batch (Auth required)


OrderController_cancelAllOrders

DELETE /orders/all/{slug}

Cancel all of a user's orders in a specific market (Auth required)


Probable

callApi() nameMethodPathSummaryAuth
getPublicApiV1AuthNonceGET/public/api/v1/auth/nonceGenerate NoncePublic
postPublicApiV1AuthLoginPOST/public/api/v1/auth/loginLoginPublic
postPublicApiV1AuthLogoutPOST/public/api/v1/auth/logoutLogoutPublic
postPublicApiV1AuthApiKeyPOST/public/api/v1/auth/api-key/{chainId}Generate API KeyRequired
getPublicApiV1AuthApiKeyGET/public/api/v1/auth/api-key/{chainId}Get API KeyRequired
deletePublicApiV1AuthApiKeyDELETE/public/api/v1/auth/api-key/{chainId}Delete API KeyRequired
postPublicApiV1AuthVerifyL1POST/public/api/v1/auth/verify/l1Verify L1 HeadersRequired
postPublicApiV1AuthVerifyL2POST/public/api/v1/auth/verify/l2Verify L2 HeadersRequired
getPublicApiV1EventsGET/public/api/v1/events/List All EventsPublic
getPublicApiV1EventsGET/public/api/v1/events/{id}Get Event by IDPublic
getPublicApiV1EventsSlugGET/public/api/v1/events/slug/{slug}Get Event by SlugPublic
getPublicApiV1EventsTagsGET/public/api/v1/events/{id}/tagsGet Tags for EventPublic
getPublicApiV1MarketsGET/public/api/v1/markets/List All MarketsPublic
getPublicApiV1MarketsGET/public/api/v1/markets/{id}Get Market by IDPublic
getPublicApiV1MarketsPolymarketGET/public/api/v1/markets/polymarket/{polymarketId}Get Market by Polymarket IDPublic
getPublicApiV1MarketsBscGET/public/api/v1/markets/bsc/{bscQuestionId}Get Market by BSC Question IDPublic
getPublicApiV1PublicSearchGET/public/api/v1/public-search/Search Events and MarketsPublic
getPublicApiV1TagsGET/public/api/v1/tags/List All TagsPublic
postPublicApiV1OrderPOST/public/api/v1/order/{chainId}Place OrderRequired
deletePublicApiV1OrderDELETE/public/api/v1/order/{chainId}/{orderId}Cancel OrderRequired
getPublicApiV1OrdersGET/public/api/v1/orders/{chainId}/{orderId}Get OrderRequired
getPublicApiV1OrdersOpenGET/public/api/v1/orders/{chainId}/openGet Open OrdersRequired
getPublicApiV1PriceGET/public/api/v1/priceGet PricePublic
postPublicApiV1PricesPOST/public/api/v1/pricesGet Prices (Batch)Public
getPublicApiV1MidpointGET/public/api/v1/midpointGet MidpointPublic
getPublicApiV1BookGET/public/api/v1/bookGet Order BookPublic
getPublicApiV1PricesHistoryGET/public/api/v1/prices-historyGet Price HistoryPublic
getPublicApiV1TradeGET/public/api/v1/trade/{chainId}Get Trades (Authenticated)Required
getPublicApiV1TradesGET/public/api/v1/tradesGet Public TradesPublic
getPublicApiV1ActivityGET/public/api/v1/activityUser ActivityPublic
getPublicApiV1PositionCurrentGET/public/api/v1/position/currentCurrent PositionPublic
getPublicApiV1PnlGET/public/api/v1/pnlProfit and LossPublic

Endpoint Details

getPublicApiV1AuthNonce

GET /public/api/v1/auth/nonce

Generate Nonce


postPublicApiV1AuthLogin

POST /public/api/v1/auth/login

Login


postPublicApiV1AuthLogout

POST /public/api/v1/auth/logout

Logout


postPublicApiV1AuthApiKey

POST /public/api/v1/auth/api-key/{chainId}

Generate API Key (Auth required)

Parameters:

  • chainId (path, integer) required

getPublicApiV1AuthApiKey

GET /public/api/v1/auth/api-key/{chainId}

Get API Key (Auth required)

Parameters:

  • chainId (path, integer) required

deletePublicApiV1AuthApiKey

DELETE /public/api/v1/auth/api-key/{chainId}

Delete API Key (Auth required)

Parameters:

  • chainId (path, integer) required

postPublicApiV1AuthVerifyL1

POST /public/api/v1/auth/verify/l1

Verify L1 Headers (Auth required)


postPublicApiV1AuthVerifyL2

POST /public/api/v1/auth/verify/l2

Verify L2 Headers (Auth required)


getPublicApiV1Events

GET /public/api/v1/events/

List All Events

Parameters:

  • page (query, integer)
  • limit (query, integer)
  • status (query, string) — enum: active,closed,all
  • tag_id (query, string)
  • sort (query, string)

getPublicApiV1Events

GET /public/api/v1/events/{id}

Get Event by ID

Parameters:

  • id (path, integer) required

getPublicApiV1EventsSlug

GET /public/api/v1/events/slug/{slug}

Get Event by Slug

Parameters:

  • slug (path, string) required

getPublicApiV1EventsTags

GET /public/api/v1/events/{id}/tags

Get Tags for Event

Parameters:

  • id (path, integer) required

getPublicApiV1Markets

GET /public/api/v1/markets/

List All Markets

Parameters:

  • page (query, integer)
  • active (query, boolean)
  • event_id (query, integer)

getPublicApiV1Markets

GET /public/api/v1/markets/{id}

Get Market by ID

Parameters:

  • id (path, integer) required

getPublicApiV1MarketsPolymarket

GET /public/api/v1/markets/polymarket/{polymarketId}

Get Market by Polymarket ID

Parameters:

  • polymarketId (path, string) required

getPublicApiV1MarketsBsc

GET /public/api/v1/markets/bsc/{bscQuestionId}

Get Market by BSC Question ID

Parameters:

  • bscQuestionId (path, string) required

getPublicApiV1PublicSearch

GET /public/api/v1/public-search/

Search Events and Markets

Parameters:

  • q (query, string) required
  • page (query, integer)
  • events_tag (query, string)
  • optimized (query, boolean)

getPublicApiV1Tags

GET /public/api/v1/tags/

List All Tags


postPublicApiV1Order

POST /public/api/v1/order/{chainId}

Place Order (Auth required)

Parameters:

  • chainId (path, integer) required

deletePublicApiV1Order

DELETE /public/api/v1/order/{chainId}/{orderId}

Cancel Order (Auth required)

Parameters:

  • chainId (path, integer) required
  • orderId (path, string) required
  • tokenId (query, string) required

getPublicApiV1Orders

GET /public/api/v1/orders/{chainId}/{orderId}

Get Order (Auth required)

Parameters:

  • chainId (path, integer) required
  • orderId (path, string) required
  • tokenId (query, string) required

getPublicApiV1OrdersOpen

GET /public/api/v1/orders/{chainId}/open

Get Open Orders (Auth required)

Parameters:

  • chainId (path, integer) required
  • limit (query, integer)
  • page (query, integer)

getPublicApiV1Price

GET /public/api/v1/price

Get Price

Parameters:

  • token_id (query, string) required
  • side (query, string) required — enum: BUY,SELL

postPublicApiV1Prices

POST /public/api/v1/prices

Get Prices (Batch)


getPublicApiV1Midpoint

GET /public/api/v1/midpoint

Get Midpoint

Parameters:

  • token_id (query, string) required

getPublicApiV1Book

GET /public/api/v1/book

Get Order Book

Parameters:

  • token_id (query, string) required

getPublicApiV1PricesHistory

GET /public/api/v1/prices-history

Get Price History

Parameters:

  • market (query, string) required — Asset ID
  • interval (query, string) — enum: max,1m,1h,6h,1d,1w
  • startTs (query, integer)
  • endTs (query, integer)

getPublicApiV1Trade

GET /public/api/v1/trade/{chainId}

Get Trades (Authenticated) (Auth required)

Parameters:

  • chainId (path, integer) required
  • tokenId (query, string) required
  • limit (query, integer)
  • next_cursor (query, string)

getPublicApiV1Trades

GET /public/api/v1/trades

Get Public Trades

Parameters:

  • user (query, string)
  • limit (query, integer)
  • side (query, string)

getPublicApiV1Activity

GET /public/api/v1/activity

User Activity

Parameters:

  • user (query, string) required
  • limit (query, integer)

getPublicApiV1PositionCurrent

GET /public/api/v1/position/current

Current Position

Parameters:

  • user (query, string) required
  • eventId (query, integer)

getPublicApiV1Pnl

GET /public/api/v1/pnl

Profit and Loss

Parameters:

  • user_address (query, string) required

Myriad

callApi() nameMethodPathSummaryAuth
getQuestionsGET/questionsList QuestionsRequired
getQuestionsGET/questions/{id}Get Question DetailsRequired
getMarketsGET/marketsList MarketsRequired
getMarketsGET/markets/{id}Get Market DetailsRequired
getMarketsEventsGET/markets/{id}/eventsGet Market EventsRequired
getMarketsReferralsGET/markets/{id}/referralsGet Market ReferralsRequired
getMarketsHoldersGET/markets/{id}/holdersGet Market HoldersRequired
postMarketsQuotePOST/markets/quoteGet Trade QuoteRequired
postMarketsQuoteWithFeePOST/markets/quote_with_feeGet Trade Quote with Frontend FeeRequired
postMarketsClaimPOST/markets/claimGet Claim QuoteRequired
getUsersEventsGET/users/{address}/eventsGet User EventsRequired
getUsersReferralsGET/users/{address}/referralsGet User ReferralsRequired
getUsersPortfolioGET/users/{address}/portfolioGet User PortfolioRequired
getUsersMarketsGET/users/{address}/marketsGet User Markets PortfolioRequired

Endpoint Details

getQuestions

GET /questions

List Questions (Auth required)

Parameters:

  • page (query, integer)
  • limit (query, integer)
  • keyword (query, string) — Search in question title
  • min_markets (query, integer) — Minimum number of linked markets
  • max_markets (query, integer) — Maximum number of linked markets

getQuestions

GET /questions/{id}

Get Question Details (Auth required)

Parameters:

  • id (path, integer) required

getMarkets

GET /markets

List Markets (Auth required)

Parameters:

  • page (query, integer)
  • limit (query, integer)
  • sort (query, string) — enum: volume,volume_24h,liquidity,expires_at,published_at,featured
  • order (query, string) — enum: asc,desc
  • network_id (query, string) — Comma-separated list of network ids
  • state (query, string) — enum: open,closed,resolved
  • token_address (query, string)
  • topics (query, string) — Comma-separated list of topics
  • keyword (query, string) — Full-text search across title, description, and outcome titles
  • ids (query, string) — Comma-separated list of on-chain market ids
  • in_play (query, boolean)
  • moneyline (query, boolean)
  • min_duration (query, integer) — Minimum market duration in seconds
  • max_duration (query, integer) — Maximum market duration in seconds

getMarkets

GET /markets/{id}

Get Market Details (Auth required)

Parameters:

  • id (path, string) required — Market slug OR Market ID
  • network_id (query, integer) — Required if 'id' in path is a numeric Market ID

getMarketsEvents

GET /markets/{id}/events

Get Market Events (Auth required)

Parameters:

  • id (path, string) required — Market slug OR Market ID
  • network_id (query, integer) — Required if 'id' in path is a numeric Market ID
  • page (query, integer)
  • limit (query, integer)
  • since (query, integer) — Unix seconds (inclusive)
  • until (query, integer) — Unix seconds (inclusive)

getMarketsReferrals

GET /markets/{id}/referrals

Get Market Referrals (Auth required)

Parameters:

  • id (path, string) required — Market slug OR Market ID
  • network_id (query, integer) — Required if 'id' in path is a numeric Market ID
  • page (query, integer)
  • limit (query, integer)
  • since (query, integer)
  • until (query, integer)
  • code (query, string)

getMarketsHolders

GET /markets/{id}/holders

Get Market Holders (Auth required)

Parameters:

  • id (path, string) required — Market slug OR Market ID
  • network_id (query, integer) — Required if 'id' in path is a numeric Market ID
  • page (query, integer)
  • limit (query, integer)

postMarketsQuote

POST /markets/quote

Get Trade Quote (Auth required)


postMarketsQuoteWithFee

POST /markets/quote_with_fee

Get Trade Quote with Frontend Fee (Auth required)


postMarketsClaim

POST /markets/claim

Get Claim Quote (Auth required)


getUsersEvents

GET /users/{address}/events

Get User Events (Auth required)

Parameters:

  • address (path, string) required
  • page (query, integer)
  • limit (query, integer)
  • market_id (query, string)
  • market_slug (query, string)
  • network_id (query, integer)
  • since (query, integer)
  • until (query, integer)

getUsersReferrals

GET /users/{address}/referrals

Get User Referrals (Auth required)

Parameters:

  • address (path, string) required
  • page (query, integer)
  • limit (query, integer)
  • market_id (query, string)
  • market_slug (query, string)
  • network_id (query, integer)
  • since (query, integer)
  • until (query, integer)
  • code (query, string)

getUsersPortfolio

GET /users/{address}/portfolio

Get User Portfolio (Auth required)

Parameters:

  • address (path, string) required
  • page (query, integer)
  • limit (query, integer)
  • min_shares (query, number) — Default 0.1
  • market_slug (query, string)
  • market_id (query, string)
  • network_id (query, integer)
  • token_address (query, string)

getUsersMarkets

GET /users/{address}/markets

Get User Markets Portfolio (Auth required)

Parameters:

  • address (path, string) required
  • page (query, integer)
  • limit (query, integer)
  • min_shares (query, number)
  • network_id (query, integer)
  • state (query, string)
  • token_address (query, string)
  • topics (query, string)
  • keyword (query, string)
  • market_ids (query, string) — Comma-separated list of {networkId}:{marketId} pairs