tickflow 0.1.0.dev1__py3-none-any.whl → 0.1.0.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tickflow-0.1.0.dev1.dist-info → tickflow-0.1.0.dev2.dist-info}/METADATA +8 -14
- {tickflow-0.1.0.dev1.dist-info → tickflow-0.1.0.dev2.dist-info}/RECORD +4 -4
- {tickflow-0.1.0.dev1.dist-info → tickflow-0.1.0.dev2.dist-info}/WHEEL +0 -0
- {tickflow-0.1.0.dev1.dist-info → tickflow-0.1.0.dev2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tickflow
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev2
|
|
4
4
|
Summary: TickFlow Python Client
|
|
5
5
|
Author: TickFlow Team
|
|
6
6
|
License: MIT
|
|
@@ -36,12 +36,6 @@ Requires-Dist: tqdm>=4.60.0; extra == "all"
|
|
|
36
36
|
|
|
37
37
|
## 安装
|
|
38
38
|
|
|
39
|
-
```bash
|
|
40
|
-
pip install tickflow
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
如需 DataFrame 支持和进度条功能:
|
|
44
|
-
|
|
45
39
|
```bash
|
|
46
40
|
pip install tickflow[all]
|
|
47
41
|
```
|
|
@@ -52,14 +46,14 @@ pip install tickflow[all]
|
|
|
52
46
|
from tickflow import TickFlow
|
|
53
47
|
|
|
54
48
|
# 初始化客户端
|
|
55
|
-
|
|
49
|
+
tf = TickFlow(api_key="your-api-key")
|
|
56
50
|
|
|
57
51
|
# 获取 K 线数据
|
|
58
|
-
df =
|
|
52
|
+
df = tf.klines.get("600000.SH", period="1d", count=100, as_dataframe=True)
|
|
59
53
|
print(df.tail())
|
|
60
54
|
|
|
61
55
|
# 获取实时行情
|
|
62
|
-
quotes =
|
|
56
|
+
quotes = tf.quotes.get(symbols=["600000.SH", "AAPL.US"])
|
|
63
57
|
for q in quotes:
|
|
64
58
|
print(f"{q['symbol']}: {q['last_price']}")
|
|
65
59
|
```
|
|
@@ -71,8 +65,8 @@ import asyncio
|
|
|
71
65
|
from tickflow import AsyncTickFlow
|
|
72
66
|
|
|
73
67
|
async def main():
|
|
74
|
-
async with AsyncTickFlow(api_key="your-api-key") as
|
|
75
|
-
df = await
|
|
68
|
+
async with AsyncTickFlow(api_key="your-api-key") as tf:
|
|
69
|
+
df = await tf.klines.get("600000.SH", as_dataframe=True)
|
|
76
70
|
print(df.tail())
|
|
77
71
|
|
|
78
72
|
asyncio.run(main())
|
|
@@ -82,8 +76,8 @@ asyncio.run(main())
|
|
|
82
76
|
|
|
83
77
|
```python
|
|
84
78
|
# 批量获取大量股票数据,自动分批并发请求
|
|
85
|
-
symbols =
|
|
86
|
-
df =
|
|
79
|
+
symbols = tf.exchanges.get_symbols("SH")[:500]
|
|
80
|
+
df = tf.klines.batch(
|
|
87
81
|
symbols,
|
|
88
82
|
period="1d",
|
|
89
83
|
as_dataframe=True,
|
|
@@ -11,7 +11,7 @@ tickflow/resources/instruments.py,sha256=xE0IK42MuyWQAhlObC_9Xecm-JnrDHu281t_Nzq
|
|
|
11
11
|
tickflow/resources/klines.py,sha256=h13Ptou-d074gl0BB9irUnJ_iwaTxK0B-l7LXrH3tsE,23674
|
|
12
12
|
tickflow/resources/quotes.py,sha256=nC4xniwOtQbkgixCrl-wheJarGXxIG2hjwkLNBmwbxk,12161
|
|
13
13
|
tickflow/resources/universes.py,sha256=Pk--9Zlt6vfq9SzzkuJENkDAUUGmqiq4kdeOjMKXWQU,4542
|
|
14
|
-
tickflow-0.1.0.
|
|
15
|
-
tickflow-0.1.0.
|
|
16
|
-
tickflow-0.1.0.
|
|
17
|
-
tickflow-0.1.0.
|
|
14
|
+
tickflow-0.1.0.dev2.dist-info/METADATA,sha256=Wa_ISGXcHu-4M6qpqMYNP5Y97e5N8sLZNBbyaPHlPdM,2574
|
|
15
|
+
tickflow-0.1.0.dev2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
16
|
+
tickflow-0.1.0.dev2.dist-info/top_level.txt,sha256=_0JOxGpAnD-wmnVj9CKo6Bwp2qNC0xWdbDXJX8B1jrs,9
|
|
17
|
+
tickflow-0.1.0.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|