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

# Get latest price

> Latest price snapshot for a market.

<Warning>
  **Alpha** — The Market Data API is in alpha. Schema and response format may change. To request access, [contact us](https://www.allium.so/contact) or reach out to your account manager.
</Warning>

Returns the latest price snapshot for a market. The `{instrument}` path segment is `perps` or `spot` (and must be consistent with the `market_id`). The fields returned depend on the instrument class:

* **`perps`** — `mark`, `index` (oracle/index price the perp tracks), and `mid`.
* **`spot`** — `mid`.

Snapshots are cached for \~60 seconds.

## Coming soon

The following price fields are not yet returned and will be added for both perp and spot markets. To request prioritization, reach out to your account manager.

* `last` — last traded price
* `best_bid` — top-of-book best bid
* `best_ask` — top-of-book best ask


## OpenAPI

````yaml _openapi/market-data-api.json GET /api/v1/markets/{market_id}/{instrument}/price
openapi: 3.1.0
info:
  title: Allium Market Data API
  version: 0.1.0
  description: >-
    Unified market data — reference, pricing, and perps primitives across
    trading venues. Alpha; schema may change.
servers:
  - url: https://api.allium.so
security:
  - APIKeyBearer: []
paths:
  /api/v1/markets/{market_id}/{instrument}/price:
    get:
      summary: Get latest price
      description: >-
        Latest price snapshot. Fields returned depend on instrument class: perps
        returns mark/index/mid; spot returns mid.
      parameters:
        - $ref: '#/components/parameters/MarketIdPath'
        - $ref: '#/components/parameters/InstrumentPath'
      responses:
        '200':
          description: Latest price snapshot.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - $ref: '#/components/schemas/PerpPrice'
                      - $ref: '#/components/schemas/SpotPrice'
                required:
                  - data
components:
  parameters:
    MarketIdPath:
      name: market_id
      in: path
      required: true
      description: Canonical market slug, {venue}:{instrument_type}:{pair}.
      schema:
        type: string
      example: hl:perp:BTC-USDC
    InstrumentPath:
      name: instrument
      in: path
      required: true
      description: >-
        Instrument class: `perps` or `spot`. Must be consistent with the
        market_id.
      schema:
        type: string
        enum:
          - perps
          - spot
      example: perps
  schemas:
    PerpPrice:
      type: object
      properties:
        market_id:
          type: string
          examples:
            - hl:perp:BTC-USDC
        as_of:
          type: string
          description: ISO 8601 timestamp (UTC) of the snapshot.
          examples:
            - '2026-05-06T14:32:01.000000+00:00'
        mark:
          type: string
          description: Mark price.
          examples:
            - '104830.10'
        index:
          type: string
          description: Oracle/index price.
          examples:
            - '104825.40'
        mid:
          type: string
          description: Mid price.
          examples:
            - '104831.20'
      required:
        - market_id
        - as_of
        - mark
        - index
        - mid
    SpotPrice:
      type: object
      properties:
        market_id:
          type: string
          examples:
            - hl:spot:HYPE-USDC
        as_of:
          type: string
          description: ISO 8601 timestamp (UTC) of the snapshot.
          examples:
            - '2026-05-06T14:32:01.000000+00:00'
        mid:
          type: string
          description: Mid price.
          examples:
            - '38.41'
      required:
        - market_id
        - as_of
        - mid
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````