Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt

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

HIP-4 is live on testnet. When mainnet launches, hypernode will detect new markets within 60 seconds and start streaming prediction events automatically. No configuration needed.

Prediction actions in the stream

Five HIP-4 actions appear as pre-consensus events in the gossip stream:
TypeDescriptionData
userOutcomeOrder on an outcome tokenOutcome asset ID, amount
splitOutcomeSplit USDH into YES + NO tokensOutcome ID, amount
mergeOutcomeMerge YES + NO back into USDHOutcome ID, amount
negateOutcomeSwap YES for NO (or vice versa)Outcome ID, amount
mergeQuestionMerge multi-outcome tokens back into USDHQuestion ID, amount

Confirmed events

Prediction orders and fills appear as regular confirmed events with # coin names:
{
  "type": "order",
  "consensus": "confirmed",
  "asset": "#40860",
  "data": {
    "coin": "#40860",
    "side": "B",
    "px": "0.40",
    "sz": "30.0",
    "status": "open",
    "prediction": {
      "outcome_id": 4086,
      "side_index": 0,
      "asset_id": 100040860
    }
  }
}
The prediction object is automatically enriched on every event with a # coin.

Settlement events

When an outcome settles, fills appear with dir: "Settlement":
{
  "type": "fill",
  "consensus": "confirmed",
  "asset": "#40861",
  "data": {
    "coin": "#40861",
    "px": "0.0",
    "side": "A",
    "dir": "Settlement",
    "closedPnl": "-10.4",
    "fee": "0.0",
    "feeToken": "USDH"
  }
}
  • px: "1.0" = this side won (token redeemable for 1 USDH)
  • px: "0.0" = this side lost (token worth nothing)
  • side: "A" = auto-settlement (not a user trade)

Subscribing to prediction events

All prediction market activity:
{
  "action": "subscribe",
  "filters": {
    "action_types": ["userOutcome", "splitOutcome", "mergeOutcome", "mergeQuestion", "negateOutcome"]
  }
}
Track a specific outcome token:
{
  "action": "subscribe",
  "filters": {"assets": ["#40860"]}
}
Track settlements (filter confirmed fills, check for dir: "Settlement"):
{
  "action": "subscribe",
  "filters": {"action_types": ["fill"], "assets": ["#40860"]}
}

Metadata enrichment

Every prediction event is automatically enriched with metadata from outcomeMeta, refreshed every 60 seconds:
FieldTypeDescription
prediction.outcome_idnumberOutcome ID
prediction.side_indexnumber0 = Yes, 1 = No (or custom sides)
prediction.asset_idnumberFull asset ID (100M + encoding)
The enriched prices endpoint adds more:
FieldDescription
outcome_nameHuman-readable name
side_name”Yes”, “No”, or custom (e.g., “Hypurr”)
questionParent question name (multi-outcome)
price_binary.underlyingUnderlying asset (e.g., “BTC”)
price_binary.target_priceTarget price
price_binary.expiryExpiry timestamp
price_binary.periodRoll period (e.g., “1d”, “15m”)

Admin events

These appear when markets are created or settled:
TypeDescription
registerQuestionNew prediction question created
registerOutcomeNew outcome added
settleOutcomeOutcome resolved (triggers settlement fills)
changeOutcomeDescriptionOutcome metadata updated (e.g., recurring market rolls to new expiry)