> ## 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 market prices

> Retrieve current prices for one or all markets, including oracle price, mark price,
funding rate, and open interest. Use `market=all` or omit the parameter to fetch all markets.

NOTE: The funding_rate_bps returned here is the raw (unsmoothed) value from the blockchain.
WebSocket clients receive EMA-smoothed funding rates to reduce high-frequency oscillations.
For most use cases, prefer WebSocket for real-time funding rate display.

TODO(DCBL-2017): To add HTTP EMA smoothing, query recent prices from the `prices` table
(which already stores `transaction_unix_ms`) and feed them through `FundingRateEma::update_and_get`
in chronological order. The EMA infra in `funding_rate_ema.rs` is reusable as-is.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/prices
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: 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: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
paths:
  /api/v1/prices:
    get:
      tags:
        - Market Data
      summary: Get market prices
      description: >-
        Retrieve current prices for one or all markets, including oracle price,
        mark price,

        funding rate, and open interest. Use `market=all` or omit the parameter
        to fetch all markets.


        NOTE: The funding_rate_bps returned here is the raw (unsmoothed) value
        from the blockchain.

        WebSocket clients receive EMA-smoothed funding rates to reduce
        high-frequency oscillations.

        For most use cases, prefer WebSocket for real-time funding rate display.


        TODO(DCBL-2017): To add HTTP EMA smoothing, query recent prices from the
        `prices` table

        (which already stores `transaction_unix_ms`) and feed them through
        `FundingRateEma::update_and_get`

        in chronological order. The EMA infra in `funding_rate_ema.rs` is
        reusable as-is.
      operationId: handle_prices
      parameters:
        - name: market
          in: query
          description: Market address filter (use "all" or omit for all markets)
          required: false
          schema:
            type: string
          example: 0xmarket123...
      responses:
        '200':
          description: Market prices retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PriceDto'
        '404':
          description: Market not found
        '500':
          description: Database error
components:
  schemas:
    PriceDto:
      type: object
      required:
        - market
        - oracle_px
        - mark_px
        - mid_px
        - funding_rate_bps
        - is_funding_positive
        - transaction_unix_ms
        - open_interest
      properties:
        funding_rate_bps:
          type: number
          format: double
          description: >-
            Funding rate in basis points (1 bps = 0.01%).

            On-chain value uses RATE_SIZE_MULTIPLIER (1,000,000); divided by
            100.0

            to convert to basis points while preserving sub-bps precision.

            For WebSocket responses, this value is smoothed using EMA to reduce
            noise.
        is_funding_positive:
          type: boolean
        mark_px:
          type: number
          format: double
        market:
          type: string
          example: 0xmarket123...
        mid_px:
          type: number
          format: double
        open_interest:
          type: number
          format: double
        oracle_px:
          type: number
          format: double
        transaction_unix_ms:
          type: integer
          format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````