BlockRun
Get started

Market Data (Pyth)

Spot prices and historical OHLC bars across four asset classes, grounded in Pyth Network on-chain feeds.

Crypto, FX and commodity prices are free. Equities — US and international — are $0.0010 per call, because those feeds are broker-fed rather than open on-chain data. Every /list endpoint is free regardless of asset class.

Endpoints

EndpointMethodPriceDescription
/api/v1/crypto/listGETFreeAvailable crypto symbols
/api/v1/crypto/price/{symbol}GETFreeCrypto spot price
/api/v1/crypto/history/{symbol}GETFreeCrypto OHLC bars
/api/v1/fx/listGETFreeAvailable FX pairs
/api/v1/fx/price/{symbol}GETFreeFX spot rate
/api/v1/fx/history/{symbol}GETFreeFX OHLC bars
/api/v1/commodity/listGETFreeAvailable commodities
/api/v1/commodity/price/{symbol}GETFreeCommodity spot price
/api/v1/commodity/history/{symbol}GETFreeCommodity OHLC bars
/api/v1/usstock/listGETFreeUS tickers
/api/v1/usstock/price/{symbol}GET$0.0010US equity spot price
/api/v1/usstock/history/{symbol}GET$0.0010US equity OHLC bars
/api/v1/stocks/{market}/listGETFreeTickers for one non-US market
/api/v1/stocks/{market}/price/{symbol}GET$0.0010Non-US equity spot price
/api/v1/stocks/{market}/history/{symbol}GET$0.0010Non-US equity OHLC bars

GET and POST both work on every path; POST exists so callers that cannot attach headers to a GET still have a route.

Symbol formats

Always resolve symbols from the matching /list endpoint rather than guessing.

Asset classFormatExamples
CryptoBASE-QUOTEBTC-USD, ETH-USD, SOL-USD
FXBASE-QUOTEEUR-USD, GBP-USD, JPY-USD
CommodityMETAL-USD / tickerXAU-USD (gold), XAG-USD (silver)
US equityPlain tickerAAPL, TSLA, NVDA, SPY
Non-US equityPer-market conventionHKEX -HK suffix, TSE 4-digit, KRX 6-digit, LSE/XETRA/Euronext alpha

/list takes q (substring filter) and limit (max 2000, default 100).

Markets

{market} for the /stocks/ family: us, hk, jp, kr, gb, de, fr, nl, ie, lu, cn, ca. /api/v1/usstock/* is a legacy alias for /api/v1/stocks/us/* and behaves identically.


Spot price

# Free — no payment header needed
curl https://blockrun.ai/api/v1/crypto/price/BTC-USD

# Paid — $0.0010
curl https://blockrun.ai/api/v1/usstock/price/AAPL \
  -H "X-Payment: <x402_payment_token>"
ParameterInRequiredDescription
symbolpathYesAny symbol from the matching /list
sessionqueryNoTrading session hint — regular or extended

The response carries symbol, price, confidence (Pyth's interval around the price), publishTime and source. Treat confidence as real: a wide interval means the feed is uncertain, not that the price is precise.


OHLC history

curl "https://blockrun.ai/api/v1/crypto/history/BTC-USD?resolution=D&from=1735689600&to=1738368000"
ParameterInRequiredDescription
symbolpathYesAny symbol from the matching /list
resolutionqueryNoBar size — 1, 5, 15, 60, 240, D, W, M. Default D
fromqueryNoStart, unix seconds
toqueryNoEnd, unix seconds. Defaults to now
sessionqueryNoregular or extended

Discovery

Free endpoints still answer a 402 when you ask for one without payment — that response is x402 discovery metadata for indexers, not a charge. A plain GET returns 200 and the data.

Errors

StatusMeaningCharged?
402Payment required (paid feeds), or discovery metadata (free feeds)No
404Symbol not found — check the matching /listNo

What's next?