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

# Market Queries

> Query market data, outcomes, and order books

## Market Aggregation

Retrieve detailed market information including outcomes and current orders.

### Example Query

```graphql theme={"dark"}
query MarketDetails($marketId: ID!) {
  market(id: $marketId) {
    id
    description
    type
    strike
    volume
    outcomes {
      id
      probability
      orders {
        price
        qty
      }
    }
  }
}
```

### Variables

```json theme={"dark"}
{
  "marketId": "123e4567-e89b-12d3-a456-426614174001"
}
```

### Example Response

```json theme={"dark"}
{
  "data": {
    "market": {
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "description": "KC v BUF Total",
      "type": "TOTAL",
      "strike": 26.5,
      "volume": 1000000,
      "outcomes": [
        {
          "id": "outcome-1",
          "probability": 0.5,
          "orders": [
            {
              "price": 0.667,
              "qty": 110
            }
          ]
        }
      ]
    }
  }
}
```

## Field Reference

### Market Fields

| Field | Type | Description |
| - | - | - |
| `id` | ID | Unique market identifier |
| `description` | String | Human-readable market description |
| `type` | String | Market type (MONEY, SPREAD, TOTAL, etc.) |
| `strike` | Float | Threshold value for the market |
| `volume` | Int | Total trading volume |
| `outcomes` | \[Outcome] | Array of outcomes for this market |

### Outcome Fields

| Field | Type | Description |
| - | - | - |
| `id` | ID | Unique outcome identifier |
| `probability` | Float | Current probability (0-1) |
| `orders` | \[Order] | Current orders on this outcome |

### Order Fields

| Field | Type | Description |
| - | - | - |
| `price` | Float | Order price in decimal probability |
| `qty` | Int | Order quantity in minimum currency units |


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