---
title: "Create Order (Hosted)"
method: POST
path: "/v0/trade/create-order"
tags: ["Trading (Hosted)"]
---

# Create Order (Hosted)

`POST /v0/trade/create-order`

Place a limit or market order on Polymarket or Opinion in one call. The SDK builds the EIP-712 order payload, signs it locally with your `private_key`, and submits it against your [PreFundedEscrow](/guides/escrow-lifecycle) balance. Returns the resulting `Order` — id, fill status, average fill price, fees, and the on-chain settlement tx hash once it lands.

Identify the target outcome by EITHER (a) catalog `outcome_id` UUID (canonical, cross-venue) OR (b) `venue` + `venue_outcome_id` (the venue-native id returned by `client.fetch_markets()` on a venue client such as `pmxt.Polymarket`). The natural workflow — `market = client.fetch_markets(...)[0]; client.create_order(outcome=market.yes, ...)` — works without any catalog UUID lookup.

Use `buildOrderHosted` + `submitOrderHosted` separately only when you need to inspect or display the order payload before signing (e.g. a custodial flow where a human approves each trade).

## Request body

- BuildOrderHostedRequest — Hosted build-order request. The caller must identify the target outcome in one of two ways: either (a) pass a catalog `outcome_id` UUID, or (b) pass `venue` plus `venue_outcome_id` (the venue-native identifier returned by `client.fetch_markets()` on a venue client such as `pmxt.Polymarket` or `pmxt.Opinion`). `market_id` is optional in both cases -- the backend derives it from the supplied identifier when omitted.
  - `market_id` string, uuid — Catalog market UUID. Optional -- derived from `outcome_id` or `(venue, venue_outcome_id)` when omitted.
  - `outcome_id` string, uuid — Catalog outcome UUID. Provide this OR `(venue, venue_outcome_id)`.
  - `venue` 'polymarket' | 'opinion' — Venue name. Required when identifying the outcome via `venue_outcome_id` instead of the catalog `outcome_id` UUID.
  - `venue_outcome_id` string — Venue-native outcome identifier (e.g. Polymarket `tokenId`, Opinion outcome hash). Required when `venue` is supplied instead of `outcome_id`.
  - `side` 'buy' | 'sell', required
  - `order_type` 'market' | 'limit'
  - `amount` number, required — Order size. For `market` buys, in USDC; for `market` sells / `limit`, in shares.
  - `denom` 'shares' | 'usdc'
  - `price` number, nullable — Required for `limit` orders. Probability in [0, 1].
  - `slippage_pct` number, nullable
  - `user_address` string, required — EVM wallet address that will sign the resulting typed data.

## Response `200`

Order accepted by the hosted backend.

- OrderV0 — Hosted-mode `Order` shape. Mirrors `pmxt.Order` so the SDK can return it directly. `tx_hash`, `chain`, and `block_number` populate once execution settles on-chain.
  - `id` string, required
  - `market_id` string, uuid, nullable
  - `outcome_id` string, uuid, nullable
  - `side` 'buy' | 'sell', nullable
  - `type` 'market' | 'limit', nullable
  - `amount` number, nullable
  - `price` number, nullable
  - `filled` number
  - `remaining` number
  - `status` string, required
  - `fee` number, nullable
  - `timestamp` string, nullable
  - `tx_hash` string, nullable — On-chain transaction hash. Null until settled.
  - `chain` string, nullable
  - `block_number` integer, nullable

## Other responses

- `401` — Invalid or missing PMXT API key.
- `403` — Insufficient escrow balance.
- `404` — Outcome not found.
- `422` — Invalid order parameters.
- `503` — Catalog unavailable.

---

[API](https://skmtc.dev/pmxt-dev/apis/pmxt-hosted-router-api.md) · [All operations](https://skmtc.dev/pmxt-dev/apis/pmxt-hosted-router-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pmxt-dev/pmxt-hosted-router-api/revisions/ea5fcf3a6481/schema)
