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

# charts

GET /md/getChart

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

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: charts
  version: subpackage_charts.charts
channels:
  /md/getChart:
    publish:
      operationId: subpackage_charts.charts-publish
      summary: onChart
      message:
        name: onChart
        title: onChart
        payload:
          $ref: '#/components/schemas/charts_chartEvent'
    subscribe:
      operationId: subpackage_charts.charts-subscribe
      summary: getChart
      message:
        name: getChart
        title: getChart
        payload:
          $ref: '#/components/schemas/charts_getChart'
servers:
  Demo:
    url: wss://md-demo.tradovateapi.com/
    protocol: wss
    x-default: true
  Live:
    url: wss://md.tradovateapi.com/
    protocol: wss
components:
  schemas:
    ChannelsChartsMessagesChartEventE:
      type: string
      enum:
        - chart
      title: ChannelsChartsMessagesChartEventE
    Bar:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        open:
          type: number
          format: double
        high:
          type: number
          format: double
        low:
          type: number
          format: double
        close:
          type: number
          format: double
        upVolume:
          type: number
          format: double
        downVolume:
          type: number
          format: double
        upTicks:
          type: number
          format: double
        downTicks:
          type: number
          format: double
        bidVolume:
          type: number
          format: double
        offerVolume:
          type: number
          format: double
      title: Bar
    Chart:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Matches the historicalId or realtimeId from the md/getChart
            response.
        td:
          type: integer
          description: Trade date as YYYYMMDD.
        bars:
          type: array
          items:
            $ref: '#/components/schemas/Bar'
      title: Chart
    ChannelsChartsMessagesChartEventD:
      type: object
      properties:
        charts:
          type: array
          items:
            $ref: '#/components/schemas/Chart'
      title: ChannelsChartsMessagesChartEventD
    charts_chartEvent:
      type: object
      properties:
        e:
          $ref: '#/components/schemas/ChannelsChartsMessagesChartEventE'
        d:
          $ref: '#/components/schemas/ChannelsChartsMessagesChartEventD'
      description: Event frame with e="chart" carrying a charts array.
      title: charts_chartEvent
    ChannelsChartsMessagesGetChartChartDescription:
      type: object
      properties:
        underlyingType:
          type: string
          description: Tick, DailyBar, MinuteBar, Custom, or DOM.
        elementSize:
          type: integer
        elementSizeUnit:
          type: string
          description: >-
            Volume, Range, UnderlyingUnits, Renko, MomentumRange,
            PointAndFigure, or OFARange.
        withHistogram:
          type: boolean
      title: ChannelsChartsMessagesGetChartChartDescription
    ChannelsChartsMessagesGetChartTimeRange:
      type: object
      properties:
        closestTimestamp:
          type: string
          format: date-time
        closestTickId:
          type: integer
        asFarAsTimestamp:
          type: string
          format: date-time
        asMuchAsElements:
          type: integer
      description: At least one field is required.
      title: ChannelsChartsMessagesGetChartTimeRange
    charts_getChart:
      type: object
      properties:
        symbol:
          type: string
          description: Contract symbol or contract ID.
        chartDescription:
          $ref: '#/components/schemas/ChannelsChartsMessagesGetChartChartDescription'
        timeRange:
          $ref: '#/components/schemas/ChannelsChartsMessagesGetChartTimeRange'
          description: At least one field is required.
      required:
        - symbol
        - chartDescription
      title: charts_getChart

```