OKEX gateway for vn.py quant trading framework.
Project description
vnpy-okex-pro
获取交易产品历史K线数据改为使用OKX接口
GET /api/v5/market/history-candles
安装
安装需要基于2.2.0版本以上的VN Studio。
直接使用pip命令:
pip install vnpy_okex_pro
下载解压后在cmd中运行
python setup.py install
使用
以脚本方式启动(script/run.py):
import vnpy_crypto
vnpy_crypto.init()
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
# 上面固定不动
# ——————————————————————————————————————————————————
# Gateway
from vnpy_okex_pro import OkexGateway
# App
from vnpy_datamanager import DataManagerApp
def main():
"""主入口函数"""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
# ——————————————————————————————————————————————————
# Gateway
main_engine.add_gateway(OkexGateway)
# App
main_engine.add_app(DataManagerApp)
# ——————————————————————————————————————————————————
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
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
vnpy-okex-pro-2023.4.14.2.tar.gz
(11.8 kB
view hashes)
Built Distribution
Close
Hashes for vnpy-okex-pro-2023.4.14.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7abeeef9c56480982b3de40e8514ebeefb7fb494f1b442bd917ce2b4204f05a2 |
|
MD5 | 8fac88a751a288c60cc954b2b75809e0 |
|
BLAKE2b-256 | 8962ca86c6464f5628783a9d86a1c4b7b99d22478620a3f4de1cc4a6e49c0bc5 |
Close
Hashes for vnpy_okex_pro-2023.4.14.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71895893d6cd88b5eb972a4ab8c80f955b9eec76ba000ee1f75acdac747cd60d |
|
MD5 | 453eed8251bf1344b311450f6d481224 |
|
BLAKE2b-256 | 2f187902638fe73e46a8a9a1a7ba96557142f4b3486ae2df3fe5767dca8b6a55 |