vnpy/vn.lts/pyscript/l2/lts_l2_wrap.cpp

183 lines
2.7 KiB
C++
Raw Normal View History

2015-03-30 03:18:38 +00:00
virtual void onRspError(dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspError")(error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspUserLogin(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspUserLogin")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspUserLogout(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspUserLogout")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspSubL2MarketData(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspSubL2MarketData")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspUnSubL2MarketData(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspUnSubL2MarketData")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspSubL2Index(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspSubL2Index")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspUnSubL2Index(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspUnSubL2Index")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRtnL2MarketData(dict data)
{
PyLock lock;
try
{
this->get_override("onRtnL2MarketData")(data);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRtnL2Index(dict data)
{
PyLock lock;
try
{
this->get_override("onRtnL2Index")(data);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspSubL2OrderAndTrade(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspSubL2OrderAndTrade")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRspUnSubL2OrderAndTrade(dict data, dict error, int id, bool last)
{
PyLock lock;
try
{
this->get_override("onRspUnSubL2OrderAndTrade")(data, error, id, last);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRtnL2Order(dict data)
{
PyLock lock;
try
{
this->get_override("onRtnL2Order")(data);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};
virtual void onRtnL2Trade(dict data)
{
PyLock lock;
try
{
this->get_override("onRtnL2Trade")(data);
}
catch (error_already_set const &)
{
PyErr_Print();
}
};