Synpath
Core Concepts

Schemas and Data Formats

Every object Synpath returns, field by field, and the conventions that hold across all of them.

Synpath maps every venue onto one set of types. The same Market comes back from Kalshi, Polymarket and Polymarket US; the same Order is what you send and what you read back. The types are Pydantic models, so they validate on the way in, serialize to JSON on the way out, and appear unchanged in the REST API's OpenAPI schema.

from synpath import Market, Order, OrderRequest, Position   # read and trading types alike

market = synpath.Client().fetch_market("kalshi:KXFEDDECISION-26SEP-C25")
market.model_dump()          # a plain dict, JSON-ready
Market.model_validate(data)  # and back again

Conventions

Identifiers

id on a market or event is a Synpath ID, venue:native. The venue's own id is kept beside it on venue_market_id / venue_event_id. See Synpath IDs.

Timestamps

Every timestamp is UTC. Fields ending in _timestamp, _at or named timestamp are integers in milliseconds since epoch. Where the same instant is useful to read, a sibling field ending in _datetime carries it as ISO 8601 (2026-09-17T14:00:00Z). Never seconds, never mixed.

Prices

Every price is a probability in 0 to 1: 0.42 means 42¢ per contract on a $1 payout, on every venue, even where the venue itself prints cents. Every price is the YES price. Where you asked for the NO side (market.no.quote, a book with side="no") the object says so, and its prices are what NO costs.

Read types carry prices as float. Trading types carry them as Decimal, because a price that will be signed and sent must be exact; strings and ints are accepted on the way in.

Amounts and units

Order sizes are contracts (shares). Volume and liquidity are labelled with their unit, contracts or collateral, because Kalshi counts one and Polymarket the other.

Missing values

A figure a venue did not publish is None, never 0. A mid without both sides quoted is None. A bool a venue did not answer (neg_risk, mutually_exclusive) is None, never False.

The venue's own payload

Every object has info: the venue's response, untouched, for the field Synpath did not map. On aMarket it is the raw catalog row; on an Order it holds the request that was sent and the answer that came back.

Two sides, by position. A market's yes and no are found by their place in the venue's payload, never by label text: some Kalshi markets label both sides identically.

Market data

Event

A real-world question grouping one or more markets.

FieldTypeMeaning
idstrSynpath ID, venue:native
venuestrkalshi, polymarket or polymarket_us
venue_event_idstrThe venue's own event id
titlestr
descriptionstr | None
slugstr | NoneURL name, where the venue has one
marketslist[Market]The markets under this event
statusMarketStatusThe most open status among its markets
native_statusstr | NoneThe venue's own status word
categorystr | None
tagslist[str]
series_idstr | NoneThe recurring series above the event, where the venue has the tier
mutually_exclusivebool | NoneWhether exactly one market resolves YES. None when the venue did not say
close_timestampint | Nonems; the latest close among its markets
close_datetimestr | NoneISO 8601
urlstr | NoneThe event page on the venue
image_urlstr | None
settlement_sourceslist[dict]Who decides the outcomes: [{name, url}]
infodictThe venue's payload

Market

One tradeable proposition: the thing that resolves and pays out.

FieldTypeMeaning
idstrSynpath ID, venue:native
venuestr
venue_market_idstrThe venue's own id: ticker, Gamma id or slug
event_idstr | NoneThe parent event's Synpath ID
titlestrThe whole question
descriptionstr | NoneResolution criteria, verbatim from the venue
slugstr | None
yesOutcomeThe YES side and its quote
noOutcomeThe NO side and its quote
statusMarketStatusunopened, open, closed or settled
native_statusstr | NoneThe venue's own word
activeboolAccepting orders right now; separate from status because a venue can halt without changing lifecycle
market_typestrbinary, categorical, scalar or unknown
open_timestampint | Nonems
close_timestampint | Nonems; when trading stops
resolution_timestampint | Nonems; the venue's scheduled resolution, not when it actually resolved
open_datetime, close_datetime, resolution_datetimestr | NoneISO 8601 twins of the above
tick_sizefloat | NoneMinimum price increment
face_valuefloatWhat one contract pays at settlement; 1.0 on every venue today
book_modelBookModelWhether both sides share one book
statsMarketStatsVolume, liquidity, open interest
urlstr | None
image_urlstr | None
categorystr | None
tagslist[str]
series_idstr | NoneKalshi keys its fee schedule on this
outcome_labelstr | NoneThis market's short name inside its event ("50+ bps decrease")
neg_riskbool | NoneWhether a NO here converts into YES exposure on the event's other markets
settlement_sourceslist[dict]Who rules on the outcome: [{name, url}]
infodictThe venue's payload; Polymarket's conditionId lives here

