> ## 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.

# Market price

> Perp-only real-time price updates for a specific market (oracle, mark, mid prices, funding, open interest). Spot markets do not publish this topic; derive spot mid price from `depth`.



## AsyncAPI

````yaml api-reference/asyncapi.json marketPrice
id: marketPrice
title: Market price
description: >-
  Perp-only real-time price updates for a specific market (oracle, mark, mid
  prices, funding, open interest). Spot markets do not publish this topic;
  derive spot mid price from `depth`.
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.aptoslabs.com/decibel/ws
    bindings: []
    variables: []
address: market_price:{marketAddr}
parameters:
  - id: marketAddr
    jsonSchema:
      type: string
      description: Market address (Aptos address format, e.g. 0x456...)
    description: Market address (Aptos address format, e.g. 0x456...)
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_0
    id: receivemarketPrice
    title: Receivemarket price
    description: >-
      Receive updates for perp-only real-time price updates for a specific
      market (oracle, mark, mid prices, funding, open interest). spot markets do
      not publish this topic; derive spot mid price from `depth`.
    type: receive
    messages:
      - &ref_1
        id: MarketPriceMessage
        payload:
          - name: MarketPriceMessage
            description: >-
              Perp-only real-time price updates for a specific market (oracle,
              mark, mid prices, funding, open interest). Spot markets do not
              publish this topic; derive spot mid price from `depth`.
            type: object
            properties:
              - name: price
                type: object
                description: >-
                  Perp-only: spot markets deliberately have no price rows — spot
                  has no

                  oracle, mark price, or funding, and clients derive the mid
                  from the

                  `depth` WS topic (top-of-book `best_bid`/`best_ask` ride on
                  every

                  depth update).
                required: true
                properties:
                  - name: funding_period_s
                    type: integer
                    description: >-
                      Funding period duration in seconds. 0 = continuous
                      funding, >0 = periodic funding.
                    required: true
                  - name: funding_rate_bps
                    type: number
                    description: >-
                      Hourly 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.
                    required: true
                  - name: is_funding_positive
                    type: boolean
                    required: true
                  - name: mark_px
                    type: number
                    required: true
                  - name: market
                    type: string
                    required: true
                  - name: mid_px
                    type: number
                    required: true
                  - name: open_interest
                    type: number
                    required: true
                  - name: oracle_px
                    type: number
                    required: true
                  - name: transaction_unix_ms
                    type: integer
                    required: true
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - topic
            - price
          properties:
            price:
              type: object
              description: >-
                Perp-only: spot markets deliberately have no price rows — spot
                has no

                oracle, mark price, or funding, and clients derive the mid from
                the

                `depth` WS topic (top-of-book `best_bid`/`best_ask` ride on
                every

                depth update).
              required:
                - market
                - oracle_px
                - mark_px
                - mid_px
                - funding_rate_bps
                - is_funding_positive
                - funding_period_s
                - transaction_unix_ms
                - open_interest
              properties:
                funding_period_s:
                  type: integer
                  format: int64
                  description: >-
                    Funding period duration in seconds. 0 = continuous funding,
                    >0 = periodic funding.
                  minimum: 0
                  x-parser-schema-id: <anonymous-schema-105>
                funding_rate_bps:
                  type: number
                  format: double
                  description: >-
                    Hourly 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.
                  x-parser-schema-id: <anonymous-schema-106>
                is_funding_positive:
                  type: boolean
                  x-parser-schema-id: <anonymous-schema-107>
                mark_px:
                  type: number
                  format: double
                  x-parser-schema-id: <anonymous-schema-108>
                market:
                  type: string
                  example: 0xmarket123...
                  x-parser-schema-id: <anonymous-schema-109>
                mid_px:
                  type: number
                  format: double
                  x-parser-schema-id: <anonymous-schema-110>
                open_interest:
                  type: number
                  format: double
                  x-parser-schema-id: <anonymous-schema-111>
                oracle_px:
                  type: number
                  format: double
                  x-parser-schema-id: <anonymous-schema-112>
                transaction_unix_ms:
                  type: integer
                  format: int64
                  x-parser-schema-id: <anonymous-schema-113>
              x-parser-schema-id: PriceDto
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-114>
          x-parser-schema-id: MarketPriceResponse
        title: Market price message
        description: >-
          Perp-only real-time price updates for a specific market (oracle, mark,
          mid prices, funding, open interest). Spot markets do not publish this
          topic; derive spot mid price from `depth`.
        example: |-
          {
            "topic": "market_price:0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
            "price": {
              "market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
              "oracle_px": 50125.75,
              "mark_px": 50120.5,
              "mid_px": 50122.25,
              "funding_rate_bps": 5,
              "is_funding_positive": true,
              "funding_period_s": 3600,
              "transaction_unix_ms": 1699564800000,
              "open_interest": 125000.5
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: MarketPriceMessage
          - id: x-parser-message-name
            value: MarketPriceMessage
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: marketPrice
sendOperations:
  - *ref_0
receiveOperations: []
sendMessages:
  - *ref_1
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: marketPrice
securitySchemes: []

````