Index

The Index endpoint gives you zerohash's reference price for an asset — a fair, exchange-independent number that tells you what one unit of an asset is worth right now, in the fiat currency you ask for. It's the neutral "source of truth" price you build around when something of value depends on getting the number right.

For engineers and PMs, this is the endpoint you reach for whenever you need to show, value, or check a price rather than trade on one. Before a user commits to a transaction, you want to display a credible rate in their local currency; after they hold a balance, you want to convert it to fiat for a dashboard or statement; and when a quote comes back, you want an independent benchmark to confirm it's fair. All of that leans on the index.

What the request is asking

Take the example:

  • GET /index?underlying=BTC&quoted_currency=USD

In plain terms, this is asking "what is one BTC currently worth in US dollars?". The underlying is the asset being priced — here BTC — and quoted_currency is the fiat you want the answer in. Because quoted_currency supports several fiats (USD, CAD, EUR, GBP, JPY, MXN, ZAR), you can present the same asset in a user's local currency without having to source your own FX.

Where the number comes from

The value you get back isn't a single exchange's last trade — it's a blended, volume-weighted reference price. For each exchange with trading volume, zerohash calculates the volume-weighted average price over the preceding window, then takes the arithmetic mean across all contributing exchanges. The result is a price that's much harder to skew with thin liquidity or one venue's outlier print, which is exactly the property you want when money changes hands based on it.

Why you'd care to use it

In practice, this is the endpoint behind most of the places a price shows up in your product:

  • Pre-trade display — show users a live, trustworthy price in their currency before they commit to anything.
  • Valuing balances — convert a participant's crypto or stablecoin holdings into fiat for a portfolio view, statement, or dashboard.
  • Fairness checks — compare an execution or RFQ price against an independent benchmark to confirm it's reasonable.
  • Reporting and reconciliation — mark positions to a consistent, published reference at a point in time.
📘

Index price ≠ execution price

This is a reference rate for display, valuation, and benchmarking — it doesn't include spreads or fees and isn't something you can transact on. When you need a price a user can actually trade at, use the liquidity / RFQ (quote) endpoints.