> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiz.digital/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a market

> Deploy a market and optionally publish metadata and seed in the same flow.

`createMarket` deploys the market. Pass a `metadata` bag with copy or images and the client uploads files, then sets `metadataURI`. Empty metadata is skipped. Pass `seedWei` and `oddsBps` to call create-and-seed on the factory (approve the **factory**). Omit `seedWei` for create-only.

You need a client that can send (`walletClient` or `sendCalls`) and a wallet with gas. Admin markets need `marketAdmin`. Committee markets need `voters` and `threshold`. `image` / `outcomeImages` can be a `File`, a `Blob`, or a public URL.

```ts theme={null}
const { marketAddress, metadataUri } = await client.createMarket({
  marketName: 'Will ETH be above 5k?',
  outcomes: ['Yes', 'No'],
  resolverKind: 'admin',
  marketAdmin: yourAddress,
  seedWei,           // omit for create-only
  oddsBps,           // required with seedWei
  metadata: {
    description: '…',
    resolutionCriteria: 'Coinbase ETH-USD at 23:59 UTC.',
    image: marketImageFile,
    outcomeImages: [yesFile, noFile],
  },
})

if (!marketAddress) {
  throw new Error('Created, but the receipt did not include the new address')
}

const market = client.market(marketAddress)
```

```ts theme={null}
Promise<{
  result: unknown
  hashes: Hash[]
  marketAddress?: Address
  metadataUri?: string
}>
```

If metadata is present but the new address cannot be parsed from the receipt, it throws instead of leaving a silent unpublished market. Skip `metadata` if you have nothing to publish. After the market is live, treat the document as frozen in the product UI. `market.setMetadata` still exists for a retry if the upload failed after create.

This is the one write that must live on the client — there is no market yet.

## Next

[List markets](/market/list)
