DocsData quality

Data quality

How PredBooks marks known gaps and problems in its data: quality flags on every file and the free hourly coverage channel.

API key. Pick a plan on Pricing and create a key, then install the SDK for your language: the Go SDK, Python SDK, Rust SDK or TypeScript SDK.

Market data has gaps: connections drop and venues change their APIs. PredBooks does not hide them. Every file says what is known to be wrong with it, and a free channel records how well each hour was captured.

Flags on every file

The SDKs' files call and the API's /files and /download return a flags list per file:

FlagMeaning
provisionalWritten before all late data could arrive (trades are final two hours after the day ends; onchain fills once every block of the day has been read)
cold_startA book hour processed without the state from the hour before. Instruments appear only once the venue sends their whole book
cold_changesSome level changes were skipped because their book was not known yet
unmapped_tokensOnchain fills whose token could not yet be matched to a market; market_id is empty for them

The coverage channel

coverage is free. It has one row per venue, channel and hour of recording:

ColumnMeaning
messagesMessages recorded in the hour
max_silence_secondsLongest stretch without a message (3600 when nothing arrived)
disconnects, disconnected_secondsConnection drops and how long connections were down, summed over connections
collectorsWhich recorders contributed

The hours in which a channel went silent for more than a minute:

cov, err := pb.Load(ctx, "polymarket", "coverage", "2026-12-05", &predbooks.LoadOptions{
	Columns: []string{"channel", "hour", "max_silence_seconds"},
})
if err != nil {
	log.Fatal(err)
}
defer cov.Release()

tr := array.NewTableReader(cov, 0) // the arrow-go array package
defer tr.Release()
for tr.Next() {
	rec := tr.RecordBatch()
	silence := rec.Column(2).(*array.Float64)
	for i := 0; i < silence.Len(); i++ {
		if silence.Value(i) > 60 {
			channel, hour := rec.Column(0).ValueStr(i), rec.Column(1).ValueStr(i)
			fmt.Println(channel, hour, silence.Value(i))
		}
	}
}
cov = pb.load("polymarket", "coverage", "2026-12-05")
cov[cov.max_silence_seconds > 60]
use predbooks::arrow::array::Float64Array;
use predbooks::arrow::compute::{filter_record_batch, kernels::cmp::gt};

let cov = pb.load("polymarket", "coverage", "2026-12-05", LoadOptions::new())?.concat()?;
let silence = cov.column_by_name("max_silence_seconds").unwrap();
let gaps = filter_record_batch(&cov, &gt(silence, &Float64Array::new_scalar(60.0))?)?;
const cov = await pb.load("polymarket", "coverage", "2026-12-05");
const gaps = cov.toArray().filter((row) => row.max_silence_seconds > 60);

How far back each kind of data goes

  • Order book history starts on December 5, 2026. Venues do not serve past books.
  • Trades and onchain fills reach further back on some venues, read from the venues' archives and the chains. Venues lists the dates for each.