# Markets

All live PredictAsiaX prediction markets. Data sourced from `GET /v1/markets`. Click a card for the raw API view. Every market has an embeddable widget — see [Embed a market](https://docs.predictasiax.com/markets#embed).

## Create a market

Every market on PredictAsiaX is created directly through `POST /v1/composer/markets` (`POST /v1/composer/proposals` is a back-compat alias — both call the same handler and create the market immediately). Creation is permissioned to any builder at tier `read_live` or above (auto-graduated at **$100** 30-day volume). The `market_creator` fee split (2–3 bps of every fill under the PAF 7-actor model, see [Fee Architecture](https://docs.predictasiax.com/fee-architecture#trading-fee)) accrues to your builder wallet for the life of the market.

### Market types

- **Binary (YES / NO)** — single outcome, 0–1 probability. Most common. Settlement produces exactly one winning side.
- **Over / Under (scalar)** — numeric threshold (e.g. "BTC > $150k by 2026-12-31"). Resolves against a numeric feed.
- **Multi-outcome (categorical)** — N > 2 discrete outcomes, one wins. Create via `POST /v1/composer/markets` (seeded templates at `GET /v1/composer/templates`).

### Templates + settlement rules

PAX seeds a set of typed *market templates* — each declares a resolution rule schema, edge cases, and expected data source. You can optionally create against a template so your resolution rule is pre-validated and translations are pre-cached, or submit a fully-custom market. The template catalog is public + no-auth:

```
GET /v1/composer/templates              # list seeded templates
GET /v1/composer/templates/{tpl_id}     # read a single template + param schema
```

Every template renders its resolution rule and edge-case text in 13 languages (English, 简中, 繁中, 日本語, 한국어, Bahasa, Tiếng Việt, ไทย, हिंदी, Español, Português, Русский, العربية). Rendered previews are what your end-users see — not raw parameter names.

### Submit + track

```
POST /v1/composer/markets
  {
    "title":                 "Will BTC close above $150,000 on 2026-12-31?",
    "rules_text":            "Resolves YES if the CoinGecko BTC/USD 4pm ET close on 2026-12-31 is > 150000.00 (fallback: mean of Coinbase + Kraken 4pm ET)",
    "resolution_rule":       "asset_above_by",
    "primary_source_url":    "https://www.coingecko.com/en/coins/bitcoin",
    "backup_source_urls":    ["https://api.coinbase.com/v2/prices/BTC-USD/spot"],
    "cutoff_time_ms":        1798761600000,
    "resolution_deadline_ms": 1798848000000,
    "edge_cases_text":       "If CoinGecko is unavailable at 4pm ET, use the mean of Coinbase + Kraken 4pm ET.",
    "proposed_template_id":  "tpl_asset_above_by"       // optional
  }
→ { data: { market: { id: "m_...", status: "open", creator_id: "...", created: true } } }   # 201 Created

GET /v1/composer/markets/{market_id}   # read the market + translation progress
```

The market row is created immediately at `status: "open"` — there is no proposal queue and no admin scoping step. (`POST /v1/composer/proposals` is kept as a back-compat alias that maps to the same self-serve create; the `proposal` / `pending_review` concept is retired.) From `open` the lifecycle is `open` → `pending_translation` → `trading` → `resolving` → `settled`; `trading` is when trading opens. `market_creator` attribution is set at creation and immutable. Create is idempotent on an `Idempotency-Key` and on a deterministic `market_id` — repeating a create returns the same market (`created: false`).

### Fee accrual for creators

Every fill in your market writes a `FEE_MARKET_CREATOR` event (3 bps at auto tier / `trade_full`, 2 bps at `genesis`/`partner`) to the platform financial ledger, credited to `creator:<user_id>`. See `GET /v1/revenue` for accrual state (per-role breakdown) and `POST /v1/builders/me/settle` to move settled amount into a USDT withdrawal. Full settlement path in [Fee Architecture / Payout flow](https://docs.predictasiax.com/fee-architecture#payout).

### Oracle / resolver responsibility

Automatic engines resolve against declared data sources (price APIs, sports APIs, official authorities). For markets flagged `admin_reviewed` at creation, or when the automatic resolver returns `indeterminate`, the market routes into the resolver queue — [Oracle Provider](https://docs.predictasiax.com/builders#what-you-build) track builders bond PAX per attestation to submit resolution evidence. Public evidence URLs + challenge-and-defend model; a disputed attestation is settled by slashing the losing side's PAX bond. Every resolution writes an audit event verifiable at [/verify](https://docs.predictasiax.com/verify).

## Embed a market

Every market has a self-contained widget URL that publishers can iframe. It renders title + live prices + a "Trade on PredictAsiaX" CTA. Replace `YOUR_APP_ID` with your app ID to tag the trade link with it (`ref_app`). The link carries your builder id; a visitor who signs up from it has your builder recorded as their acquisition builder (first link within 30 days, set once). From then on every trade those users place, on predictasiax.com or through the API, is attributed to your builder (acquisition points and affiliate reports). Only a live, non-sandbox builder id is recorded.

```
<iframe
  src="https://docs.predictasiax.com/embed?id=m_btc_150k_2026&theme=dark&app_id=YOUR_APP_ID"
  width="360" height="240"
  style="border:0; border-radius:10px"
  loading="lazy"
  title="PredictAsiaX market embed">
</iframe>
```

Query params: `id` (required, market ID). `theme` = `dark` | `light`. `app_id` = your app id for attribution on click-throughs.

## Query the raw endpoint

```
curl "https://api.predictasiax.com/v1/markets?category=crypto&q=btc&limit=20"
```

Response envelope `{ data: { markets: [...], page: { next_cursor } }, meta: {...} }`. See [OpenAPI spec](https://docs.predictasiax.com/openapi) for the full `Market` schema.

Source: https://docs.predictasiax.com/markets
