Skip to main content
Get your API key at dashboard.predexon.com — required for WebSocket connections.
Real-time streaming of Polymarket on-chain events including trades, position activity, and market lifecycle events. Subscribe to specific wallets, markets, or the entire platform with wildcard subscriptions.

Use Cases

Copytrading

Subscribe to top traders’ wallets and get instant notifications when they make trades to mirror their positions.

Market Monitoring

Track specific markets for price movements, trading activity, and resolution events in real-time.

Portfolio Alerts

Monitor your own wallet for trade confirmations, splits, merges, and redemptions.

Analytics & Research

Stream all events with wildcard subscriptions (Pro) to build datasets, analyze market dynamics, and identify trends.

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 successful connection, the server sends:
{
  "type": "connected",
  "message": "Connected to Predexon WebSocket"
}

Connection Errors

HTTP StatusReason
401Missing or invalid API key
403WebSocket access requires Dev plan or higher
429Connection limit exceeded for your plan
503Server at capacity

Channels

Channeltype valueDescription
Trades"orders"Order fills and fee refunds
Activity"activity"Position splits, merges, and redemptions
Lifecycle"lifecycle"New market registration and condition resolution

Filter Availability by Channel

FilterTrades (orders)Activity (activity)Lifecycle (lifecycle)
usersYesYesNo
condition_idsYesYesYes
market_slugsYesNoNo
Wildcard ["*"]YesYesYes

Plan Limits

LimitDevProEnterprise
Subscriptions per connection10100Custom
Items per subscription10500Custom
Total items across all subscriptions10050,000Custom
Wildcard subscriptionsNot allowed2 per channelAllowed
Priority routing (dedicated node)NoNoYes
Free tier does not include WebSocket access. Upgrade to Dev ($49/mo) or higher to use WebSocket streaming.
Subscription and item limits are global across all channels — not per-channel. Wildcard connections are tracked per-channel (e.g. a wildcard on orders does not count against your activity wildcard limit).
A wildcard connection cannot mix wildcard and regular subscriptions on the same channel.

Keepalive & Connection Management

  • The server sends a WebSocket ping every 30 seconds. Your client must respond with a pong (most WebSocket libraries handle this automatically).
  • If no pong is received within 60 seconds, the connection is closed.
  • If a connection has zero active subscriptions for 2 minutes, it is closed with close code 4000.
  • If the client is consuming events too slowly and the server-side outbound buffer exceeds 1 MB, new events will be dropped. If it exceeds 4 MB, the connection is terminated.

Error Handling

All errors follow this format:
{
  "type": "error",
  "code": "ERROR_CODE",
  "message": "Human-readable error message"
}

Error Codes

CodeDescription
AUTH_REQUIREDNo API key provided
AUTH_FAILEDAPI key not found or invalid
CONNECTION_LIMITServer-wide connection cap reached
WILDCARD_CONNECTION_LIMITWildcard connection limit for your key exceeded
SUBSCRIPTION_LIMITMaximum subscriptions reached
ITEMS_PER_SUB_LIMITToo many items in single subscription
ITEMS_LIMITMaximum total items reached
WILDCARD_NOT_ALLOWEDYour plan does not support wildcard subscriptions
INVALID_FILTERSMissing or invalid filter, or filter not supported on this channel
SUBSCRIPTION_NOT_FOUNDSubscription ID doesn’t exist
PARSE_ERRORInvalid JSON message
UNKNOWN_ACTIONUnrecognized action field
RATE_LIMITClient is sending messages too fast