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

# Real-Time Quotes (Ticker)

## Plan Access

| Plan | Available |
| - | :-: |
| Free | ✅ |
| Starter | ✅ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |

## Supported Markets

Supported markets: Forex, Metals, Indices, US Stocks, HK Stocks, A-Shares, China Futures, Hong Kong Futures, Crypto

## Subscribe

```json theme={null}
{
  "cmd": "subscribe",
  "data": {
    "channel": "ticker",
    "symbols": ["AAPL.US", "BTCUSDT"]
  }
}
```

> `type` applies to every symbol in that subscription. Omit it when subscribing to mixed product types. If a symbol is ambiguous, split the request by product type and pass the corresponding value.

## Unsubscribe

```json theme={null}
{
  "cmd": "unsubscribe",
  "data": {
    "channel": "ticker",
    "symbols": ["AAPL.US"]
  }
}
```

## Server Response

The ticker message returns different fields based on market type.

### Index

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "SPX",
    "type": "indices",
    "last_price": "7342.86",
    "timestamp": 1779204386000
  }
}
```

### Metals

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "XAUUSD",
    "type": "forex",
    "last_price": "5130.72000",
    "ask_price": "5131.07000",
    "bid_price": "5130.37000",
    "spread": "0.70000",
    "timestamp": 1773334355000
  }
}
```

### Forex

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "EURUSD",
    "type": "forex",
    "last_price": "1.15200",
    "ask_price": "1.15202",
    "bid_price": "1.15199",
    "spread": "0.00003",
    "timestamp": 1773334426000
  }
}
```

### Stocks

US Stocks:

`trade_session` is returned only during extended sessions such as pre-market, post-market, or overnight trading. Values: `pre_market`, `post_market`, `overnight`.

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "NVDA.US",
    "type": "stock",
    "last_price": "221.25",
    "volume_24h": "462724",
    "high_24h": "223.44",
    "low_24h": "220.04",
    "trade_session": "overnight",
    "timestamp": 1779171600000
  }
}
```

HK Stocks:

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "700.HK",
    "type": "stock",
    "last_price": "461.4",
    "volume_24h": "24687716",
    "high_24h": "468.8",
    "low_24h": "448.6",
    "timestamp": 1779171608000
  }
}
```

A-Shares:

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "600519.SH",
    "type": "stock",
    "last_price": "1319.01",
    "volume_24h": "37263",
    "high_24h": "1329.99",
    "low_24h": "1318",
    "price_change_24h": "-3.99",
    "price_change_percent_24h": "-0.30",
    "timestamp": 1779171605000
  }
}
```

