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

# List markets



## OpenAPI

````yaml /developer/trading-api/openapi.json get /v1/{chain}/markets
openapi: 3.1.0
info:
  title: Gains Trading API
  version: 1.0.0
  description: >-
    Native REST and WebSocket API for trading on Gains Network.
    Resource-oriented, JSON in and out, decimal strings for every price and
    size, one EIP-712 signing scheme, and an order lifecycle that hides the
    oracle two-step.
servers:
  - url: https://api.gains.trade
security: []
tags:
  - name: Markets
    description: Public market data
  - name: Account
    description: 'Private reads: balances, positions, orders, fills'
  - name: Orders
    description: Place, update and cancel orders
  - name: Positions
    description: Close and manage open positions
  - name: Agents
    description: Non-custodial agent authorisation
  - name: System
    description: Health
paths:
  /v1/{chain}/markets:
    get:
      tags:
        - Markets
      summary: List markets
      operationId: listMarkets
      parameters:
        - schema:
            type: string
            enum:
              - arbitrum
              - base
              - polygon
              - megaeth
              - arbitrum-sepolia
            example: arbitrum
          required: true
          name: chain
          in: path
      responses:
        '200':
          description: All markets on this chain
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Market'
                required:
                  - data
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service not ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Market:
      type: object
      properties:
        symbol:
          type: string
          pattern: ^[A-Z0-9.]{1,15}\/[A-Z0-9]{1,10}$
          example: BTC/USD
          description: Gains market symbol, `<base>/<quote>`.
        pairIndex:
          type: integer
          example: 0
          description: On-chain pair index. Equals the Hyperliquid asset id on the facade.
        base:
          type: string
          example: BTC
        quote:
          type: string
          example: USD
        group:
          type: string
          enum:
            - crypto
            - forex
            - stocks
            - indices
            - commodities
        groupIndex:
          type: integer
        feeIndex:
          type: integer
        isOpen:
          type: boolean
        minLeverage:
          type: string
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          example: '0.5'
          description: Decimal number encoded as a string to preserve precision.
        maxLeverage:
          type: string
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          example: '0.5'
          description: Decimal number encoded as a string to preserve precision.
        minCollateralUsd:
          type: string
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          example: '0.5'
          description: Decimal number encoded as a string to preserve precision.
        minPositionUsd:
          type: string
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          example: '0.5'
          description: Decimal number encoded as a string to preserve precision.
        pricePrecision:
          type: integer
          description: Maximum decimals accepted for prices on this market.
        sizePrecision:
          type: integer
          description: Maximum decimals accepted for sizes on this market.
        spreadRate:
          type: string
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          example: '0.5'
          description: Fixed spread as a fraction of price (0.0004 = 0.04%).
        fees:
          type: object
          properties:
            openFeeRate:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            closeFeeRate:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            minPositionSizeUsd:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
          required:
            - openFeeRate
            - closeFeeRate
            - minPositionSizeUsd
        funding:
          type: object
          properties:
            fundingRateLongHourly:
              type:
                - string
                - 'null'
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Percent per hour paid by longs (negative means received).
            fundingRateShortHourly:
              type:
                - string
                - 'null'
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            borrowingRateHourly:
              type:
                - string
                - 'null'
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            openInterestLongUsd:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            openInterestShortUsd:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
            skewUsd:
              type: string
              pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
              example: '0.5'
              description: Decimal number encoded as a string to preserve precision.
          required:
            - fundingRateLongHourly
            - fundingRateShortHourly
            - borrowingRateHourly
            - openInterestLongUsd
            - openInterestShortUsd
            - skewUsd
        onlyIsolated:
          type: boolean
          enum:
            - true
        collaterals:
          type: array
          items:
            $ref: '#/components/schemas/MarketCollateral'
      required:
        - symbol
        - pairIndex
        - base
        - quote
        - group
        - groupIndex
        - feeIndex
        - isOpen
        - minLeverage
        - maxLeverage
        - minCollateralUsd
        - minPositionUsd
        - pricePrecision
        - sizePrecision
        - spreadRate
        - fees
        - funding
        - onlyIsolated
        - collaterals
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - UNAUTHENTICATED
            - INVALID_SIGNATURE
            - TIMESTAMP_OUT_OF_WINDOW
            - NONCE_REUSED
            - AGENT_UNKNOWN
            - API_KEY_UNKNOWN
            - AGENT_NOT_DELEGATED
            - AGENT_EXPIRED
            - AGENT_REVOKED
            - SCOPE_READ_ONLY
            - SCOPE_MARKET_NOT_ALLOWED
            - SCOPE_LEVERAGE_EXCEEDED
            - SCOPE_SPEND_CAP_EXCEEDED
            - TRADER_MISMATCH
            - CHAIN_NOT_FOUND
            - CHAIN_READ_ONLY
            - MARKET_NOT_FOUND
            - ORDER_NOT_FOUND
            - POSITION_NOT_FOUND
            - AGENT_NOT_FOUND
            - IDEMPOTENCY_CONFLICT
            - ORDER_NOT_MODIFIABLE
            - PRECISION_ERROR
            - LEVERAGE_OUT_OF_RANGE
            - SIZE_BELOW_MINIMUM
            - MARKET_CLOSED
            - COLLATERAL_NOT_SUPPORTED
            - SIMULATION_REVERTED
            - SUBMISSION_MISMATCH
            - UNSUPPORTED
            - RATE_LIMITED
            - INTERNAL
            - UPSTREAM_UNAVAILABLE
            - NOT_READY
        message:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - code
        - message
    MarketCollateral:
      type: object
      properties:
        symbol:
          type: string
          example: USDC
        index:
          type: integer
        address:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          example: '0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523'
        decimals:
          type: integer
      required:
        - symbol
        - index
        - address
        - decimals

````