Outcome

One side of a market. It has no id: the side is said on the call.

FieldTypeMeaning
labelstrThe venue's display text: Yes, No, Up, a team name. Never used for logic
quoteQuoteIn this side's own terms: the NO quote is what NO costs
venue_token_idstr | NonePolymarket's CLOB token id for this side; None elsewhere
price_change_24hfloat | NoneAbsolute probability change over 24h, where published
infodict

Quote

Four prices, each independently nullable, because each is absent for its own reason.

FieldTypeMeaning
bidfloat | NoneBest price someone will pay. None when nobody is bidding
bid_sizefloat | NoneContracts at the bid
askfloat | NoneBest price someone will sell at
ask_sizefloat | None
midfloat | None(bid + ask) / 2, only when both sides are quoted
lastfloat | NoneLast traded price; can be months old on a thin market
last_timestampint | Nonems; always read it with last
last_datetimestr | None
spreadfloat | NoneComputed: ask − bid, or None

MarketStats

Venue-reported headline numbers, with their units spelled out.

FieldTypeMeaning
volume_24hfloat | None
volume_totalfloat | None
liquidityfloat | NoneResting on the book
open_interestfloat | NoneContracts outstanding
volume_unitcontracts | collateral | NoneKalshi counts contracts, Polymarket dollars
liquidity_unitcontracts | collateral | None
as_ofint | Nonems; when the venue says these were current

OrderBook

Resting orders on one side of a market, best price first on both sides whatever the venue stores.

FieldTypeMeaning
market_idstrSynpath ID
sideyes | noWhich side the prices are in
venuestr
bidslist[OrderLevel]Descending by price
askslist[OrderLevel]Ascending by price
best_bidOrderLevel | NoneComputed: bids[0], or None on an empty side
best_askOrderLevel | NoneComputed: asks[0]
timestampint | Nonems
datetimestr | None
book_modelBookModel
derivedboolTrue when this side was mirrored from the other side's book (Kalshi, Polymarket US)
depth_scopefull | top_n | unknownWhether the levels are the whole book or a requested depth
infodict

OrderLevel

FieldTypeMeaning
pricefloat0 to 1, in the book's side
sizefloatContracts resting

Trade

One public execution, in the YES price.

FieldTypeMeaning
idstr
market_idstrSynpath ID
timestampintms
datetimestr
pricefloatThe YES price: a NO buy at 0.30 is reported at 0.70
amountfloatContracts
sidebuy | sell | unknownWhat the taker did on the YES leg: buy took YES, sell took NO
infodict

Candle

One OHLCV bar, in the YES price, labelled with where its prices came from.

FieldTypeMeaning
timestampintms; start of the bar
datetimestr
open, high, low, closefloat | NoneNone when nothing traded and the venue has no substitute
volumefloat | NoneNone when the venue publishes no volume for the bar, which is not zero
trade_countint | None
price_sourcePriceSourcetrade, bid_ask_mid or sampled_mid; read it before using the bar
bid_close, ask_closefloat | NoneBook state at the close, where the venue reports it
infodict

FeeSchedule

What trading a market costs, before you trade it.

