You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
976 B

4 months ago
# xnquant data loader
This module is for dev to load stock data. Install from local pypi server http://192.168.1.125:8080/simple .
## Install
```bash
pip install --index-url http://192.168.1.125:8080/simple xnquant_data_loader --trusted-host 192.168.1.125
```
## Update
```bash
pip install --index-url http://192.168.1.125:8080/simple xnquant_data_loader --trusted-host 192.168.1.125 -U --force
```
## Usage
```python3
from xnquant_data_loader import load_1min_kline, load_1day_kline, load_1day_industry, load_factors
print("\n--- 测试 1: 1min K线 ---")
df_kline = load_1min_kline(
end_time="2024-01-02T00:00:00Z",
)
print(df_kline.head())
print("\n--- 测试 2: 1day K线 ---")
df_kline = load_1day_kline(
end_time="2025-10-30T00:00:00Z",
)
print(df_kline.head())
print(df_kline.shape)
print("\n--- 测试 3: 1day 行业信息 ---")
df_kline = load_1day_industry(
end_time="2025-10-30T00:00:00Z",
)
print(df_kline.head())
print(df_kline.shape)
```