parent
dc9115c8a2
commit
957a73bdd5
@ -0,0 +1,43 @@
|
||||
# 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)
|
||||
```
|
||||
|
||||
Loading…
Reference in new issue