LinkHash Data API
Second-by-second Polymarket order books for short-cycle crypto markets, lined up against the Chainlink settlement price and Binance + Coinbase spot — one clean REST API. Create a free key below and you're pulling data with Python in two minutes.
1Your API keys
Connect your wallet to create a free API key.
No wallet? Any Phantom (Solana) wallet works — it's just your identity for issuing keys. Free, no payment.
2Quickstart with Python
Use the official linkhash client — clean methods, pandas DataFrames, no URL wrangling. You just name the asset and it finds the live market for you. (Prefer raw HTTP in any language? Every call is a plain authenticated GET — see Endpoints.)
pip install requests pandas
curl -O https://link-hash.com/developers/linkhash.py # the client — one file, no buildfrom linkhash import LinkHash
lh = LinkHash("lhx_live_...") # paste your key from link-hash.com/developerslh.markets() # DataFrame of all 14 live markets
lh.markets(asset="BTC") # just BTC — its current 5m + 15m windows# name the asset — the client resolves the live market automatically
book = lh.snapshots("BTC", cycle="5m", minutes=10) # last 10 min, as a DataFrame
print(book.tail())
# ts mid_price best_bid best_ask ...
# 2026-07-16 20:00:08+00:00 0.990 0.99 1.00 ...# one row per timestamp — chainlink, binance, coinbase as columns (they share
# the same 1s tick, so they line up exactly). Great for basis / comparison.
px = lh.prices("BTC", minutes=30)
print(px.tail())
# ts chainlink binance coinbase
# 2026-07-17 14:15:44+00:00 63355.356 63414.005 63356.03
prob = lh.latest("BTC", cycle="5m")["mid_price"] # + the implied Up-probability# the order book AND chainlink/binance/coinbase, aligned on the same ts:
lh.everything("BTC", cycle="5m", minutes=30)
# ts | asset | cycle | market_id | mid_price | best_bid | best_ask | chainlink | binance | coinbase
lh.history("BTC", "everything", cycle="15m") # ...the same, full multi-day history# passing an ASSET spans all its 5m/15m markets over the window (each market
# only lives minutes) — this is how you get hours/days of order-book history:
lh.snapshots("BTC", cycle="5m", hours=6) # 6h of BTC 5m mids across markets
lh.snapshots("BTC", cycle="5m", days=2) # 2 days
lh.chainlink("ETH", days=3) # 3 days of the Chainlink price
lh.spot("BTC", start="2026-07-15", end="2026-07-16") # explicit dates (or datetimes)
# Note: candles(...) is per single market (its 5-15 min life); for long ranges
# use snapshots(asset,...) / chainlink / spot above.lh.usage() # {'tier': 'free', 'requests_today': 12, 'daily_limit': 5000, 'remaining_today': 4988, ...}from linkhash import LinkHash
lh = LinkHash("lhx_live_...")
# --- markets ---------------------------------------------------------------
lh.markets(asset=None, cycle=None) # live markets (DataFrame)
lh.market("btc-updown-5m-...") # one market's metadata (dict)
# --- order book (Polymarket implied probability) ---------------------------
lh.snapshots("BTC", cycle="5m", minutes=10) # spans all the asset's markets (mid/best)
lh.snapshots("btc-updown-5m-...") # one market, WITH full bid/ask depth
lh.latest("BTC", cycle="5m") # single most-recent snapshot (dict)
lh.candles("BTC", cycle="15m") # 1-min OHLC of the implied prob (one market)
# --- reference prices ------------------------------------------------------
lh.chainlink("BTC", minutes=30) # Chainlink (RTDS) price
lh.spot("BTC", exchange="binance") # Binance or Coinbase spot ("coinbase")
lh.prices("BTC", minutes=30) # chainlink + binance + coinbase, aligned
lh.everything("BTC", cycle="5m") # order book + all 3 prices, aligned
# --- cross-venue: Polymarket x Kalshi (same 15m up/down markets) ------------
lh.markets(venue="kalshi") # live Kalshi markets
lh.snapshots("BTC", venue="kalshi") # Kalshi 1 Hz order book
lh.combined("BTC", minutes=30) # both venues aligned + edge=kalshi_mid-poly_mid
lh.settlements("BTC", venue="kalshi", days=2) # settled up/down outcomes + strikes
lh.mismatch() # how often the 2 venues settle OPPOSITE (per asset)
lh.mismatch("BTC", detail=True) # + each mismatched window's strikes
# --- full multi-day history (auto-paginated) -------------------------------
lh.history("BTC", "snapshots", cycle="15m") # kind: snapshots | chainlink | spot
lh.history("BTC", "everything", cycle="5m") # | prices | everything
# --- live streaming (WebSocket; pip install websocket-client) --------------
s = lh.stream(assets=["BTC","ETH"], channels=["orderbook","price"])
s.get(); s.terminate() # or lh.stream(..., on_message=fn)
# --- account ---------------------------------------------------------------
lh.usage() # tier + remaining quota (dict)
lh.status() # data freshness (dict)
# Time on any data method: minutes= / hours= / days= or start= / end=
# (a date "2026-07-07", a datetime, or unix seconds). All return DataFrames.Assets: BTC ETH SOL XRP DOGE HYPE BNB · cycles: 5m 15m. Every data method takes days= / hours= / minutes= (lookback) or start= / end= (a date like "2026-07-07", a datetime, or unix seconds), and returns a pandas DataFrame. Free tier serves the last 7 days and up to 5000 rows/call — longer windows are clamped (history_clamped: true). Data begins when collection started.
3Live streaming (WebSocket)
For real-time data, use the WebSocket feed instead of polling — updates are pushed the instant they're collected, and a stream connection doesn't count against your REST request quota.
pip install websocket-clients = lh.stream(assets=["BTC", "ETH"]) # channels default: orderbook + price
for _ in range(10):
print(s.get()) # next message (dict), blocks until one arrives
s.terminate()
# {'channel':'orderbook','venue':'polymarket','asset':'BTC','cycle':'5m','market_id':'...','ts':...,
# 'mid_price':0.55,'best_bid':0.54,'best_ask':0.56}
# {'channel':'orderbook','venue':'kalshi','asset':'BTC','cycle':'15m','market_id':'KXBTC15M-...','ts':...,
# 'mid_price':0.57,'best_bid':0.56,'best_ask':0.58} # both venues stream live — filter on venue
# {'channel':'price','asset':'BTC','ts':...,'chainlink':63930.9,'binance':63414.0,'coinbase':63356.0}lh.stream(assets=["BTC"], channels=["price"], on_message=lambda m: print(m)) # runs until Ctrl-Cwss://link-hash.com/ws/v1/stream?key=lhx_live_...&assets=BTC,ETH&channels=orderbook,priceChannels: orderbook (per market: mid/best — carries a venue field, polymarket or kalshi, so both venues' books for the same 15m market stream side by side; filter on it) and price (chainlink + binance + coinbase, aligned). Omit assets for all 7. Latency ~1s.
4Endpoints
Base URL https://www.link-hash.com/api/v1 · auth header Authorization: Bearer <key> · all responses { "ok": true, "count": N, "data": [...] }. Time params (start/end) accept ISO8601 or unix seconds.
| GET /markets | Currently-active markets. Filters: ?asset=BTC&cycle=5m |
| GET /markets/{id} | Metadata for one market (asset, cycle, tokens, window). |
| GET /markets/{id}/snapshots | 1 Hz order book (bids/asks/mid/best). ?start=&end=&limit= |
| GET /markets/{id}/candles | 1-minute OHLC of the implied probability. |
| GET /assets/{asset}/snapshots | Order-book history across an asset's markets. ?cycle=&venue= |
| GET /assets/{asset}/combined | Polymarket + Kalshi book aligned per second (15m) + live edge. |
| GET /settlements | Settled up/down outcomes + strikes. ?asset=&venue=&cycle= |
| GET /mismatch | Polymarket-vs-Kalshi settlement-mismatch rate. ?asset=&detail=1 |
| GET /prices/chainlink | Chainlink reference price. ?asset=BTC&start=&end= |
| GET /prices/spot | Binance/Coinbase spot. ?asset=BTC&exchange=binance |
| GET /usage | Your key's tier + remaining daily quota. |
| GET /status | Data freshness / active-market count. |
Assets: BTC ETH SOL XRP DOGE HYPE BNB · cycles: 5m 15m · (Binance covers all but HYPE; Coinbase covers all 7).
5Limits & notes
- Free tier: 5000 requests/day, 7 days of history, up to 5000 rows per call. Quota resets 00:00 UTC. Higher tiers are coming.
- Rate-limit headers: every response carries X-RateLimit-Limit / X-RateLimit-Remaining; a 429 means you hit the daily cap.
- Freshness: data is collected at 1 Hz and lands within ~a second. Markets rotate every 5/15 minutes — poll /markets to follow the current window.
- Security: keys are shown once and stored only as a hash. Rotate anytime by revoking + creating a new one.