Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.predexon.com/llms.txt

Use this file to discover all available pages before exploring further.

Real-time streaming of Polymarket on-chain events including trades, position activity, market lifecycle, orderbook updates, and oracle events.
WebSocket requires a Dev plan or higher ($49/mo). Get your API key →

Use Cases

Copytrading

Subscribe to top traders’ wallets and mirror their positions in real time.

Market Monitoring

Track specific markets for price movements and trading activity.

Portfolio Alerts

Monitor wallets for trade confirmations, splits, merges, and redemptions.

Analytics & Research

Stream all events with wildcard subscriptions to build datasets.

Market Making

Subscribe to real-time depth and price level changes via the orderbook channel.

Mempool Trading

Detect trades 3–5 seconds early with pending trade events from the Polygon mempool.

Quick Start

const ws = new WebSocket('wss://wss.predexon.com/v1/your_api_key'); 

ws.onopen = () => {
  ws.send(JSON.stringify({
    action: 'subscribe',
    platform: 'polymarket',
    version: 1,
    type: 'orders', 
    filters: { users: ['0x1234...'] }
  }));
};

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === 'event') {
    console.log('Trade:', msg.data);
  }
};

Connection

Endpoint:
wss://wss.predexon.com/v1/YOUR_API_KEY
On success:
{ "type": "connected", "message": "Connected to Predexon WebSocket" }
HTTP StatusReason
401Missing or invalid API key
403WebSocket requires Dev plan or higher
429Connection limit exceeded
503Server at capacity

Channels

ChannelPlatformtype valueDescription
Tradespolymarket"orders"Order fills and fee refunds (V1 + V2). Supports pending events.
Activitypolymarket"activity"Position splits, merges, redemptions, and NegRisk conversions
Lifecyclepolymarket"lifecycle"New market creation (condition_prepared), token registration (V1), and resolution
Orderbookpolymarket"orderbook"Real-time L2: price changes, trades, book snapshots
Oraclepolymarket"oracle"UMA events: proposals, disputes, settlements, resets
Collateralpolymarket"collateral"pUSD wrap/unwrap events (V2 deposits and withdrawals)
Crypto Priceschainlink"crypto"Chainlink Data Streams crypto price ticks (BTC, ETH, SOL, XRP, BNB, DOGE, HYPE)

Filter Availability

FilterTradesActivityLifecycleOrderbookOracleCollateralCrypto Prices
usersYesYes---Yes-
token_ids---Yes---
condition_idsYesYesYesYesYes--
market_slugsYes--YesYes--
feeds------Yes
Wildcard ["*"]YesYesYesYesYesYesYes

Timestamp Units

ChannelUnit
Orderbookmilliseconds (Polymarket server)
All othersseconds (Predexon normalizer)

Plan Limits

LimitDevProEnterprise
Subscriptions / connection10100Custom
Items / subscription10500Custom
Total items10050,000Custom
Wildcard subscriptions-2 per channelCustom
Priority routing--Yes
Limits are global across all channels. Wildcard connections are tracked per-channel.
A wildcard connection cannot mix wildcard and regular subscriptions on the same channel.

Keepalive & Connection Management

  • Server sends a ping every 30 seconds; pong required within 60 seconds
  • Idle connections (zero subscriptions) closed after 2 minutes (close code 4000)
  • Buffer limits: events dropped at 1 MB, connection terminated at 4 MB

Error Handling

{ "type": "error", "code": "ERROR_CODE", "message": "Human-readable message" }