vnpy/vn.archive/vn.lts_old/pyscript/l2/lts_l2_function.cpp
WOLF 47d8f1d0d3 增加金仕达期权接口的封装vn.ksotp,并已加入vn.trader。
同时对vn.trader的CTA模块进行了一些修改。
2015-12-09 11:19:45 +08:00

24 lines
751 B
C++

int TdApi::reqUserLogin(dict req, int nRequestID)
{
CSecurityFtdcUserLoginField myreq = CSecurityFtdcUserLoginField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "TradingDay", myreq.TradingDay);
getChar(req, "Password", myreq.Password);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "DataLevel", myreq.DataLevel);
getChar(req, "UserID", myreq.UserID);
int i = this->api->ReqUserLogin(&myreq, nRequestID);
return i;
};
int TdApi::reqUserLogout(dict req, int nRequestID)
{
CSecurityFtdcUserLogoutField myreq = CSecurityFtdcUserLogoutField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "UserID", myreq.UserID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqUserLogout(&myreq, nRequestID);
return i;
};