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

# Currency data

> Retrieve currency conversion data used by TQX research workflows.

## Get currency data

### Method name: get\_currency

### Enter parameters

| Field       | Type                               | Description              | Is it required |
| :---------- | :--------------------------------- | :----------------------- | :------------- |
| start\_date | Optional\[str]                     | Start date,eg:"20250702" | Optional       |
| end\_date   | Optional\[str]                     | End date,eg:"20250702"   | Optional       |
| fields      | Optional\[Union\[str, List\[str]]] | Exchange rate list       | Optional       |

### Response parameters

| Field    | Type   | Description                      |
| :------- | :----- | :------------------------------- |
| date     | str    | date                             |
| CNY\_HKD | double | RMB to Hong Kong dollar          |
| CNY\_USD | double | RMB to US dollar                 |
| HKD\_USD | double | Hong Kong dollar to US dollar    |
| HKD\_CNY | double | Hong Kong dollar to Chinese yuan |
| USD\_CNY | double | US dollar to Chinese yuan        |
| USD\_HKD | double | US dollar to Hong Kong dollar    |

### Usage examples

#### Obtain some backtest factors of a single Hong Kong stock

```python theme={null}
import tqx_data
result = tqx_data.get_currency(
    start_date="20260101",
    end_date="20260131",
    field=[],
)
print(result)
```
