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

# List Hyperliquid markets

> GET /v1/markets returns every active Hyperliquid market: native perps, HIP-3 builder markets, HIP-4 outcomes and spot, with the symbols other endpoints accept.



## OpenAPI

````yaml GET /v1/markets
openapi: 3.1.0
info:
  title: Ironflow API
  version: 1.0.0
  description: >
    Hyperliquid market data from Ironflow's own nodes: tick-level fills and

    trades, candles, funding rates, liquidations, mark prices, open interest,

    markets and wallet analytics over REST. One schema across native HL perps,

    HIP-3 builder markets, HIP-4 outcome contracts and HL spot.


    **Base URL:** `https://api.ironflow.sh`


    **Authentication:** Read endpoints work without a key (keyless access) or

    with a Bearer token in the `Authorization` header. Writes always need a key.

    ```

    Authorization: Bearer if_your_api_key

    ```

    Get a free key at https://ironflow.sh/key.


    **Access levels:**


    | Access | Requests per minute | History | Max range per request |

    |---|---|---|---|

    | No key | 10 per IP | 24 hours | 1 hour |

    | Free key | 60 | 30 days | 6 hours |

    | Explorer | 100 | 90 days | 24 hours |

    | Builder | 1,000 | 1 year | 7 days |

    | Enterprise | 10,000 | full | unlimited |


    Without a market filter, high-volume endpoints allow at most 4 hours per
    request.

    A header that is present but malformed returns 401; keyless access applies
    only

    when no `Authorization` header is sent.


    **Data availability:** fills and trades cover a rolling 12 months; other

    datasets start later (funding 2025-09-27, open interest and mark prices

    2026-04-29).


    **Timestamps:** All timestamps are Unix milliseconds (int64).


    **Pagination:** Paginated endpoints return a `cursor` in
    `pagination.next_cursor`.

    Pass it as the `cursor` query parameter to fetch the next page.

    When `pagination.has_more` is `false`, you have reached the last page.
  contact:
    name: Ironflow Support
    url: https://ironflow.sh
servers:
  - url: https://api.ironflow.sh
    description: Production
security:
  - bearerAuth: []
  - {}
tags:
  - name: Market Data
    description: Historical tick-level market data stored in ClickHouse.
  - name: Analytics
    description: Aggregated analytics endpoints (Builder tier and above).
  - name: Cohorts
    description: Predefined and custom address groups for filtering market data.
  - name: Info Proxy
    description: >-
      Cached passthrough to the Hyperliquid Info API. No record caps, higher
      rate limits.
  - name: Export
    description: Bulk data export as CSV or Parquet (Builder tier and above).
  - name: Query
    description: >-
      Read-only ClickHouse SQL over curated Hyperliquid tables (hl.*), limited
      by tier.
  - name: System
    description: Health checks and metadata endpoints.
  - name: TradingApp
    description: >-
      Trading app Phase A — wallet auth (SIWE), agent-key provisioning, and
      kill-switch.
