Documentation is in progress. Every page in this section describes the current implementation and may change as PolyLab evolves.
Reference

Upstream to PolyLab Field Map

In Progress Last updated 2026-03-10

Field-by-field mapping from upstream Polymarket payloads into PolyLab storage, display, and derived fields.

Current Implementation

This page is intentionally explicit and implementation-first. If the product or upstream APIs change, the current behavior described here can change with them.

Market and event mapping

Upstream sourceUpstream fieldPolyLab fieldNotes
Gamma marketidmarket_idStored on each outcome row
Gamma marketconditionIdcondition_idUsed for holders lookup and grouping
Gamma marketquestionquestionMain display title
Gamma marketoutcomes[i]outcome_nameOne stored row per outcome
Gamma marketoutcomePrices[i]priceParsed to float where possible
Gamma marketspreadspreadStored directly
Gamma marketvolumevolume_usdStored directly
Gamma marketliquidityliquidity_usdStored directly
Gamma marketstartDatestart_dateStored directly
Gamma marketendDateend_dateStored directly
Event payloadslugevent_slugPreferred when event resolution succeeds
Event payloadicon or imageicon_urlUsed in the UI
Event payloadtags[].labelmarket_tags.tag_labelAlso drives primary category

Derived fields

PolyLab fieldComputed fromNotes
urlevent_slugBuilt as https://polymarket.com/event/{event_slug}
categoryfirst available tag labelConvenience primary label
aprprice, end_date, snapshot_atAnnualized heuristic
implied oddspriceUI-only 1 / price transform
yes_profitable_countholders + wallet PnLCount where outcome_index = 0 and total_pnl > 0
no_losing_countholders + wallet PnLCount where outcome_index = 1 and total_pnl < 0

Holder and wallet mapping

Upstream sourceUpstream fieldPolyLab fieldNotes
Holders APIproxyWalletwallet_address / normalized addressStored after normalization
Holders APIamountposition_size / normalized positionSizeParsed to float
Holders APIoutcomeIndexoutcome_indexYES / NO side
Holders APInamealiasOptional alias
Wallet PnL APIlatest list item pwallets_stats.total_pnlLast observed PnL point

Important caveat

This map documents the current implementation. It does not claim that every upstream payload will always preserve the same field names or shape.