> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# histogram

GET /md/subscribeHistogram

Reference: https://docs.ninjatrader.com/market-data/web-socket-api/histogram/histogram

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: histogram
  version: subpackage_histogram.histogram
channels:
  /md/subscribeHistogram:
    publish:
      operationId: subpackage_histogram.histogram-publish
      summary: onHistogram
      message:
        name: onHistogram
        title: onHistogram
        payload:
          $ref: '#/components/schemas/histogram_histogramEvent'
    subscribe:
      operationId: subpackage_histogram.histogram-subscribe
      summary: subscribeHistogram
      message:
        name: subscribeHistogram
        title: subscribeHistogram
        payload:
          $ref: '#/components/schemas/histogram_subscribe'
servers:
  Demo:
    url: wss://md-demo.tradovateapi.com/
    protocol: wss
    x-default: true
  Live:
    url: wss://md.tradovateapi.com/
    protocol: wss
components:
  schemas:
    ChannelsHistogramMessagesHistogramEventE:
      type: string
      enum:
        - md
      title: ChannelsHistogramMessagesHistogramEventE
    HistogramTradeDate:
      type: object
      properties:
        year:
          type: integer
        month:
          type: integer
        day:
          type: integer
      title: HistogramTradeDate
    HistogramItems:
      type: object
      properties: {}
      description: Map of price offset (relative to base) to volume.
      title: HistogramItems
    Histogram:
      type: object
      properties:
        contractId:
          type: integer
          format: int64
        timestamp:
          type: string
          format: date-time
        tradeDate:
          $ref: '#/components/schemas/HistogramTradeDate'
        base:
          type: number
          format: double
        items:
          $ref: '#/components/schemas/HistogramItems'
          description: Map of price offset (relative to base) to volume.
        refresh:
          type: boolean
      title: Histogram
    ChannelsHistogramMessagesHistogramEventD:
      type: object
      properties:
        histograms:
          type: array
          items:
            $ref: '#/components/schemas/Histogram'
      title: ChannelsHistogramMessagesHistogramEventD
    histogram_histogramEvent:
      type: object
      properties:
        e:
          $ref: '#/components/schemas/ChannelsHistogramMessagesHistogramEventE'
        d:
          $ref: '#/components/schemas/ChannelsHistogramMessagesHistogramEventD'
      description: Event frame with e="md" carrying a histograms array.
      title: histogram_histogramEvent
    histogram_subscribe:
      type: object
      properties:
        symbol:
          type: string
          description: Contract symbol (e.g., "ESM7") or contract ID as a string.
      required:
        - symbol
      title: histogram_subscribe

```