简单期货行情&交易HTTP接口API,基于TqSdk(已修复服务异常问题)
Project description
EasyFut
介绍
简单期货行情&交易HTTP接口API,基于TqSdk。
安装&启动教程
1.pip install easyfut
2.创建配置文件 easyfut -n easyfut.conf
3.修改 easyfut.conf 配置文件内容
4.命令行启动 easyfut -c easyfut.conf
使用说明(curl演示)
#获取账户信息
curl http://127.0.0.1:8888/account
#获取当前持仓
curl http://127.0.0.1:8888/position
#获取实时行情
curl http://127.0.0.1:8888/quote/SHFE.rb2210
#获取K线行情
curl http://127.0.0.1:8888/klines/SHFE.rb2210_60_20
#获取Tick序列
curl http://127.0.0.1:8888/ticks/SHFE.rb2210_20
#委托下单
curl -X POST -H "Content-type: application/json" -d '{"symbol":"SHFE.rb2210", "direction":"BUY","offset":"OPEN","volume":1,"limit_price":"UPPER_LIMIT"}' http://127.0.0.1:8888/order
#取消委托单
curl -X POST -H "Content-type: application/json" -d '{"order_id":"f1786bea1ad045199925deea3cd6f1c7"}' http://127.0.0.1:8888/order/cancel
#获取委托单信息
curl http://127.0.0.1:8888/order/fbcce9326a3a4f8c80295b0e6e07434a
#获取当日可撤委托
curl http://127.0.0.1:8888/order/alive
#更多详见官方文档 https://easyfut.iweiai.com/doc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyfut_plus-1.0.5.tar.gz.
File metadata
- Download URL: easyfut_plus-1.0.5.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b171a6a5f0ff8dc89cd68d757ef4bd11fa77d4dee2d4197b991bf6528b6b0ee
|
|
| MD5 |
2190d811f32003ecaad0d1efab6151b2
|
|
| BLAKE2b-256 |
b88278aea12386541ad2e24a0177a79b7f3ea1f5f9323bdfd2a829841d628454
|
File details
Details for the file easyfut_plus-1.0.5-py3-none-any.whl.
File metadata
- Download URL: easyfut_plus-1.0.5-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dda6c313ee118123e04c2ea49bf10730161242632b0774abae6659dc4762f9f6
|
|
| MD5 |
4ad0828da4b248ad866eed429757c889
|
|
| BLAKE2b-256 |
518e9cf3176e7c4cc8bb6bddb5e9194efff4d46f7127161b00db8866a6f1f413
|