PMDataDocs
Data SchemasPredict.fun

Lifecycle

Schema for Predict.fun market lifecycle updates.

All fields come from the raw Predict.fun WebSocket message. PMData adds only the receive timestamp local_timestamp.

Data type: lifecycle (predict_fun)

Source topics: predictMarketStatus/{marketId}, predictTradingStatus/{marketId} and predictMarketChanged/{marketId}. One file per UTC day of local_timestamp holds every market.

FieldTypeDescription
market_idint64Predict.fun numeric market id. Source: data.marketId.
timestamptimestamp[us] | nullTime the state took effect. Source: data.tsMs.
local_timestamptimestamp[us]PMData receive timestamp. When the same row arrives more than once, the earliest receive time.
event_typestringTopic name: predictMarketStatus, predictTradingStatus or predictMarketChanged.
statusstring | nullpredictMarketStatus only. Market status as sent, for example REGISTERED, PRICE_PROPOSED, PRICE_DISPUTED, RESOLVED or REMOVED. Source: data.status.
trading_statusstring | nullpredictTradingStatus only. Trading status as sent, for example OPEN, MATCHING_NOT_ENABLED or CLOSED. Source: data.tradingStatus.
outcome_labelslist<string> | nullOutcome labels, on RESOLVED messages. The first label is the outcome the L2 book is priced in. Source: data.marketOutcomes[].label.
outcome_priceslist<double> | nullSettlement price of each outcome, in the order of outcome_labels. A market can settle 0.5 / 0.5. Source: data.marketOutcomes[].price.
patch_kindstring | nullpredictMarketChanged only, for example cryptoUpDownVariantData or translationUpdate. Source: data.patchKind.
patch_jsonstring | nullpredictMarketChanged only. The change as compact JSON; the opening and closing prices of crypto Up/Down markets are here. Source: data.patch.
  • Each day has, for every market and topic, the first state seen that day, plus every change during the day. Identical rows within a day are kept once.
  • Predict.fun sends the current state on every subscription, and PMData's connections re-subscribe every hour. A timestamp earlier than the file's day is a state carried over, not a change.
  • Rows are ordered by timestamp, then local_timestamp, then market_id.

Timestamps

All timestamps are UTC with microsecond precision. Predict.fun sends epoch milliseconds.

On this page