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

# Get instruments

> Returns **current and historical instruments** from the indexer database (ClickHouse), with the same contract filters as core-chain **GET /instruments**.

### Parameters

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| pageNumber | yes | integer | Page index for instrument listing pagination. |
| pageSize | yes | integer | Number of instruments to return per page. |
| contractType | yes | string | Optional contract type filter (comma-separated). Accepted values (case-insensitive): `option`, `future`, `perp`, `spot`. |
| expiry | yes | string | null | Optional expiry filter. Matches the instrument's formatted expiry (e.g. `28MAR25`). |
| underlyingAsset | yes | string | null | Optional underlying asset ticker filter (e.g. `BTC`). Case-insensitive. |

### Response fields

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| `instruments` | yes | object | — |
| `instruments.*` | yes | object (map) | An instrument identifier (8-byte hash). |
| `instruments.*.expiry` | no | string \| null | — |
| `instruments.*.id` | yes | string | — |
| `instruments.*.instrumentType` | yes | string | — |
| `instruments.*.isTrading` | yes | boolean | — |
| `instruments.*.lastMatchPrice` | yes | string | — |
| `instruments.*.listedAt` | no | integer (int64) | — |
| `instruments.*.maxLeverage` | no | string \| null | — |
| `instruments.*.maxLeverageMargin` | no | string \| null | — |
| `instruments.*.priceScale` | yes | integer (int32) | — |
| `instruments.*.quantityScale` | yes | integer (int32) | — |
| `instruments.*.settlementAsset` | yes | string | — |
| `instruments.*.strike` | no | string \| null | — |
| `instruments.*.ticker` | yes | string | — |
| `instruments.*.underlyingAsset` | yes | string | — |
| `instruments.*.worstCasePriceMovePct` | no | string \| null | — |
| `instruments.*.worstCasePriceMovePctMargin` | no | string \| null | — |

### Response example

A sample **`200`** response body is attached to this operation as an OpenAPI **example** — see the **Example** panel on this page.



## OpenAPI

````yaml /specs/indexer-openapi.json get /instruments
openapi: 3.1.0
info:
  title: Rocket Indexer API Documentation
  description: >-
    Welcome to the RocketChain Indexer API documentation!


    The indexer REST API serves historical and aggregated market data from
    ClickHouse. Endpoints cover candles, trades, order history, portfolio
    curves, funding events, bridge events, vault events, current/historical
    instruments, and live instrument details.
  license:
    name: MIT
    url: https://github.com/rocketfoundation/rocket-sdk-rust/blob/main/LICENSE
  version: '1.0'
  x-logo:
    altText: ROCKET
    backgroundColor: '#00000000'
    url: https://www.rocketfoundation.io/assets/rocket-logo.svg
servers:
  - url: https://beta.rocket-cluster-1.com/indexer
    description: Beta
  - url: https://testnet.rocket-cluster-1.com/indexer
    description: Testnet
  - url: https://devnet.rocket-cluster-1.com/indexer
    description: Devnet
security: []
tags:
  - name: Indexer REST-API
    description: >-
      Read-only REST endpoints backed by the RocketChain indexer. All routes are
      served over HTTP GET.
