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

# Market Details

> Understand the structure, status, outcome tokens, and trading limits of a Prediction Market.

Public Market lookups by ID and slug return the same MarketDetail model, including a multilingual `question` and Outcomes, Unix-second Market times, and trading parameters. Neither endpoint requires authentication.

Production Base URL:

```text theme={null}
https://api.dexbuilder.com
```

## Query a Market

By Market ID:

```bash cURL theme={null}
curl "https://api.dexbuilder.com/api/v4/prediction/markets/<market_id>"
```

By slug:

```bash cURL theme={null}
curl "https://api.dexbuilder.com/api/v4/prediction/markets/slug/<market_slug>"
```

## Market detail response

ID and slug lookups both return MarketDetail. This example shows common fields; use `outcomes[].token_id` for Token price and order-book requests.

```json Example theme={null}
{
  "market_id": "ge_42_7",
  "event_id": "ge_42",
  "slug": "example-market",
  "question": { "en": "Will the outcome occur?" },
  "condition_id": "ge_condition",
  "status": "active",
  "closed": false,
  "accepting_orders": true,
  "enable_order_book": true,
  "start_date": 1782666000,
  "end_date": 1782752400,
  "outcomes": [
    { "outcome": { "en": "Yes" }, "token_id": "ge_yes" },
    { "outcome": { "en": "No" }, "token_id": "ge_no" }
  ]
}
```

| Field | Description |
| - | - |
| `market_id`, `event_id` | Market and parent Event IDs; pass them unchanged |
| `question` | Multilingual Market question object |
| `condition_id` | Condition ID |
| `outcomes` | Each item has a multilingual `outcome` and a `token_id` |
| `status`, `closed` | Market state |
| `accepting_orders`, `enable_order_book` | Trading and order-book status; may be `null` |
| `min_order_size`, `tick_size`, `neg_risk` | Trading parameters; may be `null` |
| `best_bid`, `best_ask`, `last_trade_price` | Order-book and latest-trade summary |
| `start_date`, `end_date` | Unix-second timestamps; `null` when unavailable |

See [Get Market](https://dexbuilder.mintlify.site/en/event-markets/rest/query-market.md) for ID lookups and [Get Market by Slug](https://dexbuilder.mintlify.site/en/event-markets/rest/query-market-by-slug.md) for slug lookups.

## Using Outcome Tokens

After obtaining a Token ID from `outcomes[].token_id`, you can call the price, Ticker, and order-book endpoints:

```bash cURL theme={null}
TOKEN_ID="<token_id>"

curl "https://api.dexbuilder.com/api/v4/prediction/tokens/$TOKEN_ID/order_book?depth=20"
curl "https://api.dexbuilder.com/api/v4/prediction/tokens/$TOKEN_ID/price"
curl "https://api.dexbuilder.com/api/v4/prediction/tokens/$TOKEN_ID/ticker"
```

The API returns Token IDs directly in the `outcomes` array, so no additional parsing of JSON-string Token lists is required.

## Query the Parent Event

Use the returned `event_id` to query the parent Event:

```bash cURL theme={null}
curl "https://api.dexbuilder.com/api/v4/prediction/events/<event_id>"
```

Public Market data does not require authentication. Private order, position, and account endpoints do require authentication.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.