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

# Get all available markets

> Returns a list of all trading markets (perp + spot) with their configuration
details including leverage limits, tick sizes, decimal precision, and
current market mode (Open, ReduceOnly, CloseOnly). Each row carries an
`asset_type` discriminator (`"perp"` or `"spot"`).



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/markets
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/markets:
    get:
      tags:
        - Market Data
      summary: Get all available markets
      description: >-
        Returns a list of all trading markets (perp + spot) with their
        configuration

        details including leverage limits, tick sizes, decimal precision, and

        current market mode (Open, ReduceOnly, CloseOnly). Each row carries an

        `asset_type` discriminator (`"perp"` or `"spot"`).
      operationId: handle_markets
      responses:
        '200':
          description: List of available markets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MarketDto'
        '500':
          description: Database error
components:
  schemas:
    MarketDto:
      type: object
      required:
        - asset_type
        - market_addr
        - market_name
        - sz_decimals
        - max_leverage
        - tick_size
        - min_size
        - lot_size
        - max_open_interest
        - px_decimals
        - mode
        - unrealized_pnl_haircut_bps
        - category
        - min_price
        - max_price
        - is_isolated_only
      properties:
        asset_type:
          $ref: '#/components/schemas/AssetType'
          description: >-
            `"perp"` or `"spot"` — discriminator so callers can mix perp and
            spot

            markets in the same `/markets` response without ambiguity.
        category:
          type: string
          description: Perp market category. Empty string for spot markets.
        is_isolated_only:
          type: boolean
          description: Perp-only; always false for spot.
        lot_size:
          type: integer
          format: int64
          minimum: 0
        market_addr:
          type: string
        market_name:
          type: string
        max_leverage:
          type: integer
          format: int32
          description: Perp-only max leverage. Always 0 for spot markets.
          minimum: 0
        max_open_interest:
          type: number
          format: double
          description: Perp-only max open interest. Always 0 for spot markets.
        max_price:
          type: integer
          format: int64
          minimum: 0
        min_price:
          type: integer
          format: int64
          minimum: 0
        min_size:
          type: integer
          format: int64
          minimum: 0
        mode:
          type: string
          description: Perp market mode. Spot markets currently return `"Open"`.
        px_decimals:
          type: integer
          format: int32
          description: Price decimals. For spot rows this is the quote asset decimals.
          minimum: 0
        sz_decimals:
          type: integer
          format: int32
          description: Size decimals. For spot rows this is the base asset decimals.
          minimum: 0
        tick_size:
          type: integer
          format: int64
          minimum: 0
        unrealized_pnl_haircut_bps:
          type: integer
          format: int32
          description: >-
            Haircut for unrealized PnL when calculating withdrawable balance (in
            basis points, e.g., 1000 = 10%).

            Always 0 for spot markets (which don't carry unrealized PnL).
          minimum: 0
    AssetType:
      type: string
      description: >-
        Discriminator carried on DTOs that can mix perp and spot rows (markets,

        orders, trades, bulk orders, bulk order fills, and WebSocket payloads).

        Also accepted as a query parameter on REST endpoints that can filter to
        one

        product.


        Wire format is lowercase (`"perp"` / `"spot"`) and accepted

        case-insensitively on the request side via
        [`impl_case_insensitive_deserialize`].
      enum:
        - perp
        - spot
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````