paths:
  /instruments:
    get:
      tags:
        - Indexer REST-API
      summary: Get instruments
      description: >-
        Returns **current and historical instruments** from the indexer database
        (ClickHouse), with the same contract filters as core-chain **GET
        /instruments**.


        ### Parameters


        | Parameter | Required | Type | Description |

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

        | pageNumber | yes | integer | Page index for instrument listing
        pagination. |

        | pageSize | yes | integer | Number of instruments to return per page. |

        | contractType | yes | string | Optional contract type filter
        (comma-separated). Accepted values (case-insensitive): `option`,
        `future`, `perp`, `spot`. |

        | expiry | yes | string | null | Optional expiry filter. Matches the
        instrument's formatted expiry (e.g. `28MAR25`). |

        | underlyingAsset | yes | string | null | Optional underlying asset
        ticker filter (e.g. `BTC`). Case-insensitive. |


        ### Response fields


        | Parameter | Required | Type | Description |

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

        | `instruments` | yes | object | — |

        | `instruments.*` | yes | object (map) | An instrument identifier
        (8-byte hash). |

        | `instruments.*.expiry` | no | string \| null | — |

        | `instruments.*.id` | yes | string | — |

        | `instruments.*.instrumentType` | yes | string | — |

        | `instruments.*.isTrading` | yes | boolean | — |

        | `instruments.*.lastMatchPrice` | yes | string | — |

        | `instruments.*.listedAt` | no | integer (int64) | — |

        | `instruments.*.maxLeverage` | no | string \| null | — |

        | `instruments.*.maxLeverageMargin` | no | string \| null | — |

        | `instruments.*.priceScale` | yes | integer (int32) | — |

        | `instruments.*.quantityScale` | yes | integer (int32) | — |

        | `instruments.*.settlementAsset` | yes | string | — |

        | `instruments.*.strike` | no | string \| null | — |

        | `instruments.*.ticker` | yes | string | — |

        | `instruments.*.underlyingAsset` | yes | string | — |

        | `instruments.*.worstCasePriceMovePct` | no | string \| null | — |

        | `instruments.*.worstCasePriceMovePctMargin` | no | string \| null | —
        |


        ### Response example


        A sample **`200`** response body is attached to this operation as an
        OpenAPI **example** — see the **Example** panel on this page.
      operationId: getIndexedInstruments
      parameters:
        - name: pageNumber
          in: path
          description: Page index for instrument listing pagination.
          required: true
          schema:
            oneOf:
              - $ref: '#/components/schemas/usize'
            default: 0
          example: 0
        - name: pageSize
          in: path
          description: Number of instruments to return per page.
          required: true
          schema:
            oneOf:
              - $ref: '#/components/schemas/usize'
            default: 2000
          example: 100
        - name: contractType
          in: path
          description: |-
            Optional contract type filter (comma-separated). Accepted values
            (case-insensitive): `option`, `future`, `perp`, `spot`.
          required: true
          schema:
            type: string
          example: perp,option
        - name: expiry
          in: path
          description: >-
            Optional expiry filter. Matches the instrument's formatted expiry
            (e.g. `28MAR25`).
          required: true
          schema:
            type:
              - string
              - 'null'
          example: 28MAR25
        - name: underlyingAsset
          in: path
          description: >-
            Optional underlying asset ticker filter (e.g. `BTC`).
            Case-insensitive.
          required: true
          schema:
            type:
              - string
              - 'null'
          example: BTC
      responses:
        '200':
          description: Instruments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetIndexedInstrumentsResponse'
              example:
                instruments:
                  '0x95988da831a730b5':
                    expiry: null
                    id: '0x95988da831a730b5'
                    instrumentType: PERP
                    isTrading: false
                    lastMatchPrice: '0'
                    listedAt: 1771992000000
                    priceScale: 10
                    quantityScale: 10000
                    settlementAsset: USDC
                    strike: null
                    ticker: PERP_ETH_USDC
                    underlyingAsset: ETH
        '400':
          description: Invalid query parameters
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    usize:
      type: integer
      minimum: 0
    GetIndexedInstrumentsResponse:
      type: object
      required:
        - instruments
      properties:
        instruments:
          $ref: '#/components/schemas/InstrumentsSetView'
          description: >-
            Current and historical instruments from the indexer `instruments`
            table.
      examples:
        - instruments:
            '0x95988da831a730b5':
              expiry: null
              id: '0x95988da831a730b5'
              instrumentType: PERP
              isTrading: false
              lastMatchPrice: '0'
              listedAt: 1771992000000
              priceScale: 10
              quantityScale: 10000
              settlementAsset: USDC
              strike: null
              ticker: PERP_ETH_USDC
              underlyingAsset: ETH
    InstrumentsSetView:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/InstrumentView'
      propertyNames:
        type: string
        format: decimal
        description: An instrument identifier (8-byte hash).
        example: '42'
    InstrumentView:
      type: object
      required:
        - id
        - ticker
        - instrumentType
        - underlyingAsset
        - settlementAsset
        - isTrading
        - priceScale
        - quantityScale
        - lastMatchPrice
      properties:
        expiry:
          type:
            - string
            - 'null'
        id:
          type: string
        instrumentType:
          type: string
        isTrading:
          type: boolean
        lastMatchPrice:
          type: string
        listedAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/u64'
        maxLeverage:
          type:
            - string
            - 'null'
        maxLeverageMargin:
          type:
            - string
            - 'null'
        priceScale:
          type: integer
          format: int32
        quantityScale:
          type: integer
          format: int32
        settlementAsset:
          type: string
        strike:
          type:
            - string
            - 'null'
        ticker:
          type: string
        underlyingAsset:
          type: string
        worstCasePriceMovePct:
          type:
            - string
            - 'null'
        worstCasePriceMovePctMargin:
          type:
            - string
            - 'null'
    u64:
      type: integer
      format: int64
      minimum: 0

````