FieldTypeMeaning
venuestr
scopevenue | series | marketWhat the schedule applies to
scope_idstr
fee_typestrquadratic (Kalshi) or quadratic_theta (Polymarket, Polymarket US)
multiplierfloat | NoneKalshi: fee per contract is multiplier × p × (1 − p)
taker_rate, maker_ratefloat | NonePer-trade rates, where the venue publishes them
exponentfloat | NonePolymarket: the power on p × (1 − p); 1 on every live market
roundingstr | None
infodict

FeeSchedule.estimate(price, contracts, taker=True) evaluates the formula, or returns None when it is unknown.

Series

A recurring question above an event (a weekly Fed decision). Kalshi and Polymarket US only.

FieldTypeMeaning
idstrThe venue's series id
venuestr
titlestr | None
categorystr | None
tagslist[str]
feeFeeSchedule | NoneKalshi publishes fees per series
settlement_sourceslist[dict]
infodict

Page

Every listing call returns a Page: a list with a next_cursor attribute. Pass the cursor back to continue; None means the end. Over HTTP a list is enveloped as {"data": [...], "next_cursor": "...", "count": n}.

Trading

Trading types carry money as Decimal. An order names a market and a side on the YES leg; see Orders for what each venue does with that.

OrderRequest

What you send. Validated against the market's tick and minimum size before anything is signed.

FieldTypeMeaning
market_idstrSynpath ID; a bare native id is accepted by the venue's own adapter
sideSidebuy takes YES, sell takes NO
amountDecimalContracts
typeOrderTypelimit (default) or market for a venue; the rest are held by the engine
priceDecimal | NoneThe YES price. Required for a limit; the protection price for a market order
stop_priceDecimal | NoneFor stop orders
time_in_forceTimeInForcegtc (default), ioc, fok, gtd, day
expires_atint | Nonems; required with gtd
post_onlyboolRest or be refused; never take
reduce_onlyboolOnly reduce a position. On Polymarket this is what makes sell sell your YES tokens instead of buying NO
client_order_idstr | NoneYour idempotency key; generated if absent
accountAccount | NoneWhich venue account, where you hold several
bookstr | NoneThe strategy or desk this belongs to; positions and P&L roll up by it
traderstr | None
tagsdict[str, str]Free-form, kept on the order
notesstr | None
paramsdictVenue-specific extras passed through untouched

Order

An order as the venue, or the engine, reports it.

FieldTypeMeaning
idstrThe venue's order id
client_order_idstr | NoneYours
venuestr
accountAccount | None
market_idstrSynpath ID
sideSideOn the YES leg, whatever the venue's own wording
typeOrderType
time_in_forceTimeInForce
statusOrderStatus
held_byvenue | engineWhere the order rests
priceDecimal | NoneThe YES price
stop_priceDecimal | None
amountDecimalContracts asked for
filledDecimalContracts matched so far
remainingDecimal | Noneamount − filled unless the venue says otherwise
average_priceDecimal | NoneOf what filled
costDecimal | NoneCollateral committed so far
fee, fee_currencyDecimal | None, str | NoneCharged so far
last_fill_price, last_fill_amountDecimal | None
post_only, reduce_onlybool
expires_at, created_at, updated_atint | Nonems
parent_idstr | NoneThe engine-held parent this is a child of
queue_priority_preservedbool | NoneAfter an edit: whether the order kept its place in the queue
book, trader, tagsAs on the request
infodictThe request sent and the venue's answer

Fill

One execution of your order, in the YES price.

FieldTypeMeaning
idstr
order_idstr
client_order_idstr | None
venuestr
accountAccount | None
market_idstrSynpath ID
sideSideOn the YES leg
priceDecimalThe YES price
amountDecimalContracts
fee, fee_currencyDecimal | None, str | None
liquiditymaker | taker | unknownWhich side of the match you were
settlementmatched | confirmed | failedPolymarket: a fill matches, then confirms on chain, or fails. Final elsewhere
timestampintms
infodict

Position

One market's position, net on the YES leg, with the token inventories kept beside it where a venue does not net.

