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.

Returns recent (or historical) fills on a market, paginated by time_us. Every row includes enriched side, role (taker/maker), fee_token, and timestamps.

Endpoint

GET /v1/markets/:id/trades

Query parameters

ParamTypeDefaultDescription
sideintbothFilter to side 0 (Yes) or 1 (No)
fromintLower bound, microseconds since epoch
tointUpper bound, microseconds since epoch
limitint100Max rows (cap 1000)

Response (single trade row)

{
  "tid": 12345,
  "oid": 407740089995,
  "user": "0x67afd7c25c6743fa5caab7a7f4ac038f1eaa4d56",
  "coin": "#0",
  "side_index": 0,
  "side_label": "Yes",
  "side": {
    "raw": "B", "label": "buy",
    "description": "Bid side — buying outcome shares with USDH."
  },
  "px": "0.60573",
  "sz": "1.0",
  "notional_usdh": "0.605730",
  "role": {
    "raw": "false", "label": "maker",
    "description": "Provided liquidity — order was sitting in book before being filled."
  },
  "direction": "Buy",
  "closed_pnl": "0",
  "fee": "0",
  "fee_token": {
    "raw": "+0", "label": "Yes shares",
    "description": "Buy-side fee deducted from received YES outcome shares (currently 0% rate).",
    "applies_to": "buy"
  },
  "builder_fee": null,
  "builder_addr": null,
  "deployer_fee": null,
  "tx_hash": "0x...",
  "at": { "us": 1777745649368000, "iso": "2026-05-02T18:14:09.368+00:00", "relative": "2s ago" }
}

Response wrapper

{
  "outcome_id": 0,
  "count": 100,
  "limit": 100,
  "trades": [ ... ]
}

Use cases

  • Activity feeds — render the most recent trades.
  • Backfill — page through historical trades by setting to=<earliest you have> and re-querying.
  • Volume reconstruction — sum notional_usdh across all fills in a window.
  • Whale detection — filter rows where notional_usdh > 1000.

Examples

# Last 10 trades on outcome 0
curl -H "X-API-Key: hip4_live_..." \
  "https://hip4.polynode.dev/api/v1/markets/0/trades?limit=10"

# All trades since a specific timestamp
curl -H "X-API-Key: hip4_live_..." \
  "https://hip4.polynode.dev/api/v1/markets/0/trades?from=1777740000000000&limit=500"

Notes

  • Sorted reverse-chronological (newest first).
  • notional_usdh is computed as px × sz server-side.
  • closed_pnl is HL’s per-fill realized PnL field — it’s only set when the fill closes a position.
  • Edge-cached for 1 second.