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

# Market Data

> Market data feed for all markets



## AsyncAPI

````yaml api-reference/websocket-asyncapi.json /marketdata
id: /marketdata
title: /marketdata
description: Market data feed for all markets
servers:
  - id: production
    protocol: wss
    host: ws.paxos.com
    bindings: []
    variables: []
  - id: sandbox
    protocol: wss
    host: ws.sandbox.paxos.com
    bindings: []
    variables: []
address: /marketdata
parameters: []
bindings: []
operations:
  - &ref_1
    id: /marketdata.subscribe
    title: /marketdata.subscribe
    description: Subscribe to market data for all markets
    type: send
    messages:
      - &ref_2
        id: subscribe.message.0
        payload:
          - name: Market Data Snapshot
            description: Initial order book snapshot
            type: object
            properties:
              - name: type
                type: string
                description: Message type indicating this is an initial snapshot
                enumValues:
                  - SNAPSHOT
                required: true
              - name: market
                type: string
                description: One of the available markets (e.g., BTCUSD)
                required: true
              - name: bids
                type: array
                description: Bid prices in descending order with amounts
                required: true
                properties:
                  - name: price
                    type: string
                    description: Price level
                    required: true
                  - name: amount
                    type: string
                    description: Amount at this price level
                    required: true
              - name: asks
                type: array
                description: Ask prices in ascending order with amounts
                required: true
                properties:
                  - name: price
                    type: string
                    description: Price level
                    required: true
                  - name: amount
                    type: string
                    description: Amount at this price level
                    required: true
              - name: final_snapshot
                type: boolean
                description: Demarcates the end of the initial snapshot (always true)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - market
            - bids
            - asks
            - final_snapshot
          properties:
            type:
              type: string
              enum:
                - SNAPSHOT
              description: Message type indicating this is an initial snapshot
              x-parser-schema-id: <anonymous-schema-7>
            market:
              type: string
              description: One of the available markets (e.g., BTCUSD)
              example: BTCUSD
              x-parser-schema-id: <anonymous-schema-8>
            bids:
              type: array
              description: Bid prices in descending order with amounts
              items: &ref_0
                type: object
                required:
                  - price
                  - amount
                properties:
                  price:
                    type: string
                    description: Price level
                    example: '19994.25'
                    x-parser-schema-id: <anonymous-schema-10>
                  amount:
                    type: string
                    description: Amount at this price level
                    example: '0.7755'
                    x-parser-schema-id: <anonymous-schema-11>
                x-parser-schema-id: PriceLevel
              x-parser-schema-id: <anonymous-schema-9>
            asks:
              type: array
              description: Ask prices in ascending order with amounts
              items: *ref_0
              x-parser-schema-id: <anonymous-schema-12>
            final_snapshot:
              type: boolean
              description: Demarcates the end of the initial snapshot (always true)
              example: true
              x-parser-schema-id: <anonymous-schema-13>
          x-parser-schema-id: MarketDataSnapshotPayload
        title: Market Data Snapshot
        description: Initial order book snapshot
        example: |-
          {
            "type": "SNAPSHOT",
            "market": "BTCUSD",
            "bids": [
              {
                "price": "19994.25",
                "amount": "0.7755"
              },
              {
                "price": "19993.75",
                "amount": "0.83676985"
              }
            ],
            "asks": [
              {
                "price": "19994.5",
                "amount": "0.97548541"
              },
              {
                "price": "19996",
                "amount": "1.135"
              }
            ],
            "final_snapshot": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe.message.0
      - &ref_3
        id: subscribe.message.1
        payload:
          - name: Market Data Update
            description: Real-time order book update
            type: object
            properties:
              - name: type
                type: string
                description: Message type indicating this is an update
                enumValues:
                  - UPDATE
                required: true
              - name: market
                type: string
                description: One of the available markets (e.g., BTCUSD)
                required: true
              - name: side
                type: string
                description: Specifies the activity type
                enumValues:
                  - BUY
                  - SELL
                required: true
              - name: price
                type: string
                description: The current price
                required: true
              - name: amount
                type: string
                description: The current amount (0 means removal)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - market
            - side
            - price
            - amount
          properties:
            type:
              type: string
              enum:
                - UPDATE
              description: Message type indicating this is an update
              x-parser-schema-id: <anonymous-schema-14>
            market:
              type: string
              description: One of the available markets (e.g., BTCUSD)
              example: BTCUSD
              x-parser-schema-id: <anonymous-schema-15>
            side:
              type: string
              enum:
                - BUY
                - SELL
              description: Specifies the activity type
              x-parser-schema-id: <anonymous-schema-16>
            price:
              type: string
              description: The current price
              example: '19958.5'
              x-parser-schema-id: <anonymous-schema-17>
            amount:
              type: string
              description: The current amount (0 means removal)
              example: '0.62649999'
              x-parser-schema-id: <anonymous-schema-18>
          x-parser-schema-id: MarketDataUpdatePayload
        title: Market Data Update
        description: Real-time order book update
        example: |-
          {
            "type": "UPDATE",
            "market": "BTCUSD",
            "side": "BUY",
            "price": "19958.5",
            "amount": "0.62649999"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe.message.1
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: /marketdata
sendOperations: []
receiveOperations:
  - *ref_1
sendMessages: []
receiveMessages:
  - *ref_2
  - *ref_3
extensions:
  - id: x-parser-unique-object-id
    value: /marketdata
securitySchemes: []

````