FieldTypeMeaning
venuestr
accountAccount | None
market_idstrSynpath ID
sidelong | short | flatlong holds YES, short holds NO
contractsDecimalNet exposure on the side named, positive
inventory_yes, inventory_noDecimal | NoneTokens actually held per side (Polymarket); None elsewhere
entry_priceDecimal | NoneAverage cost, in the YES price
mark_priceDecimal | None
unrealized_pnl, realized_pnlDecimal | None
marginDecimal | NoneCollateral locked, where the venue reports it
resolvedboolThe market has resolved
finalboolAnd is past any dispute window
wonbool | None
payoutDecimal | None
redeemableDecimal | NonePayout waiting to be claimed on chain (Polymarket)
timestampint | Nonems
infodict

Balance

Per venue account, never pooled.

FieldTypeMeaning
venuestr
accountAccount
currencystrUSD, or pUSD on Polymarket
totalDecimal
availableDecimal
lockedDecimal | NoneReserved by open orders, where the venue reports it
buying_powerDecimal | NoneThe venue's own figure, or None. Never zero
timestampint | Nonems
infodict

Settlement

A resolved market paid out on your position.

FieldTypeMeaning
venuestr
accountAccount | None
market_idstrSynpath ID
heldlong | short | NoneWhich side you held into settlement
resultstr | NoneThe venue's result word: yes or no
wonbool | None
amountDecimal | NoneContracts settled
cost, payout, pnlDecimal | None
timestampint | Nonems
infodict

FeeEstimate

What an order would cost, before it is placed.

FieldTypeMeaning
venuestr
market_idstr
sideSide
priceDecimalThe YES price it was estimated at
amountDecimal
taker_feeDecimal | None
maker_feeDecimal | NoneNegative where the venue pays makers
builder_feeDecimal | None
currencystr
infodictThe schedule used

Account

One set of credentials at one venue, optionally one subaccount.

FieldTypeMeaning
venuestr
namestrdefault unless you name it
subaccountstr | NoneKalshi subaccount number, where used

Enumerations

MarketStatus

ValueMeaning
unopenedListed, not yet accepting orders
openTrading; active says whether orders are accepted right now
closedTrading has stopped; not yet paid
settledResolved and paid out

BookModel

ValueMeaning
shared_complementOne book serves both sides (Kalshi, Polymarket US); the NO view is the YES book mirrored
native_per_outcomeEach side owns its own book (Polymarket)

PriceSource

ValueMeaning
tradeBuilt from executions
bid_ask_midNo trades in the period; the midpoint of the venue's bid/ask bars
sampled_midThe venue publishes price samples, not bars, and these were bucketed by Synpath

Side

ValueMeaning
buyTake the YES side
sellTake the NO side

OrderType

ValueMeaning
limitRests at a price. Native on every venue
marketTakes what is resting, up to the protection price. Native where the venue has it, otherwise an immediate-or-cancel limit
stop_market, stop_limit, trailing_stopHeld by the engine; submitted when the trigger is met
iceberg, oco, bracket, twap, peg, smart_taker, rfq_takerHeld by the engine

TimeInForce

ValueMeaning
gtcGood till cancelled
iocImmediate or cancel
fokFill or kill
gtdGood till expires_at
dayRewritten by the engine to gtd at the session end; not a venue concept

OrderStatus

ValueMeaning
pendingAccepted by Synpath, not yet acknowledged by the venue
openResting at the venue; read filled and remaining
pending_cancel, pending_replaceA cancel or edit is in flight
closedFully filled
canceledEnded by a cancel; filled may be non-zero
rejectedRefused by the venue
expiredTime in force ran out
waiting, triggeredAn engine-held parent before and after its condition fired

PositionSide

ValueMeaning
longHolding YES
shortHolding NO
flatNothing

Liquidity

ValueMeaning
makerYour order was resting
takerYour order crossed
unknownThe venue did not say

SettlementState

ValueMeaning
matchedMatched, not yet confirmed on chain (Polymarket)
confirmedFinal
failedMatched and then lost on chain; it never happened

Where to next