[Mod] add module_local for MdApi/TdApi class in pybind wrapper

This commit is contained in:
vn.py 2019-05-17 10:12:55 +08:00
parent ff7ec980e1
commit 1a583779d3
7 changed files with 6 additions and 6 deletions

View File

@ -7,9 +7,9 @@ from vnpy.trader.ui import MainWindow, create_qapp
from vnpy.gateway.bitmex import BitmexGateway
from vnpy.gateway.futu import FutuGateway
from vnpy.gateway.ib import IbGateway
#from vnpy.gateway.ctp import CtpGateway
from vnpy.gateway.ctp import CtpGateway
from vnpy.gateway.ctptest import CtptestGateway
# from vnpy.gateway.femas import FemasGateway
from vnpy.gateway.femas import FemasGateway
from vnpy.gateway.tiger import TigerGateway
from vnpy.gateway.oes import OesGateway
from vnpy.gateway.okex import OkexGateway
@ -35,9 +35,9 @@ def main():
main_engine = MainEngine(event_engine)
main_engine.add_gateway(XtpGateway)
# main_engine.add_gateway(CtpGateway)
main_engine.add_gateway(CtpGateway)
main_engine.add_gateway(CtptestGateway)
# main_engine.add_gateway(FemasGateway)
main_engine.add_gateway(FemasGateway)
main_engine.add_gateway(IbGateway)
main_engine.add_gateway(FutuGateway)
main_engine.add_gateway(BitmexGateway)

View File

@ -809,7 +809,7 @@ public:
PYBIND11_MODULE(vnctpmd, m)
{
class_<MdApi, PyMdApi> mdapi(m, "MdApi");
class_<MdApi, PyMdApi> mdapi(m, "MdApi", module_local());
mdapi
.def(init<>())
.def("createFtdcMdApi", &MdApi::createFtdcMdApi)

View File

@ -11150,7 +11150,7 @@ public:
PYBIND11_MODULE(vnctptd, m)
{
class_<TdApi, PyTdApi> TdApi(m, "TdApi");
class_<TdApi, PyTdApi> TdApi(m, "TdApi", module_local());
TdApi
.def(init<>())
.def("createFtdcTraderApi", &TdApi::createFtdcTraderApi)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.