client.markets namespace gives you complete access to Molecule’s market data layer. Use it to discover instruments across Demo, Polymarket, and Kalshi; fetch live order books; pull historical candles and trade prints; and check venue connectivity — all through a single authenticated client.
Searching Markets
Useclient.markets.search() to run a filtered keyword search across venues and categories. The shortcut client.search_markets() calls the same endpoint.
client.markets.list():
client.markets.match():
Search parameters
string
Free-text keyword query. Matches against market title, description, and ticker.
string
Filter by venue name. One of
Demo, Polymarket, or Kalshi.string
Filter by market status — for example
OPEN or CLOSED. Omit to return all statuses.string
Filter by category label such as
Politics or Economics.string
Pagination cursor returned in the previous response. Pass it to fetch the next page.
Getting a Specific Market
Fetch a single instrument by its venue-specific ID, or look up a batch of instruments in one round trip.markets.lookup() issues a POST to /v1/markets/lookup and accepts up to the API’s configured batch limit per request. Use it instead of issuing multiple individual get() calls.Order Book
Molecule exposes two order book endpoints. Usemarkets.book() or markets.orderbook() for a single venue-specific instrument. Use markets.generic_asset_orderbook() to retrieve an aggregated book across all venues for the same underlying asset.
Trade History
Query recent trades and market statistics for any instrument.trades() returns exchange-confirmed fills for a specific instrument. prints() returns the global trade-print stream from /v1/tradeprints — the same feed available over WebSocket at /v1/ws/tradeprints.Price History & Candles
Retrieve OHLCV candles or raw tick prices for charting and model inputs.Candle parameters
integer | string
required
The venue-specific instrument to retrieve candles for.
string
default:"1h"
Candle interval. Common values:
1m, 5m, 15m, 1h, 4h, 1d.integer
default:"500"
Maximum number of candles to return. Default is
500.Price parameters
integer | string
required
The venue-specific instrument to retrieve prices for.
string
default:"ticks"
Price series type. Use
ticks for individual price points.integer
default:"100"
Maximum number of data points to return.
string
default:"1h"
Time bucketing interval for aggregated price series.
Venue Status
Check which venues are live and inspect per-venue health before routing orders.Live venues are Demo, Polymarket, and Kalshi. Any venue not in this set is unreleased — do not send live orders to it.
