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

# Single market lifecycle

> Kalshi market lifecycle updates (opened/closed/suspended) for one ticker.



## AsyncAPI

````yaml datastream/pm-lifecycle.json singleMarketLifecycle
id: singleMarketLifecycle
title: Single market lifecycle
description: Kalshi market lifecycle updates (opened/closed/suspended) for one ticker.
servers:
  - id: production
    protocol: wss
    host: datastream.solanatracker.io
    bindings: []
    variables:
      - id: apiKey
        description: Your unique API key from Data API subscription
        defaultValue: YOUR_DATASTREAM_KEY
        allowedValues: []
        examples: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: subscribeSingleMarketLifecycle
    title: Subscribe single market lifecycle
    description: Subscribe to lifecycle updates for one market
    type: receive
    messages:
      - &ref_4
        id: joinSingleMarketLifecycle
        payload:
          - name: joinSingleMarketLifecycle
            description: Subscribe to lifecycle updates for one market
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: >-
                  Room pattern:
                  `pm:market:{exchange}:{marketId}:market_lifecycle`
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-2>
            room:
              type: string
              description: 'Room pattern: `pm:market:{exchange}:{marketId}:market_lifecycle`'
              default: pm:market:polymarket:1234567890:market_lifecycle
              x-parser-schema-id: <anonymous-schema-3>
          examples:
            - type: join
              room: pm:market:polymarket:1234567890:market_lifecycle
          x-parser-schema-id: <anonymous-schema-1>
        title: Join single market lifecycle
        description: Subscribe to lifecycle updates for one market
        example: |-
          {
            "type": "join",
            "room": "pm:market:polymarket:1234567890:market_lifecycle"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: joinSingleMarketLifecycle
          - id: x-parser-message-name
            value: joinSingleMarketLifecycle
    bindings: []
    extensions: &ref_0
      - id: x-displayName
        value: Single-Market Lifecycle
      - id: x-parser-unique-object-id
        value: singleMarketLifecycle
  - &ref_3
    id: receiveSingleMarketLifecycleMessage
    title: Receive single market lifecycle message
    description: Receive Single-Market Lifecycle updates
    type: send
    messages:
      - &ref_6
        id: singleMarketLifecycleMessage
        payload:
          - name: singleMarketLifecycleMessage
            description: Single-Market Lifecycle update
            type: object
            properties:
              - name: type
                type: string
                description: message
                required: false
              - name: room
                type: string
                required: false
              - name: data
                type: object
                description: >-
                  Flat room data. Envelope fields plus event-specific fields
                  (trade/price/orderbook/…) at the top level.
                required: false
                properties:
                  - name: type
                    type: string
                    description: >-
                      Event kind (trade, price, orderbook_snapshot, quote,
                      crypto_price, …)
                    required: true
                  - name: channel
                    type: string
                    enumValues:
                      - prices
                      - trades
                      - orderbook
                      - quotes
                      - volume
                      - market_lifecycle
                      - resolution
                    required: true
                  - name: exchange
                    type: string
                    enumValues:
                      - kalshi
                      - polymarket
                    required: true
                  - name: marketId
                    type: string
                    required: true
                  - name: eventId
                    type: string
                    required: false
                  - name: seriesId
                    type: string
                    required: false
                  - name: category
                    type: string
                    required: false
                  - name: sport
                    type: string
                    required: false
                  - name: sourceId
                    type: string
                    description: Exchange/source idempotency key (omit when empty)
                    required: false
                  - name: timestamp
                    type: integer
                    description: Unix epoch milliseconds
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: message
              x-parser-schema-id: <anonymous-schema-8>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-9>
            data:
              type: object
              description: >-
                Flat room data. Envelope fields plus event-specific fields
                (trade/price/orderbook/…) at the top level.
              additionalProperties: true
              required:
                - type
                - channel
                - exchange
                - marketId
                - timestamp
              properties:
                type:
                  type: string
                  description: >-
                    Event kind (trade, price, orderbook_snapshot, quote,
                    crypto_price, …)
                  x-parser-schema-id: <anonymous-schema-10>
                channel:
                  type: string
                  enum:
                    - prices
                    - trades
                    - orderbook
                    - quotes
                    - volume
                    - market_lifecycle
                    - resolution
                  x-parser-schema-id: <anonymous-schema-11>
                exchange:
                  type: string
                  enum:
                    - kalshi
                    - polymarket
                  x-parser-schema-id: <anonymous-schema-12>
                marketId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-13>
                eventId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-14>
                seriesId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-15>
                category:
                  type: string
                  x-parser-schema-id: <anonymous-schema-16>
                sport:
                  type: string
                  x-parser-schema-id: <anonymous-schema-17>
                sourceId:
                  type: string
                  description: Exchange/source idempotency key (omit when empty)
                  x-parser-schema-id: <anonymous-schema-18>
                timestamp:
                  type: integer
                  description: Unix epoch milliseconds
                  x-parser-schema-id: <anonymous-schema-19>
              x-parser-schema-id: RealtimeData
          examples:
            - type: message
              room: pm:market:polymarket:1234567890:market_lifecycle
              data:
                type: trade
                channel: trades
                exchange: polymarket
                marketId: '1234567890'
                timestamp: 1785347120123
          x-parser-schema-id: <anonymous-schema-7>
        title: Single market lifecycle message
        description: Single-Market Lifecycle update
        example: |-
          {
            "type": "message",
            "room": "pm:market:polymarket:1234567890:market_lifecycle",
            "data": {
              "type": "trade",
              "channel": "trades",
              "exchange": "polymarket",
              "marketId": "1234567890",
              "timestamp": 1785347120123
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: singleMarketLifecycleMessage
          - id: x-parser-message-name
            value: singleMarketLifecycleMessage
    bindings: []
    extensions: *ref_0
  - &ref_2
    id: unsubscribeSingleMarketLifecycle
    title: Unsubscribe single market lifecycle
    description: Unsubscribe from Single-Market Lifecycle
    type: receive
    messages:
      - &ref_5
        id: leaveSingleMarketLifecycle
        payload:
          - name: leaveSingleMarketLifecycle
            description: Unsubscribe from Single-Market Lifecycle
            type: object
            properties:
              - name: type
                type: string
                description: leave
                required: true
              - name: room
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: leave
              default: leave
              x-parser-schema-id: <anonymous-schema-21>
            room:
              type: string
              default: pm:market:polymarket:1234567890:market_lifecycle
              x-parser-schema-id: <anonymous-schema-22>
          examples:
            - type: leave
              room: pm:market:polymarket:1234567890:market_lifecycle
          x-parser-schema-id: <anonymous-schema-20>
        title: Leave single market lifecycle
        description: Unsubscribe from Single-Market Lifecycle
        example: |-
          {
            "type": "leave",
            "room": "pm:market:polymarket:1234567890:market_lifecycle"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leaveSingleMarketLifecycle
          - id: x-parser-message-name
            value: leaveSingleMarketLifecycle
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
  - *ref_5
receiveMessages:
  - *ref_6
extensions:
  - id: x-displayName
    value: Single-Market Lifecycle
  - id: x-parser-unique-object-id
    value: singleMarketLifecycle
securitySchemes:
  - id: apiKeyAuth
    name: apiKey
    type: httpApiKey
    description: >-
      API key for authentication. Include your Datastream key in the connection
      URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
    in: header
    extensions: []

````