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

# Tick data

> Retrieve the latest tick data for Hong Kong and US stocks.

## Retrieve tick data

### Method name: get\_tick\_data

### Enter parameters

| Field  | Type                               | Description                                  |
| :----- | :--------------------------------- | :------------------------------------------- |
| symbol | Optional\[Union\[str, List\[str]]] | Stock code                                   |
| market | Optional\[str]                     | Market, default is ‘hk’, optional ‘hk’, ‘nb’ |

### Response parameters

| Field         | Type   | Description             |
| :------------ | :----- | :---------------------- |
| date          | str    | date and time           |
| symbol        | str    | stock code              |
| last\_price   | double | latest price            |
| price\_change | double | price change            |
| percentage    | double | price percentage change |

### Usage examples

#### Get the latest tick data of a stock

```python theme={null}
import tqx_data
result = tqx_data.get_tick_data(
    symbol=["0700.HK"],
    market="hk",
)
print(result)
```

**Response Example**

```text theme={null}
symbol last_price date
0 0700.HK 516.0 2026-03-24 15:59:59.000
```

#### Get the latest tick data of all Hong Kong stocks

```python theme={null}
import tqx_data
result = tqx_data.get_tick_data(
    market="hk",
)
print(result)
```

**Response Example**

```text theme={null}
symbol date last_price
0 0001.HK 2026-03-24 15:59:56.000 58.850
1 0002.HK 2026-03-24 15:59:55.000 72.350
2 0003.HK 2026-03-24 15:59:54.000 7.130
3 0004.HK 2026-03-24 15:59:51.000 23.040
4 0005.HK 2026-03-24 15:59:57.000 123.500
... ... ... ...
2731 9993.HK 2026-03-24 15:59:48.000 1.370
2732 9995.HK 2026-03-24 15:59:55.000 91.400
2733 9996.HK 2026-03-24 15:59:18.000 5.600
2734 9998.HK 2026-03-24 15:58:54.000 0.475
2735 9999.HK 2026-03-24 15:59:53.000 177.300
```

#### Get the latest tick data of U.S. stocks

```python theme={null}
import tqx_data
result = tqx_data.get_tick_data(
    market="nb",
)
print(result)
```

**Response Example**

```text theme={null}
symbol date last_price
0 A.NB 2026-03-25 03:59:49.344 114.1400
1 AA.NB 2026-03-25 03:59:51.123 56.6900
2 AACBR.NB 2026-03-25 02:24:16.798 0.3250
3 AACBU.NB 2026-03-24 03:59:00 10.5300
4 AACG.NB 2026-03-25 03:59:29.319 1.0100
... ... ... ...
6470 ZWZZT.NB 2026-03-25 03:59:00 10.0100
6471 ZXIET.NB 2026-03-25 03:59:00 100.0000
6472 ZXZZT.NB 2026-03-25 03:59:00 12.1000
6473 ZYBT.NB 2026-03-25 03:59:48.032 0.8404
6474 ZYME.NB 2026-03-25 03:59:50.931 23.6150
```

**7.Indicator calculation interface**