### Crypto

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "BTCUSDT",
    "type": "crypto",
    "last_price": "70480.57000000",
    "volume_24h": "23737.52989000",
    "high_24h": "71321.00000000",
    "low_24h": "69205.91000000",
    "price_change_24h": "-362.06000000",
    "price_change_percent_24h": "-0.511",
    "timestamp": 1773335135026
  }
}
```

### China Futures

```json theme={null}
{
  "cmd": "ticker",
  "data": {
    "symbol": "BU2609",
    "type": "futures",
    "last_price": "4309",
    "bid_price": "4308",
    "ask_price": "4310",
    "volume_24h": "37263",
    "high_24h": "4336",
    "low_24h": "4278",
    "timestamp": 1784012398000
  }
}
```

### Fields

The `24h` suffix does not mean a rolling 24-hour window in every market. Crypto usually uses a rolling 24-hour window; stocks and futures usually use the current trading day or session. Except for `symbol`, `last_price`, and `timestamp`, fields depend on the product and data availability.

| Field | Type | Description | Markets |
| - | - | - | - |
| symbol | string | Trading symbol | All |
| name | string | Product name, when available | Some products |
| type | string | Product type | All |
| category | string | Product category, when available | A-share market products |
| last\_price | string | Latest price | All |
| timestamp | int | Unix timestamp in milliseconds | All |
| open | string | Opening price, when statistics are available | Stocks, futures, crypto, and others |
| prev\_close | string | Previous close or reference price for the statistics window, when available | Stocks, futures, crypto, and others |
| ask\_price | string | Best ask, when quotes are available | Forex, metals, futures, and others |
| bid\_price | string | Best bid, when quotes are available | Forex, metals, futures, and others |
| spread | string | Bid-ask spread, when available | Forex, metals |
| volume\_24h | string | Trading volume; see the statistics window above | Stocks, futures, crypto |
| quote\_volume\_24h | string | Turnover over the same window as `volume_24h`, when available | Stocks, crypto, and others |
| high\_24h | string | High price over the same window as `volume_24h` | Stocks, futures, crypto |
| low\_24h | string | Low price over the same window as `volume_24h` | Stocks, futures, crypto |
| price\_change\_24h | string | Price change over the same window as `volume_24h`, when available | Stocks, futures, crypto |
| price\_change\_percent\_24h | string | Price change percentage, when available | Stocks, futures, crypto |
| trade\_session | string | Extended session: `pre_market`, `post_market`, or `overnight` | US stocks in extended hours |
| quote\_volume | string | Turnover in the current extended session, when available | US stocks in extended hours |


## AsyncAPI

````yaml asyncapi.en.json ticker
id: ticker
title: Ticker
description: ''
servers:
  - id: production
    protocol: wss
    host: api.tickdb.ai
    bindings: []
    variables: []
address: /v1/realtime
parameters: []
bindings: []
operations:
  - &ref_3
    id: subscribeToTicker
    title: Subscribe to ticker
    type: send
    messages:
      - &ref_5
        id: tickerData
        contentType: application/json
        payload:
          - name: Real-Time Quotes Data
            description: Real-time ticker data pushed from server
            type: object
            properties:
              - name: cmd
                type: string
                description: Message type
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: symbol
                    type: string
                    description: Trading symbol
                    required: true
                  - name: name
                    type: string
                    description: Product name, when available
                    required: false
                  - name: type
                    type: string
                    description: Symbol type
                    enumValues:
                      - stock
                      - indices
                      - crypto
                      - forex
                      - futures
                    required: false
                  - name: category
                    type: string
                    description: Product category, when available
                    required: false
                  - name: last_price
                    type: string
                    description: Latest price
                    required: true
                  - name: open
                    type: string
                    description: Opening price, when available
                    required: false
                  - name: prev_close
                    type: string
                    description: Previous close or reference price, when available
                    required: false
                  - name: bid_price
                    type: string
                    description: Best bid, when available
                    required: false
                  - name: ask_price
                    type: string
                    description: Best ask, when available
                    required: false
                  - name: spread
                    type: string
                    description: Bid-ask spread for forex or metals, when available
                    required: false
                  - name: volume_24h
                    type: string
                    description: >-
                      Trading volume; rolling 24 hours for crypto, usually
                      current day or session for stocks and futures
                    required: false
                  - name: quote_volume_24h
                    type: string
                    description: >-
                      Turnover over the same window as volume_24h, when
                      available
                    required: false
                  - name: high_24h
                    type: string
                    description: High price over the same window as volume_24h
                    required: false
                  - name: low_24h
                    type: string
                    description: Low price over the same window as volume_24h
                    required: false
                  - name: price_change_24h
                    type: string
                    description: >-
                      Price change over the same statistics window, when
                      available
                    required: false
                  - name: price_change_percent_24h
                    type: string
                    description: Price change percentage, when available
                    required: false
                  - name: trade_session
                    type: string
                    description: US stock extended trading session, when applicable
                    enumValues:
                      - pre_market
                      - post_market
                      - overnight
                    required: false
                  - name: quote_volume
                    type: string
                    description: >-
                      Turnover in the current extended trading session, when
                      available
                    required: false
                  - name: pre_market_quote
                    type: object
                    description: Pre-market quote, when available
                    required: false
                  - name: post_market_quote
                    type: object
                    description: Post-market quote, when available
                    required: false
                  - name: overnight_quote
                    type: object
                    description: Overnight quote, when available
                    required: false
                  - name: timestamp
                    type: integer
                    description: Unix timestamp in milliseconds
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          properties:
            cmd:
              type: string
              const: ticker
              description: Message type
              x-parser-schema-id: <anonymous-schema-21>
            data:
              type: object
              additionalProperties: false
              properties:
                symbol:
                  type: string
                  example: AAPL.US
                  description: Trading symbol
                  x-parser-schema-id: <anonymous-schema-23>
                name:
                  type: string
                  description: Product name, when available
                  x-parser-schema-id: <anonymous-schema-24>
                type:
                  type: string
                  enum:
                    - stock
                    - indices
                    - crypto
                    - forex
                    - futures
                  description: Symbol type
                  x-parser-schema-id: <anonymous-schema-25>
                category:
                  type: string
                  description: Product category, when available
                  x-parser-schema-id: <anonymous-schema-26>
                last_price:
                  type: string
                  example: '150.25'
                  description: Latest price
                  x-parser-schema-id: <anonymous-schema-27>
                open:
                  type: string
                  description: Opening price, when available
                  x-parser-schema-id: <anonymous-schema-28>
                prev_close:
                  type: string
                  description: Previous close or reference price, when available
                  x-parser-schema-id: <anonymous-schema-29>
                bid_price:
                  type: string
                  description: Best bid, when available
                  x-parser-schema-id: <anonymous-schema-30>
                ask_price:
                  type: string
                  description: Best ask, when available
                  x-parser-schema-id: <anonymous-schema-31>
                spread:
                  type: string
                  description: Bid-ask spread for forex or metals, when available
                  x-parser-schema-id: <anonymous-schema-32>
                volume_24h:
                  type: string
                  description: >-
                    Trading volume; rolling 24 hours for crypto, usually current
                    day or session for stocks and futures
                  x-parser-schema-id: <anonymous-schema-33>
                quote_volume_24h:
                  type: string
                  description: Turnover over the same window as volume_24h, when available
                  x-parser-schema-id: <anonymous-schema-34>
                high_24h:
                  type: string
                  description: High price over the same window as volume_24h
                  x-parser-schema-id: <anonymous-schema-35>
                low_24h:
                  type: string
                  description: Low price over the same window as volume_24h
                  x-parser-schema-id: <anonymous-schema-36>
                price_change_24h:
                  type: string
                  description: Price change over the same statistics window, when available
                  x-parser-schema-id: <anonymous-schema-37>
                price_change_percent_24h:
                  type: string
                  description: Price change percentage, when available
                  x-parser-schema-id: <anonymous-schema-38>
                trade_session:
                  type: string
                  enum:
                    - pre_market
                    - post_market
                    - overnight
                  description: US stock extended trading session, when applicable
                  x-parser-schema-id: <anonymous-schema-39>
                quote_volume:
                  type: string
                  description: >-
                    Turnover in the current extended trading session, when
                    available
                  x-parser-schema-id: <anonymous-schema-40>
                pre_market_quote:
                  type: object
                  description: Pre-market quote, when available
                  x-parser-schema-id: <anonymous-schema-41>
                post_market_quote:
                  type: object
                  description: Post-market quote, when available
                  x-parser-schema-id: <anonymous-schema-42>
                overnight_quote:
                  type: object
                  description: Overnight quote, when available
                  x-parser-schema-id: <anonymous-schema-43>
                timestamp:
                  type: integer
                  example: 1703123456789
                  description: Unix timestamp in milliseconds
                  x-parser-schema-id: <anonymous-schema-44>
              required:
                - symbol
                - last_price
                - timestamp
              x-parser-schema-id: <anonymous-schema-22>
          required:
            - cmd
            - data
          x-parser-schema-id: <anonymous-schema-20>
        title: Real-Time Quotes Data
        description: Real-time ticker data pushed from server
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tickerData
    bindings: []
    extensions: &ref_1
      - id: x-parser-unique-object-id
        value: ticker
  - &ref_2
    id: receiveTickerData
    title: Receive ticker data
    type: receive
    messages:
      - &ref_4
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Subscribe/Unsubscribe to Real-Time Quotes
            description: >-
              Subscribe or unsubscribe to real-time ticker updates for one or
              multiple symbols
            type: object
            properties:
              - name: cmd
                type: string
                description: Command type (subscribe or unsubscribe)
                enumValues:
                  - subscribe
                  - unsubscribe
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: channel
                    type: string
                    description: Channel name
                    enumValues:
                      - ticker
                      - depth
                      - trade
                    required: true
                  - name: symbols
                    type: array
                    description: List of trading symbols to subscribe/unsubscribe
                    examples: &ref_0
                      - AAPL.US
                      - 700.HK
                      - EURUSD
                      - XAUUSD
                      - BTCUSDT
                      - IC2606
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: type
                    type: string
                    description: >-
                      Symbol type, optional. Not required when the symbol is
                      unambiguous; if the server returns an AMBIGUOUS_SYMBOL
                      error, pass the value as indicated
                    enumValues:
                      - stock
                      - indices
                      - crypto
                      - forex
                      - futures
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          properties:
            cmd:
              type: string
              enum:
                - subscribe
                - unsubscribe
              description: Command type (subscribe or unsubscribe)
              x-parser-schema-id: <anonymous-schema-62>
            data:
              type: object
              additionalProperties: false
              properties:
                channel:
                  type: string
                  enum:
                    - ticker
                    - depth
                    - trade
                  default: ticker
                  description: Channel name
                  x-parser-schema-id: <anonymous-schema-64>
                symbols:
                  type: array
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-66>
                  examples: *ref_0
                  description: List of trading symbols to subscribe/unsubscribe
                  x-parser-schema-id: <anonymous-schema-65>
                type:
                  type: string
                  enum:
                    - stock
                    - indices
                    - crypto
                    - forex
                    - futures
                  description: >-
                    Symbol type, optional. Not required when the symbol is
                    unambiguous; if the server returns an AMBIGUOUS_SYMBOL
                    error, pass the value as indicated
                  x-parser-schema-id: <anonymous-schema-67>
              required:
                - channel
                - symbols
              x-parser-schema-id: <anonymous-schema-63>
          required:
            - cmd
            - data
          x-parser-schema-id: <anonymous-schema-61>
        title: Subscribe/Unsubscribe to Real-Time Quotes
        description: >-
          Subscribe or unsubscribe to real-time ticker updates for one or
          multiple symbols
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
    bindings: []
    extensions: *ref_1
sendOperations:
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: ticker
securitySchemes:
  - id: apiKey
    name: api_key
    type: httpApiKey
    in: query
    extensions: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.