Skip to main content
To create a market, call one of the four creation functions on the MarketFactory contract. Each function corresponds to a market type; you pass a single CreateMarketParams struct. On success, the function returns the new market contract address (you can also read it from the NewMarket event).

Which function to use


Parameters: CreateMarketParams

All four functions take one argument: a struct with the following fields. Optional/conditional fields are noted. Getting the new market address: the contract returns it; you can also parse the NewMarket event from the transaction logs. Struct shape (for ABI / viem):

The @seer-pm/sdk provides getCreateMarketParams, getCreateMarketExecution, and MarketTypes. Use your viem clients to send the transaction. See Viem setup for installation.

SDK: create categorical market

Only required: marketType, marketName, outcomes, openingTime, minBond, chainId. Other fields have defaults (e.g. tokenNames are derived from outcomes, category defaults to "misc").

SDK: create multi categorical market

SDK: create scalar market

For scalar, lowerBound, upperBound and unit are also required. Bounds are in wei (1e18); use viem’s parseEther (e.g. 0 and 50 for a 0–50 °C range):

SDK: create multi scalar market

For multi scalar, the name must include the [outcomeType] placeholder (e.g. [City]) so the SDK can build questionStart / questionEnd / outcomeType via getQuestionParts. unit is required for the question suffix.
You can use getCreateMarketParams(props) if you only need the params struct (with all fields filled) for a custom flow.