Metadata-Version: 2.4
Name: tickflow
Version: 0.1.1
Summary: TickFlow Python Client
Author: TickFlow Team
License: MIT
Project-URL: Documentation, https://docs.tickflow.org
Keywords: finance,stock,market-data,trading,api-client
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25.0
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: pandas
Requires-Dist: pandas>=1.5.0; extra == "pandas"
Provides-Extra: progress
Requires-Dist: tqdm>=4.60.0; extra == "progress"
Provides-Extra: all
Requires-Dist: pandas>=1.5.0; extra == "all"
Requires-Dist: tqdm>=4.60.0; extra == "all"

# TickFlow Python SDK

高性能行情数据 Python 客户端，支持 A股、美股、港股。

## 安装

```bash
pip install tickflow[all]
```

## 快速开始

```python
from tickflow import TickFlow

# 初始化客户端
tf = TickFlow(api_key="your-api-key")

# 获取 K 线数据
df = tf.klines.get("600000.SH", period="1d", count=100, as_dataframe=True)
print(df.tail())

# 获取实时行情
quotes = tf.quotes.get(symbols=["600000.SH", "AAPL.US"])
for q in quotes:
    print(f"{q['symbol']}: {q['last_price']}")
```

## 异步使用

```python
import asyncio
from tickflow import AsyncTickFlow

async def main():
    async with AsyncTickFlow(api_key="your-api-key") as tf:
        df = await tf.klines.get("600000.SH", as_dataframe=True)
        print(df.tail())

asyncio.run(main())
```

## 批量获取

```python
# 批量获取大量股票数据，自动分批并发请求
symbols = tf.exchanges.get_symbols("SH")[:500]
df = tf.klines.batch(
    symbols,
    period="1d",
    as_dataframe=True,
    show_progress=True  # 显示进度条
)
```

## 特性

- ✅ 同步/异步双接口
- ✅ DataFrame 原生支持
- ✅ 自动重试（网络错误、服务器错误）
- ✅ 批量请求自动分片
- ✅ 进度条支持
- ✅ 完整类型注解

## 文档

完整文档请访问：https://docs.tickflow.org

## License

MIT
