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

# Get Order Book Markets

> List the Polymarket crypto markets and outcome tokens covered by the Order Book API.

Use this endpoint to discover the markets and outcome tokens covered by the Order Book API. It returns Polymarket markets tagged as Crypto (Gamma `tag_id=21`). Each market includes its `conditionId` and the `tokenId` for every outcome. Results are ordered by `marketId` in ascending order.

Take a `tokenId` from here and pass it to [Get Order Book Events](/api-reference/market/orderbook-events) to fetch the `book` snapshots and `price_change` deltas for that outcome.

<Note>
  `status` is Orbscan's availability status. `active` means Orbscan tracks the market as active. Otherwise, the value is `closed`. This differs from Gamma's `closed` field.
</Note>

<Tip>
  Results are cursor-paginated. When the response includes a `nextCursor`, pass it back as the `cursor` query parameter. Reuse the cursor with the same filters.
</Tip>


## OpenAPI

````yaml openapi.json GET /v1/orderbook/markets
openapi: 3.1.0
info:
  title: Orbscan Open API
  description: >-
    REST endpoints for Polymarket wallet activity, positions, transfers,
    transaction details, and L2 order book data.
  version: 1.0.0
servers:
  - url: https://api.orbscan.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/orderbook/markets:
    get:
      summary: List order book markets
      description: >-
        Returns Polymarket markets tagged as Crypto (Gamma `tag_id=21`) and
        their outcome tokens. Results are ordered by `marketId` in ascending
        order. Pass a returned `tokenId` to the order book events endpoint to
        reconstruct that token's book.
      operationId: getOrderBookMarkets
      parameters:
        - name: marketId
          in: query
          required: false
          description: Exact Gamma market ID.
          schema:
            type: string
            example: '12345'
        - name: conditionId
          in: query
          required: false
          description: >-
            Exact condition ID. It must start with `0x` followed by 64
            hexadecimal characters. Input is case-insensitive and normalized to
            lowercase.
          schema:
            type: string
            example: '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'
        - name: tokenId
          in: query
          required: false
          description: Return the market that contains this outcome token.
          schema:
            type: string
            example: '123456789'
        - name: status
          in: query
          required: false
          description: >-
            Orbscan availability status. `active` means Orbscan tracks the
            market as active. `closed` means it does not. This differs from the
            Gamma `closed` field. Input is case-insensitive.
          schema:
            type: string
            enum:
              - active
              - closed
            example: active
        - name: limit
          in: query
          required: false
          description: Page size. Defaults to 100. Values outside 1 to 1,000 return `400`.
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 1000
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor from the previous response's `nextCursor`. Reuse it
            with the same filters.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: OK
                  status_code:
                    type: string
                    example: '1'
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderBookMarket'
                      nextCursor:
                        type: string
                        nullable: true
              example:
                message: OK
                status_code: '1'
                data:
                  items:
                    - marketId: '248851'
                      conditionId: >-
                        0x3784ea734e3886a167bf3d8de6b79290e2dcf57e71812f9db5cfe165936d3215
                      question: >-
                        Will the FDV of OpenSea's token be above $5b 1 week
                        after launch?
                      slug: >-
                        will-the-fdv-of-openseas-token-be-above-5b-1-week-after-launch
                      status: closed
                      openAt: 1677095132413
                      closeAt: 1703894400000
                      outcomes:
                        - name: 'Yes'
                          tokenId: >-
                            100299615833860717861695156210002025817496421474264537699755386813000932190489
                        - name: 'No'
                          tokenId: >-
                            9444964418353784846201878646812530954474648898197532093004406084519216761243
                  nextCursor: AAAAAAADzBQ
        '400':
          description: An ID, `status`, or `limit` value is invalid.
          content:
            application/json:
              example:
                message: limit must be between 1 and 1000
                status_code: '0'
                data: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    OrderBookMarket:
      type: object
      properties:
        marketId:
          type: string
          description: >-
            Gamma market ID as a decimal string (up to 19 digits, signed 64-bit
            range).
          example: '12345'
        conditionId:
          type: string
          description: Condition ID, `0x` + 64 hex (lowercase).
        question:
          type: string
          description: Market question.
        slug:
          type: string
          description: Market slug.
        status:
          type: string
          description: >-
            Orbscan availability status. `active` means Orbscan tracks the
            market as active. Otherwise, the value is `closed`. This differs
            from the Gamma `closed` field.
          enum:
            - active
            - closed
        openAt:
          type: integer
          format: int64
          description: Market open time, Unix milliseconds.
        closeAt:
          type: integer
          format: int64
          description: Market close time, Unix milliseconds.
        outcomes:
          type: array
          description: Outcome tokens for the market.
          items:
            $ref: '#/components/schemas/OrderBookOutcome'
    OrderBookOutcome:
      type: object
      properties:
        name:
          type: string
          description: Outcome label.
          example: 'Yes'
        tokenId:
          type: string
          description: >-
            Outcome token ID, a positive uint256 as a decimal string (up to 78
            digits).
          example: '123456789'
  responses:
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Missing or invalid API key
              status_code:
                type: string
                example: '0'
              data:
                type: 'null'
          example:
            message: Missing or invalid API key
            status_code: '0'
            data: null
    Forbidden:
      description: The API key is valid but not allowed to use this resource.
    TooManyRequests:
      description: The rate limit for your credential was exceeded.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Rate limit exceeded
              status_code:
                type: string
                example: '0'
              data:
                type: 'null'
          example:
            message: Rate limit exceeded
            status_code: '0'
            data: null
    ServerError:
      description: Unexpected server failure.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Paste your Orbscan API key here. The `Bearer` prefix is added
        automatically.

````