[Mod] add module_local for MdApi/TdApi class in pybind wrapper
This commit is contained in:
parent
ff7ec980e1
commit
1a583779d3
@ -7,9 +7,9 @@ from vnpy.trader.ui import MainWindow, create_qapp
|
|||||||
from vnpy.gateway.bitmex import BitmexGateway
|
from vnpy.gateway.bitmex import BitmexGateway
|
||||||
from vnpy.gateway.futu import FutuGateway
|
from vnpy.gateway.futu import FutuGateway
|
||||||
from vnpy.gateway.ib import IbGateway
|
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.ctptest import CtptestGateway
|
||||||
# from vnpy.gateway.femas import FemasGateway
|
from vnpy.gateway.femas import FemasGateway
|
||||||
from vnpy.gateway.tiger import TigerGateway
|
from vnpy.gateway.tiger import TigerGateway
|
||||||
from vnpy.gateway.oes import OesGateway
|
from vnpy.gateway.oes import OesGateway
|
||||||
from vnpy.gateway.okex import OkexGateway
|
from vnpy.gateway.okex import OkexGateway
|
||||||
@ -35,9 +35,9 @@ def main():
|
|||||||
|
|
||||||
main_engine = MainEngine(event_engine)
|
main_engine = MainEngine(event_engine)
|
||||||
main_engine.add_gateway(XtpGateway)
|
main_engine.add_gateway(XtpGateway)
|
||||||
# main_engine.add_gateway(CtpGateway)
|
main_engine.add_gateway(CtpGateway)
|
||||||
main_engine.add_gateway(CtptestGateway)
|
main_engine.add_gateway(CtptestGateway)
|
||||||
# main_engine.add_gateway(FemasGateway)
|
main_engine.add_gateway(FemasGateway)
|
||||||
main_engine.add_gateway(IbGateway)
|
main_engine.add_gateway(IbGateway)
|
||||||
main_engine.add_gateway(FutuGateway)
|
main_engine.add_gateway(FutuGateway)
|
||||||
main_engine.add_gateway(BitmexGateway)
|
main_engine.add_gateway(BitmexGateway)
|
||||||
|
@ -809,7 +809,7 @@ public:
|
|||||||
|
|
||||||
PYBIND11_MODULE(vnctpmd, m)
|
PYBIND11_MODULE(vnctpmd, m)
|
||||||
{
|
{
|
||||||
class_<MdApi, PyMdApi> mdapi(m, "MdApi");
|
class_<MdApi, PyMdApi> mdapi(m, "MdApi", module_local());
|
||||||
mdapi
|
mdapi
|
||||||
.def(init<>())
|
.def(init<>())
|
||||||
.def("createFtdcMdApi", &MdApi::createFtdcMdApi)
|
.def("createFtdcMdApi", &MdApi::createFtdcMdApi)
|
||||||
|
@ -11150,7 +11150,7 @@ public:
|
|||||||
|
|
||||||
PYBIND11_MODULE(vnctptd, m)
|
PYBIND11_MODULE(vnctptd, m)
|
||||||
{
|
{
|
||||||
class_<TdApi, PyTdApi> TdApi(m, "TdApi");
|
class_<TdApi, PyTdApi> TdApi(m, "TdApi", module_local());
|
||||||
TdApi
|
TdApi
|
||||||
.def(init<>())
|
.def(init<>())
|
||||||
.def("createFtdcTraderApi", &TdApi::createFtdcTraderApi)
|
.def("createFtdcTraderApi", &TdApi::createFtdcTraderApi)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user