Predictefy Docs
Browse documentation

Historical data

Cross-venue OHLCV candles via fetchOHLCV, with honest per-candle provenance and the current per-venue depth.

GET /api/{exchange}/fetchOHLCV serves historical price candles for one venue outcome. History is stored for the 13 venues with a history lane — pascal, xo, pred, and predictstreet have none and answer honestly rather than serving empty candles — and capture and backfill are availability-dependent. Predictefy makes no uninterrupted-capture, per-venue freshness, or growing daily guarantee. Request the exact range you need. SX Bet serves captured, trade-derived candles only; it has no official-history source or catalog-price write-forward coverage.

Fetching candles

curl -s "$PREDICTEFY_API_URL/api/polymarket/fetchOHLCV?outcomeId=OUTCOME_ID&resolution=1h&limit=500" \
  -H "Authorization: Bearer pk_live_YOUR_KEY"
ParameterRequiredNotes
outcomeIdyes*The catalog outcomeId returned by market reads, or the venue-native id (id is accepted as an alias).
resolutionyes1s/5s/10s/30s: trade-derived for the five venues below. 1m/1h/1d: stored. 5m/15m/30m/4h/6h: aggregated (source: derived, sourceType: rollup).
start/endnoISO timestamp or epoch milliseconds.
limitnoUp to 5,000 candles per call — page longer ranges with start/end.
VenueSub-minute outcomeId formatExample
polymarketCLOB asset id11198861…
kalshiticker (YES view) / ticker-NO (NO view)KXBTC15M-…-00
hyperliquidfull HIP-4 asset id (venue coin uses #N)100001730 (#1730)
sxbetmarketHash#outcomeIndex0x3f…9a#0
myriadnetworkId:marketId:outcomeIdx42220:1320:0

REST-derived candles use these verbatim catalog formats (the venue-native id is also accepted):

VenueCatalog outcomeId formatExample
predictfunpredictfun:{marketId}:{indexSet}predictfun:32153:1
limitless{marketSlug}:{yes|no}draw-1784184108504:yes
geminiGEMI:{marketId}:{nativeOutcomeId}:{yes|no}GEMI:NGAS2607312100:GEMI-NGAS2607312100-HI3D2:yes

Sub-minute history is forward-only from the start of each venue's capture coverage. Use start and end to probe the range you need; empty data means the requested range predates available capture, contains no trades, or crosses a capture gap. When the history is unavailable, the route returns retryable 503 HISTORY_UNAVAILABLE.

router is not supported for history — candles are venue-scoped.

Honest candles

Every candle carries provenance fields so you can distinguish true venue candles from derived ones:

{
  "timestamp": 1780444800000,
  "open": 0.61,
  "high": 0.63,
  "low": 0.6,
  "close": 0.62,
  "volume": null,
  "source": "write-forward",
  "sourceType": "point-derived",
  "quality": "ok",
  "isTrueCandle": false
}
  • sourceofficial (venue history API), onchain, write-forward (availability-dependent recorder), or derived.
  • sourceTypetrue-candle vs point-derived / trade-derived / rest-derived / book-derived / rollup; rollup means query-time aggregation of stored finer candles.
  • qualityok, partial, suspect, or mixed; mixed means the bucket aggregates inputs of differing quality. Known capture gaps report partial: known-damage honesty is part of the API contract.
  • volume is null where the source doesn't provide it (most point-derived data).

REST-derived candles exist only for Gemini, Predict.fun, and Limitless. REST-derived candles are served only when stored and streamed candles are both absent; low-volume accrual is expected. They always report source: derived, sourceType: rest-derived, quality: partial, and isTrueCandle: false. Rollups over a uniformly partial REST base also report partial.

Coverage depth

The coverage matrix states only what is currently available:

VenueCurrent coverage
PolymarketDeep official, bounded set: one-year hourly coverage for a limited market set, plus availability-dependent forward capture. This is not all-market breadth.
KalshiDeep official: broad hourly backfill plus availability-dependent write-forward capture.
LimitlessREST-derived fallback: minute-and-up candles report quality: partial, plus availability-dependent write-forward capture. No stream capture, so sub-minute tiers are honest-empty.
Other write-forward venuesForward-only recording subject to per-venue capture and storage gaps; request the exact range rather than assuming continuous depth.
SX BetCaptured-tape/derived only: forward-only trade-derived candles. Minute-and-up tiers derive from the same tape. No official or catalog-price write-forward history is claimed.

Credits

History reads cost a flat 5 credits per query. During the private beta, every account receives the full history window. The public plan windows that apply at GA are listed under Pricing, credits & billing.