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.3.tar.gz
(12.1 kB
view hashes)
Built Distribution
Close
Hashes for vnpy-okex-pro-2023.4.14.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | caab7297d3979cf5b9b5343e04e5211e9c5c6271bb5942f7c67cfe3c10728a94 |
|
MD5 | f52e6cc68c03115cd10db7ff62ac3e9e |
|
BLAKE2b-256 | 9269e0f877abd14b47acdfb11ba7877e367a40706dbca929bbe61546718e57bc |
Close
Hashes for vnpy_okex_pro-2023.4.14.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0408d717a792c90bda2d8e49ee3ebe925602488c9fd242b63cbd214e73d5456c |
|
MD5 | 37d39d36ca43ab871bf5fd67cb2cfd42 |
|
BLAKE2b-256 | 103f4c8eb41f2a4f7f93de96aa6737e7aa70a6d769e287b7c8b306a8825b5d45 |