HIP-4 Markets Docs

API

The public read API behind hip4.markets, for bots, dashboards and other apps on Elysium.

All endpoints are GET, return JSON and need no key. Base URL: https://hip4.markets.

Markets

curl https://hip4.markets/api/markets

Every live market, sorted by 24 h volume. Each market has a key (q… for a question with several answers, o… for a single outcome), a kind (binary, versus, multi, range), a title, a category, an endsAt timestamp, the rules from Hyperliquid's template, volume in USDC and its outcomes. Each outcome carries its id, its two coins (yes, no), side labels and the live YES price.

curl https://hip4.markets/api/market/o53189

One market by key.

Prices, charts and books

curl -N https://hip4.markets/api/stream

Server-sent events. Each message is a JSON object of coins whose price changed, for example {"#531890": 0.9191}.

curl "https://hip4.markets/api/candles/%23531890?i=1h"
curl "https://hip4.markets/api/book/%23531890"

Candles (i = 5m, 1h or 1d) and the order book for one side, read from Hyperliquid. The # is URL-encoded as %23.

Accounts and tokens

curl https://hip4.markets/api/account/0xYourAddress

Positions (token id, shares in 6 decimals, live price, settlement if any) and the last 100 orders with their status and fills, read from the contract's events.

curl https://hip4.markets/api/token/531890

ERC-1155 metadata for a token id.

curl https://hip4.markets/api/config
curl https://hip4.markets/api/health

The contract and USDC addresses, and the service's health (market count, data freshness, last indexed block, keeper status).

Building on the shares

Shares are standard ERC-1155 tokens, so any Elysium contract that handles ERC-1155 can hold them: a pool pairing YES against USDC, a vault that buys both sides of a question, a basket of outcomes. Read totalSupply(id) for supply and /api/markets for the live price.