Skip to main content
The events adapter gives you structured access to every HIP-4 prediction market on Hyperliquid. Markets are returned as typed objects with pre-computed coin identifiers so you can go straight from discovery to trading without any manual ID mapping.

Fetch all markets

hip4.events.fetchMarkets() returns a flat HIP4Market[] array covering all active outcomes.

Filter by type

Pass a type filter to narrow results to a specific market category.

Group by type

Use groupBy: "type" to receive a MarketsByType object with one key per market category.

Group multi-outcome markets by question

Multi-outcome markets share a parent question. Grouping by question returns a MarketsByQuestion object keyed by question ID (or "standalone" for unclaimed outcomes).

Paginate results

Use limit and offset to page through large result sets.

Sort results

Control the order of returned markets with sortBy.

Access typed fields on DefaultBinaryMarket

Each market type exposes fields specific to its category. DefaultBinaryMarket includes the parsed description fields you need for display and filtering.

Fetch events and categories

Markets belong to events. You can query at the event level when you need the full context-title, description, volume, status, and the markets list together.
Event and outcome metadata is cached for 30 seconds. Subsequent calls within that window return the cached result without hitting the network.