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

# Get Market

> Get a single market by ID with full details from Polymarket.

Get a single market by ID with full details from Polymarket.

## Overview

Retrieve the complete market object for a given Polymarket market ID. The response includes pricing, volume, outcomes, event metadata, and order book configuration. Use this before placing trades or building market detail views.

## Example

<Tabs>
  <Tab title="curl">
    ```bash theme={null}
    curl -X GET "https://www.aionmarket.com/bvapi/markets/512357" \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    from aion_sdk import AionMarketClient

    client = AionMarketClient(api_key="YOUR_API_KEY", base_url="https://www.aionmarket.com/bvapi")
    market = client.get_market("512357")
    print(market)
    ```
  </Tab>
</Tabs>

## Response

```json theme={null}
{
  "id": "512357",
  "question": "Will BTC exceed $100k by end of June?",
  "conditionId": "0xabc123...",
  "slug": "will-btc-exceed-100k-by-end-of-june",
  "description": "This market resolves to Yes if...",
  "outcomes": "[\"Yes\",\"No\"]",
  "outcomePrices": "[\"0.65\",\"0.35\"]",
  "volume": "125000.50",
  "liquidity": "45000.00",
  "active": true,
  "closed": false,
  "category": "Crypto",
  "endDate": "2026-06-30T23:59:59Z",
  "startDate": "2026-01-01T00:00:00Z",
  "image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/...",
  "clobTokenIds": "[\"12345\",\"67890\"]",
  "volumeNum": 125000.50,
  "liquidityNum": 45000.00,
  "bestBid": 0.64,
  "bestAsk": 0.66,
  "lastTradePrice": 0.65,
  "spread": 0.02,
  "oneDayPriceChange": -0.03,
  "oneWeekPriceChange": 0.05,
  "enableOrderBook": true,
  "acceptingOrders": true,
  "events": [],
  "tags": []
}
```

## Response Fields

| Field               | Type           | Description                          |
| ------------------- | -------------- | ------------------------------------ |
| `id`                | string         | Polymarket market ID                 |
| `question`          | string \| null | Market question                      |
| `conditionId`       | string         | Condition token ID                   |
| `slug`              | string \| null | URL slug                             |
| `description`       | string \| null | Market description                   |
| `outcomes`          | string         | JSON-encoded array of outcome labels |
| `outcomePrices`     | string         | JSON-encoded array of outcome prices |
| `volume`            | string \| null | Total volume traded                  |
| `liquidity`         | string \| null | Current liquidity                    |
| `active`            | boolean        | Whether the market is active         |
| `closed`            | boolean        | Whether the market is closed         |
| `category`          | string \| null | Market category                      |
| `endDate`           | string \| null | Market end date                      |
| `startDate`         | string \| null | Market start date                    |
| `image`             | string \| null | Market image URL                     |
| `clobTokenIds`      | string         | JSON-encoded array of CLOB token IDs |
| `volumeNum`         | number         | Total volume (numeric)               |
| `liquidityNum`      | number         | Current liquidity (numeric)          |
| `bestBid`           | number \| null | Best bid price                       |
| `bestAsk`           | number \| null | Best ask price                       |
| `lastTradePrice`    | number \| null | Last trade price                     |
| `spread`            | number \| null | Current spread                       |
| `oneDayPriceChange` | number \| null | 24-hour price change                 |
| `enableOrderBook`   | boolean        | Whether order book is enabled        |
| `acceptingOrders`   | boolean        | Whether the market accepts orders    |
| `events`            | array          | Associated events                    |
| `tags`              | array          | Market tags                          |

## Common Errors

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `401` | Missing or invalid API key     |
| `404` | Market not found on Polymarket |
| `500` | Server-side error              |

## Use Cases

* Display market detail pages with pricing data.
* Pre-trade validation to confirm market status before execution.
* Build dashboards showing real-time market information.


## OpenAPI

````yaml GET /markets/{market_id}
openapi: 3.1.0
info:
  title: Aion AI Agent API
  description: >-
    API for agent registration, wallet onboarding, market discovery, order
    management, and execution on Aion.
  version: 1.0.0
  contact:
    name: Aion Support
    email: info@aionmarket.com
    url: https://docs.aionmarket.com
servers:
  - url: https://www.aionmarket.com/bvapi
    description: Aion API
security:
  - bearerAuth: []
tags:
  - name: Agent Management
  - name: Market Operations
  - name: Order Management
  - name: Trading
  - name: Kalshi
  - name: Skills
  - name: Wallet Management
  - name: Trades & Leaderboard
  - name: Utilities
  - name: Settings
  - name: Positions & Portfolio
  - name: Fee Charging
paths:
  /markets/{market_id}:
    get:
      tags:
        - Market Operations
      summary: Get Market
      description: Get a single market by ID with full details from Polymarket.
      operationId: getMarket
      parameters:
        - name: market_id
          in: path
          required: true
          description: Polymarket market ID
          schema:
            type: string
        - name: venue
          in: query
          required: false
          description: 'Trading venue (default: polymarket)'
          schema:
            type: string
            default: polymarket
            maxLength: 50
        - name: includeTag
          in: query
          required: false
          description: Include market tag data
          schema:
            type: boolean
      responses:
        '200':
          description: Market details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketDetail'
        '404':
          description: Market not found
components:
  schemas:
    MarketDetail:
      type: object
      properties:
        id:
          type: string
          description: Polymarket market ID
        question:
          type: string
          nullable: true
          description: Market question
        conditionId:
          type: string
          description: Condition token ID
        slug:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        outcomes:
          type: string
          description: JSON-encoded array of outcome labels
        outcomePrices:
          type: string
          description: JSON-encoded array of outcome prices
        volume:
          type: string
          nullable: true
        liquidity:
          type: string
          nullable: true
        active:
          type: boolean
        closed:
          type: boolean
        category:
          type: string
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        startDate:
          type: string
          format: date-time
          nullable: true
        image:
          type: string
          nullable: true
        clobTokenIds:
          type: string
          description: JSON-encoded array of CLOB token IDs
        volumeNum:
          type: number
        liquidityNum:
          type: number
        bestBid:
          type: number
          nullable: true
        bestAsk:
          type: number
          nullable: true
        lastTradePrice:
          type: number
          nullable: true
        spread:
          type: number
          nullable: true
        oneDayPriceChange:
          type: number
          nullable: true
        oneWeekPriceChange:
          type: number
          nullable: true
        enableOrderBook:
          type: boolean
        acceptingOrders:
          type: boolean
        events:
          type: array
          items:
            type: object
        tags:
          type: array
          items:
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: YOUR_API_KEY

````