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.

The crypto-prices channel streams real-time price ticks from Chainlink Data Streams (Mercury). One tick per upstream observation — no batching, no aggregation. Use this for charting, signals, or as a price reference alongside the on-chain Polymarket channels.
This is the only channel that uses platform: "chainlink". All other channels use platform: "polymarket".

Subscribe

{
  "action": "subscribe",
  "platform": "chainlink",
  "version": 1,
  "type": "crypto",
  "filters": { "feeds": ["BTC/USD", "ETH/USD"] }
}

Filter Types

FilterDescriptionExample
feedsOne or more feed symbols["BTC/USD", "SOL/USD"]
Wildcard ["*"]All entitled feeds{"feeds": ["*"]}
users, token_ids, condition_ids, and market_slugs are not supported — crypto prices aren’t tied to wallets or markets. Subscribing with any of those returns INVALID_FILTERS.

Supported Feeds

SymbolAsset
BTC/USDBitcoin
ETH/USDEthereum
SOL/USDSolana
XRP/USDXRP
BNB/USDBNB
DOGE/USDDogecoin
HYPE/USDHyperliquid

Event Type

price_feed

A single price tick from one of the subscribed feeds.
{
  "type": "event",
  "subscription_id": "sub_xxx",
  "data": {
    "event_type": "price_feed",
    "feed": "BTC/USD",
    "price": 66225.49,
    "bid": 66221.69,
    "ask": 66229.46,
    "observed_at": 1774672588,
    "timestamp": 1774672588
  }
}

Field Reference

FieldTypeDescription
event_type"price_feed"Always price_feed
feedstringFeed symbol (e.g. "BTC/USD")
pricenumberMid / benchmark price reported by Chainlink
bidnumberBid price
asknumberAsk price
observed_atnumberUpstream observation timestamp (Unix seconds)
timestampnumberSame as observed_at
Chainlink reports prices as 1e18 fixed-point integers; Predexon converts to floating-point with 8 decimal places of precision before publishing.

Example: Track Multiple Feeds

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);

  if (msg.type === 'event' && msg.data.event_type === 'price_feed') {
    const { feed, price, bid, ask, observed_at } = msg.data;
    const spread = ask - bid;
    console.log(`[${feed}] $${price.toFixed(2)}  bid=${bid.toFixed(2)} ask=${ask.toFixed(2)} spread=${spread.toFixed(4)}`);
  }
};

ws.send(JSON.stringify({
  action: 'subscribe',
  platform: 'chainlink',
  version: 1,
  type: 'crypto',
  filters: { feeds: ['BTC/USD', 'ETH/USD', 'SOL/USD'] }
}));