paths:
  /v1/markets:
    get:
      tags:
        - System
      summary: List active markets
      description: |
        Returns every currently-active market in the registry. Reads directly
        from the Postgres markets registry — no ClickHouse round-trip and no
        per-tier query window applies.

        Use this endpoint to discover the symbols you can pass to other
        endpoints, or to scope cross-issuer queries by `base_market` + `issuer`.

        Each row carries:
        - `display_symbol` — what callers should show ("BTC-PERP",
          "flx:GAS-PERP", "HFUN/USDC").
        - `base_market` — the symbol with any HIP-3 issuer prefix stripped
          ("GAS-PERP" for both `BTC-PERP` and `flx:GAS-PERP`); pair with
          `issuer` to query across builders that share a base symbol.
        - `issuer` — empty for native HL markets, the HIP-3 builder code
          ("flx") otherwise.
        - `hl_coin` — the raw venue wire-form ("BTC", "flx:GAS", "@132").
          Useful for debugging or when joining with raw venue feeds.

        Filters:
        - `source` — venue (defaults to `hyperliquid`).
        - `market_class` — `perp`, `spot`, `prediction`, or `option`. Omit
          to return every active market across all classes.
        - `issuer` — restrict to a single HIP-3 builder. Pass an empty value
          (`?issuer=`) to return only native non-builder markets.
      operationId: listMarkets
      parameters:
        - $ref: '#/components/parameters/source'
        - name: market_class
          in: query
          description: Restrict to one class. Omit to return every active market.
          schema:
            type: string
            enum:
              - perp
              - spot
              - prediction
              - option
          example: perp
        - $ref: '#/components/parameters/issuer'
      responses:
        '200':
          description: Active markets matching the filters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketsResponse'
              example:
                count: 3
                data:
                  - market_id: 1
                    source: hyperliquid
                    market_class: perp
                    issuer: ''
                    base_asset: BTC
                    quote_asset: USDC
                    base_market: BTC-PERP
                    display_symbol: BTC-PERP
                    hl_coin: BTC
                    active_from_ms: 1722038400000
                  - market_id: 132
                    source: hyperliquid
                    market_class: perp
                    issuer: flx
                    base_asset: GAS
                    quote_asset: USDC
                    base_market: GAS-PERP
                    display_symbol: flx:GAS-PERP
                    hl_coin: '@132'
                    active_from_ms: 1730000000000
                  - market_id: 5000
                    source: hyperliquid
                    market_class: spot
                    issuer: ''
                    base_asset: HFUN
                    quote_asset: USDC
                    base_market: HFUN/USDC
                    display_symbol: HFUN/USDC
                    hl_coin: HFUN
                    active_from_ms: 1722038400000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '504':
          description: Markets registry lookup timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    source:
      name: source
      in: query
      description: Venue identifier. Defaults to `hyperliquid`.
      schema:
        type: string
        enum:
          - hyperliquid
        default: hyperliquid
      example: hyperliquid
    issuer:
      name: issuer
      in: query
      description: >
        HIP-3 builder/issuer namespace (e.g. `flx`). For native HL perps the
        issuer

        is the empty string; do not combine `issuer=""` with this filter — omit
        the

        parameter instead. Commonly paired with `base_market` to disambiguate a

        builder-deployed market from its native counterpart.
      schema:
        type: string
        example: flx
  schemas:
    MarketsResponse:
      type: object
      required:
        - data
        - count
      properties:
        count:
          type: integer
          description: Number of rows in `data`.
        data:
          type: array
          items:
            $ref: '#/components/schemas/MarketEntry'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: RATE_LIMIT_EXCEEDED
            message:
              type: string
              description: Human-readable error description.
              example: Rate limit exceeded. Retry after 60 seconds.
    MarketEntry:
      type: object
      required:
        - market_id
        - source
        - market_class
        - issuer
        - base_asset
        - quote_asset
        - base_market
        - display_symbol
        - active_from_ms
      properties:
        market_id:
          type: integer
          format: int64
          description: Stable integer ID assigned by the registry. Identity column.
        source:
          type: string
          description: Venue (e.g. `hyperliquid`).
        market_class:
          type: string
          enum:
            - perp
            - spot
            - prediction
            - option
        issuer:
          type: string
          description: HIP-3 builder code, or empty for native non-builder markets.
        base_asset:
          type: string
          description: Underlying asset symbol (e.g. `BTC`, `GAS`, `HFUN`).
        quote_asset:
          type: string
          description: Quote asset symbol (typically `USDC`).
        base_market:
          type: string
          description: |
            Display symbol with any HIP-3 issuer prefix stripped. Equal to
            `display_symbol` for native markets; e.g. `flx:GAS-PERP` →
            `GAS-PERP`. Use with `issuer` to scope cross-builder queries.
        display_symbol:
          type: string
          description: >-
            Symbol shown to end users (e.g. `BTC-PERP`, `flx:GAS-PERP`,
            `HFUN/USDC`).
        hl_coin:
          type: string
          description: >-
            Raw venue wire-form coin string (`BTC`, `flx:GAS`, `@132`).
            Optional.
        active_from_ms:
          type: integer
          format: int64
          description: Activation timestamp as Unix milliseconds.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: BAD_REQUEST
              message: address is required
    Unauthorized:
      description: Missing or invalid API key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
            example: Bearer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Ironflow API key, format `if_xxxx`. Free keys at
        https://ironflow.sh/key. Optional on read endpoints.

````

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