vnpy/vn.ctp/pyscript/ctp_td_function.cpp

916 lines
35 KiB
C++

int TdApi::reqAuthenticate(dict req, int nRequestID)
{
CThostFtdcReqAuthenticateField myreq = CThostFtdcReqAuthenticateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "UserID", myreq.UserID);
getChar(req, "AuthCode", myreq.AuthCode);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "UserProductInfo", myreq.UserProductInfo);
int i = this->api->ReqAuthenticate(&myreq, nRequestID);
return i;
};
int TdApi::reqUserLogin(dict req, int nRequestID)
{
CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "MacAddress", myreq.MacAddress);
getChar(req, "UserProductInfo", myreq.UserProductInfo);
getChar(req, "UserID", myreq.UserID);
getChar(req, "TradingDay", myreq.TradingDay);
getChar(req, "InterfaceProductInfo", myreq.InterfaceProductInfo);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ClientIPAddress", myreq.ClientIPAddress);
getChar(req, "OneTimePassword", myreq.OneTimePassword);
getChar(req, "ProtocolInfo", myreq.ProtocolInfo);
getChar(req, "Password", myreq.Password);
int i = this->api->ReqUserLogin(&myreq, nRequestID);
return i;
};
int TdApi::reqUserLogout(dict req, int nRequestID)
{
CThostFtdcUserLogoutField myreq = CThostFtdcUserLogoutField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "UserID", myreq.UserID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqUserLogout(&myreq, nRequestID);
return i;
};
int TdApi::reqUserPasswordUpdate(dict req, int nRequestID)
{
CThostFtdcUserPasswordUpdateField myreq = CThostFtdcUserPasswordUpdateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "UserID", myreq.UserID);
getChar(req, "NewPassword", myreq.NewPassword);
getChar(req, "OldPassword", myreq.OldPassword);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqUserPasswordUpdate(&myreq, nRequestID);
return i;
};
int TdApi::reqTradingAccountPasswordUpdate(dict req, int nRequestID)
{
CThostFtdcTradingAccountPasswordUpdateField myreq = CThostFtdcTradingAccountPasswordUpdateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "NewPassword", myreq.NewPassword);
getChar(req, "OldPassword", myreq.OldPassword);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "AccountID", myreq.AccountID);
int i = this->api->ReqTradingAccountPasswordUpdate(&myreq, nRequestID);
return i;
};
int TdApi::reqOrderInsert(dict req, int nRequestID)
{
CThostFtdcInputOrderField myreq = CThostFtdcInputOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "ContingentCondition", myreq.ContingentCondition);
getChar(req, "CombOffsetFlag", myreq.CombOffsetFlag);
getChar(req, "UserID", myreq.UserID);
getChar(req, "UserID", myreq.UserID);
getInt(req, "UserForceClose", &myreq.UserForceClose);
getChar(req, "Direction", myreq.Direction);
getInt(req, "IsSwapOrder", &myreq.IsSwapOrder);
getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal);
getChar(req, "OrderPriceType", myreq.OrderPriceType);
getChar(req, "TimeCondition", myreq.TimeCondition);
getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend);
getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend);
getChar(req, "InstrumentID", myreq.InstrumentID);
getInt(req, "MinVolume", &myreq.MinVolume);
getChar(req, "ForceCloseReason", myreq.ForceCloseReason);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "CombHedgeFlag", myreq.CombHedgeFlag);
getChar(req, "GTDDate", myreq.GTDDate);
getChar(req, "BusinessUnit", myreq.BusinessUnit);
getChar(req, "OrderRef", myreq.OrderRef);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "VolumeCondition", myreq.VolumeCondition);
getInt(req, "RequestID", &myreq.RequestID);
int i = this->api->ReqOrderInsert(&myreq, nRequestID);
return i;
};
int TdApi::reqParkedOrderInsert(dict req, int nRequestID)
{
CThostFtdcParkedOrderField myreq = CThostFtdcParkedOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "ContingentCondition", myreq.ContingentCondition);
getChar(req, "CombOffsetFlag", myreq.CombOffsetFlag);
getChar(req, "UserID", myreq.UserID);
getChar(req, "UserID", myreq.UserID);
getInt(req, "UserForceClose", &myreq.UserForceClose);
getChar(req, "Status", myreq.Status);
getChar(req, "Direction", myreq.Direction);
getInt(req, "IsSwapOrder", &myreq.IsSwapOrder);
getChar(req, "UserType", myreq.UserType);
getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal);
getChar(req, "OrderPriceType", myreq.OrderPriceType);
getChar(req, "TimeCondition", myreq.TimeCondition);
getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend);
getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend);
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getInt(req, "MinVolume", &myreq.MinVolume);
getChar(req, "ForceCloseReason", myreq.ForceCloseReason);
getInt(req, "ErrorID", &myreq.ErrorID);
getChar(req, "ParkedOrderID", myreq.ParkedOrderID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "CombHedgeFlag", myreq.CombHedgeFlag);
getChar(req, "GTDDate", myreq.GTDDate);
getChar(req, "BusinessUnit", myreq.BusinessUnit);
getChar(req, "ErrorMsg", myreq.ErrorMsg);
getChar(req, "OrderRef", myreq.OrderRef);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "VolumeCondition", myreq.VolumeCondition);
getInt(req, "RequestID", &myreq.RequestID);
int i = this->api->ReqParkedOrderInsert(&myreq, nRequestID);
return i;
};
int TdApi::reqParkedOrderAction(dict req, int nRequestID)
{
CThostFtdcParkedOrderActionField myreq = CThostFtdcParkedOrderActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "Status", myreq.Status);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "ActionFlag", myreq.ActionFlag);
getInt(req, "OrderActionRef", &myreq.OrderActionRef);
getChar(req, "UserType", myreq.UserType);
getChar(req, "ErrorMsg", myreq.ErrorMsg);
getChar(req, "UserID", myreq.UserID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "OrderRef", myreq.OrderRef);
getChar(req, "InvestorID", myreq.InvestorID);
getInt(req, "SessionID", &myreq.SessionID);
getInt(req, "VolumeChange", &myreq.VolumeChange);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "OrderSysID", myreq.OrderSysID);
getChar(req, "ParkedOrderActionID", myreq.ParkedOrderActionID);
getInt(req, "FrontID", &myreq.FrontID);
getInt(req, "ErrorID", &myreq.ErrorID);
int i = this->api->ReqParkedOrderAction(&myreq, nRequestID);
return i;
};
int TdApi::reqOrderAction(dict req, int nRequestID)
{
CThostFtdcInputOrderActionField myreq = CThostFtdcInputOrderActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "ActionFlag", myreq.ActionFlag);
getInt(req, "OrderActionRef", &myreq.OrderActionRef);
getChar(req, "UserID", myreq.UserID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "OrderRef", myreq.OrderRef);
getChar(req, "InvestorID", myreq.InvestorID);
getInt(req, "SessionID", &myreq.SessionID);
getInt(req, "VolumeChange", &myreq.VolumeChange);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "OrderSysID", myreq.OrderSysID);
getInt(req, "FrontID", &myreq.FrontID);
int i = this->api->ReqOrderAction(&myreq, nRequestID);
return i;
};
int TdApi::reqQueryMaxOrderVolume(dict req, int nRequestID)
{
CThostFtdcQueryMaxOrderVolumeField myreq = CThostFtdcQueryMaxOrderVolumeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "Direction", myreq.Direction);
getChar(req, "OffsetFlag", myreq.OffsetFlag);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "MaxVolume", &myreq.MaxVolume);
int i = this->api->ReqQueryMaxOrderVolume(&myreq, nRequestID);
return i;
};
int TdApi::reqSettlementInfoConfirm(dict req, int nRequestID)
{
CThostFtdcSettlementInfoConfirmField myreq = CThostFtdcSettlementInfoConfirmField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "ConfirmTime", myreq.ConfirmTime);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ConfirmDate", myreq.ConfirmDate);
int i = this->api->ReqSettlementInfoConfirm(&myreq, nRequestID);
return i;
};
int TdApi::reqRemoveParkedOrder(dict req, int nRequestID)
{
CThostFtdcRemoveParkedOrderField myreq = CThostFtdcRemoveParkedOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ParkedOrderID", myreq.ParkedOrderID);
int i = this->api->ReqRemoveParkedOrder(&myreq, nRequestID);
return i;
};
int TdApi::reqRemoveParkedOrderAction(dict req, int nRequestID)
{
CThostFtdcRemoveParkedOrderActionField myreq = CThostFtdcRemoveParkedOrderActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ParkedOrderActionID", myreq.ParkedOrderActionID);
int i = this->api->ReqRemoveParkedOrderAction(&myreq, nRequestID);
return i;
};
int TdApi::reqExecOrderInsert(dict req, int nRequestID)
{
CThostFtdcInputExecOrderField myreq = CThostFtdcInputExecOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExecOrderRef", myreq.ExecOrderRef);
getChar(req, "CloseFlag", myreq.CloseFlag);
getChar(req, "OffsetFlag", myreq.OffsetFlag);
getChar(req, "PosiDirection", myreq.PosiDirection);
getChar(req, "BusinessUnit", myreq.BusinessUnit);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "UserID", myreq.UserID);
getInt(req, "Volume", &myreq.Volume);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "ActionType", myreq.ActionType);
getChar(req, "ReservePositionFlag", myreq.ReservePositionFlag);
int i = this->api->ReqExecOrderInsert(&myreq, nRequestID);
return i;
};
int TdApi::reqExecOrderAction(dict req, int nRequestID)
{
CThostFtdcInputExecOrderActionField myreq = CThostFtdcInputExecOrderActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExecOrderSysID", myreq.ExecOrderSysID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "ExecOrderRef", myreq.ExecOrderRef);
getChar(req, "InvestorID", myreq.InvestorID);
getInt(req, "SessionID", &myreq.SessionID);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "ActionFlag", myreq.ActionFlag);
getInt(req, "ExecOrderActionRef", &myreq.ExecOrderActionRef);
getInt(req, "FrontID", &myreq.FrontID);
int i = this->api->ReqExecOrderAction(&myreq, nRequestID);
return i;
};
int TdApi::reqForQuoteInsert(dict req, int nRequestID)
{
CThostFtdcInputForQuoteField myreq = CThostFtdcInputForQuoteField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "ForQuoteRef", myreq.ForQuoteRef);
int i = this->api->ReqForQuoteInsert(&myreq, nRequestID);
return i;
};
int TdApi::reqQuoteInsert(dict req, int nRequestID)
{
CThostFtdcInputQuoteField myreq = CThostFtdcInputQuoteField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "AskHedgeFlag", myreq.AskHedgeFlag);
getChar(req, "BusinessUnit", myreq.BusinessUnit);
getChar(req, "BusinessUnit", myreq.BusinessUnit);
getChar(req, "UserID", myreq.UserID);
getChar(req, "AskOffsetFlag", myreq.AskOffsetFlag);
getInt(req, "BidVolume", &myreq.BidVolume);
getInt(req, "AskVolume", &myreq.AskVolume);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BidOffsetFlag", myreq.BidOffsetFlag);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "BidHedgeFlag", myreq.BidHedgeFlag);
getChar(req, "QuoteRef", myreq.QuoteRef);
int i = this->api->ReqQuoteInsert(&myreq, nRequestID);
return i;
};
int TdApi::reqQuoteAction(dict req, int nRequestID)
{
CThostFtdcInputQuoteActionField myreq = CThostFtdcInputQuoteActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getInt(req, "QuoteActionRef", &myreq.QuoteActionRef);
getChar(req, "UserID", myreq.UserID);
getChar(req, "InvestorID", myreq.InvestorID);
getInt(req, "SessionID", &myreq.SessionID);
getChar(req, "BrokerID", myreq.BrokerID);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "ActionFlag", myreq.ActionFlag);
getInt(req, "FrontID", &myreq.FrontID);
getChar(req, "QuoteSysID", myreq.QuoteSysID);
getChar(req, "QuoteRef", myreq.QuoteRef);
int i = this->api->ReqQuoteAction(&myreq, nRequestID);
return i;
};
int TdApi::reqQryOrder(dict req, int nRequestID)
{
CThostFtdcQryOrderField myreq = CThostFtdcQryOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "InsertTimeStart", myreq.InsertTimeStart);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "OrderSysID", myreq.OrderSysID);
getChar(req, "InsertTimeEnd", myreq.InsertTimeEnd);
int i = this->api->ReqQryOrder(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTrade(dict req, int nRequestID)
{
CThostFtdcQryTradeField myreq = CThostFtdcQryTradeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "TradeTimeStart", myreq.TradeTimeStart);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "TradeID", myreq.TradeID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "TradeTimeEnd", myreq.TradeTimeEnd);
int i = this->api->ReqQryTrade(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInvestorPosition(dict req, int nRequestID)
{
CThostFtdcQryInvestorPositionField myreq = CThostFtdcQryInvestorPositionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryInvestorPosition(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTradingAccount(dict req, int nRequestID)
{
CThostFtdcQryTradingAccountField myreq = CThostFtdcQryTradingAccountField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryTradingAccount(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInvestor(dict req, int nRequestID)
{
CThostFtdcQryInvestorField myreq = CThostFtdcQryInvestorField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryInvestor(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTradingCode(dict req, int nRequestID)
{
CThostFtdcQryTradingCodeField myreq = CThostFtdcQryTradingCodeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ClientIDType", myreq.ClientIDType);
getChar(req, "ClientID", myreq.ClientID);
int i = this->api->ReqQryTradingCode(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInstrumentMarginRate(dict req, int nRequestID)
{
CThostFtdcQryInstrumentMarginRateField myreq = CThostFtdcQryInstrumentMarginRateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
int i = this->api->ReqQryInstrumentMarginRate(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInstrumentCommissionRate(dict req, int nRequestID)
{
CThostFtdcQryInstrumentCommissionRateField myreq = CThostFtdcQryInstrumentCommissionRateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryInstrumentCommissionRate(&myreq, nRequestID);
return i;
};
int TdApi::reqQryExchange(dict req, int nRequestID)
{
CThostFtdcQryExchangeField myreq = CThostFtdcQryExchangeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "ExchangeID", myreq.ExchangeID);
int i = this->api->ReqQryExchange(&myreq, nRequestID);
return i;
};
int TdApi::reqQryProduct(dict req, int nRequestID)
{
CThostFtdcQryProductField myreq = CThostFtdcQryProductField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "ProductClass", myreq.ProductClass);
getChar(req, "ProductID", myreq.ProductID);
int i = this->api->ReqQryProduct(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInstrument(dict req, int nRequestID)
{
CThostFtdcQryInstrumentField myreq = CThostFtdcQryInstrumentField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "ExchangeInstID", myreq.ExchangeInstID);
getChar(req, "ProductID", myreq.ProductID);
int i = this->api->ReqQryInstrument(&myreq, nRequestID);
return i;
};
int TdApi::reqQryDepthMarketData(dict req, int nRequestID)
{
CThostFtdcQryDepthMarketDataField myreq = CThostFtdcQryDepthMarketDataField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
int i = this->api->ReqQryDepthMarketData(&myreq, nRequestID);
return i;
};
int TdApi::reqQrySettlementInfo(dict req, int nRequestID)
{
CThostFtdcQrySettlementInfoField myreq = CThostFtdcQrySettlementInfoField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "TradingDay", myreq.TradingDay);
int i = this->api->ReqQrySettlementInfo(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTransferBank(dict req, int nRequestID)
{
CThostFtdcQryTransferBankField myreq = CThostFtdcQryTransferBankField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BankBrchID", myreq.BankBrchID);
getChar(req, "BankID", myreq.BankID);
int i = this->api->ReqQryTransferBank(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInvestorPositionDetail(dict req, int nRequestID)
{
CThostFtdcQryInvestorPositionDetailField myreq = CThostFtdcQryInvestorPositionDetailField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryInvestorPositionDetail(&myreq, nRequestID);
return i;
};
int TdApi::reqQryNotice(dict req, int nRequestID)
{
CThostFtdcQryNoticeField myreq = CThostFtdcQryNoticeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryNotice(&myreq, nRequestID);
return i;
};
int TdApi::reqQrySettlementInfoConfirm(dict req, int nRequestID)
{
CThostFtdcQrySettlementInfoConfirmField myreq = CThostFtdcQrySettlementInfoConfirmField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQrySettlementInfoConfirm(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInvestorPositionCombineDetail(dict req, int nRequestID)
{
CThostFtdcQryInvestorPositionCombineDetailField myreq = CThostFtdcQryInvestorPositionCombineDetailField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "CombInstrumentID", myreq.CombInstrumentID);
int i = this->api->ReqQryInvestorPositionCombineDetail(&myreq, nRequestID);
return i;
};
int TdApi::reqQryCFMMCTradingAccountKey(dict req, int nRequestID)
{
CThostFtdcQryCFMMCTradingAccountKeyField myreq = CThostFtdcQryCFMMCTradingAccountKeyField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryCFMMCTradingAccountKey(&myreq, nRequestID);
return i;
};
int TdApi::reqQryEWarrantOffset(dict req, int nRequestID)
{
CThostFtdcQryEWarrantOffsetField myreq = CThostFtdcQryEWarrantOffsetField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryEWarrantOffset(&myreq, nRequestID);
return i;
};
int TdApi::reqQryInvestorProductGroupMargin(dict req, int nRequestID)
{
CThostFtdcQryInvestorProductGroupMarginField myreq = CThostFtdcQryInvestorProductGroupMarginField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "ProductGroupID", myreq.ProductGroupID);
int i = this->api->ReqQryInvestorProductGroupMargin(&myreq, nRequestID);
return i;
};
int TdApi::reqQryExchangeMarginRate(dict req, int nRequestID)
{
CThostFtdcQryExchangeMarginRateField myreq = CThostFtdcQryExchangeMarginRateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryExchangeMarginRate(&myreq, nRequestID);
return i;
};
int TdApi::reqQryExchangeMarginRateAdjust(dict req, int nRequestID)
{
CThostFtdcQryExchangeMarginRateAdjustField myreq = CThostFtdcQryExchangeMarginRateAdjustField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryExchangeMarginRateAdjust(&myreq, nRequestID);
return i;
};
int TdApi::reqQryExchangeRate(dict req, int nRequestID)
{
CThostFtdcQryExchangeRateField myreq = CThostFtdcQryExchangeRateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "FromCurrencyID", myreq.FromCurrencyID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "ToCurrencyID", myreq.ToCurrencyID);
int i = this->api->ReqQryExchangeRate(&myreq, nRequestID);
return i;
};
int TdApi::reqQrySecAgentACIDMap(dict req, int nRequestID)
{
CThostFtdcQrySecAgentACIDMapField myreq = CThostFtdcQrySecAgentACIDMapField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "AccountID", myreq.AccountID);
int i = this->api->ReqQrySecAgentACIDMap(&myreq, nRequestID);
return i;
};
int TdApi::reqQryOptionInstrTradeCost(dict req, int nRequestID)
{
CThostFtdcQryOptionInstrTradeCostField myreq = CThostFtdcQryOptionInstrTradeCostField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "HedgeFlag", myreq.HedgeFlag);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryOptionInstrTradeCost(&myreq, nRequestID);
return i;
};
int TdApi::reqQryOptionInstrCommRate(dict req, int nRequestID)
{
CThostFtdcQryOptionInstrCommRateField myreq = CThostFtdcQryOptionInstrCommRateField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryOptionInstrCommRate(&myreq, nRequestID);
return i;
};
int TdApi::reqQryExecOrder(dict req, int nRequestID)
{
CThostFtdcQryExecOrderField myreq = CThostFtdcQryExecOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExecOrderSysID", myreq.ExecOrderSysID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "InsertTimeStart", myreq.InsertTimeStart);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "InsertTimeEnd", myreq.InsertTimeEnd);
int i = this->api->ReqQryExecOrder(&myreq, nRequestID);
return i;
};
int TdApi::reqQryForQuote(dict req, int nRequestID)
{
CThostFtdcQryForQuoteField myreq = CThostFtdcQryForQuoteField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "InsertTimeStart", myreq.InsertTimeStart);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "InsertTimeEnd", myreq.InsertTimeEnd);
int i = this->api->ReqQryForQuote(&myreq, nRequestID);
return i;
};
int TdApi::reqQryQuote(dict req, int nRequestID)
{
CThostFtdcQryQuoteField myreq = CThostFtdcQryQuoteField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "InsertTimeStart", myreq.InsertTimeStart);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "QuoteSysID", myreq.QuoteSysID);
getChar(req, "InsertTimeEnd", myreq.InsertTimeEnd);
int i = this->api->ReqQryQuote(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTransferSerial(dict req, int nRequestID)
{
CThostFtdcQryTransferSerialField myreq = CThostFtdcQryTransferSerialField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "BankID", myreq.BankID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "AccountID", myreq.AccountID);
int i = this->api->ReqQryTransferSerial(&myreq, nRequestID);
return i;
};
int TdApi::reqQryAccountregister(dict req, int nRequestID)
{
CThostFtdcQryAccountregisterField myreq = CThostFtdcQryAccountregisterField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "BankID", myreq.BankID);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "BankBranchID", myreq.BankBranchID);
getChar(req, "AccountID", myreq.AccountID);
int i = this->api->ReqQryAccountregister(&myreq, nRequestID);
return i;
};
int TdApi::reqQryContractBank(dict req, int nRequestID)
{
CThostFtdcQryContractBankField myreq = CThostFtdcQryContractBankField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "BankBrchID", myreq.BankBrchID);
getChar(req, "BankID", myreq.BankID);
int i = this->api->ReqQryContractBank(&myreq, nRequestID);
return i;
};
int TdApi::reqQryParkedOrder(dict req, int nRequestID)
{
CThostFtdcQryParkedOrderField myreq = CThostFtdcQryParkedOrderField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryParkedOrder(&myreq, nRequestID);
return i;
};
int TdApi::reqQryParkedOrderAction(dict req, int nRequestID)
{
CThostFtdcQryParkedOrderActionField myreq = CThostFtdcQryParkedOrderActionField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryParkedOrderAction(&myreq, nRequestID);
return i;
};
int TdApi::reqQryTradingNotice(dict req, int nRequestID)
{
CThostFtdcQryTradingNoticeField myreq = CThostFtdcQryTradingNoticeField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryTradingNotice(&myreq, nRequestID);
return i;
};
int TdApi::reqQryBrokerTradingParams(dict req, int nRequestID)
{
CThostFtdcQryBrokerTradingParamsField myreq = CThostFtdcQryBrokerTradingParamsField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "InvestorID", myreq.InvestorID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryBrokerTradingParams(&myreq, nRequestID);
return i;
};
int TdApi::reqQryBrokerTradingAlgos(dict req, int nRequestID)
{
CThostFtdcQryBrokerTradingAlgosField myreq = CThostFtdcQryBrokerTradingAlgosField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "InstrumentID", myreq.InstrumentID);
getChar(req, "ExchangeID", myreq.ExchangeID);
getChar(req, "BrokerID", myreq.BrokerID);
int i = this->api->ReqQryBrokerTradingAlgos(&myreq, nRequestID);
return i;
};
int TdApi::reqFromBankToFutureByFuture(dict req, int nRequestID)
{
CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BrokerBranchID", myreq.BrokerBranchID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "BankPassWord", myreq.BankPassWord);
getChar(req, "TradeTime", myreq.TradeTime);
getChar(req, "VerifyCertNoFlag", myreq.VerifyCertNoFlag);
getInt(req, "TID", &myreq.TID);
getChar(req, "AccountID", myreq.AccountID);
getChar(req, "BankAccount", myreq.BankAccount);
getInt(req, "InstallID", &myreq.InstallID);
getChar(req, "CustomerName", myreq.CustomerName);
getChar(req, "TradeCode", myreq.TradeCode);
getChar(req, "BankBranchID", myreq.BankBranchID);
getInt(req, "SessionID", &myreq.SessionID);
getChar(req, "BankID", myreq.BankID);
getChar(req, "Password", myreq.Password);
getChar(req, "BankPwdFlag", myreq.BankPwdFlag);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "CustType", myreq.CustType);
getChar(req, "IdentifiedCardNo", myreq.IdentifiedCardNo);
getChar(req, "FeePayFlag", myreq.FeePayFlag);
getChar(req, "BankSerial", myreq.BankSerial);
getChar(req, "OperNo", myreq.OperNo);
getChar(req, "TradingDay", myreq.TradingDay);
getChar(req, "BankSecuAcc", myreq.BankSecuAcc);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "DeviceID", myreq.DeviceID);
getChar(req, "TransferStatus", myreq.TransferStatus);
getChar(req, "IdCardType", myreq.IdCardType);
getInt(req, "PlateSerial", &myreq.PlateSerial);
getInt(req, "PlateSerial", &myreq.PlateSerial);
getChar(req, "TradeDate", myreq.TradeDate);
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "BankAccType", myreq.BankAccType);
getChar(req, "LastFragment", myreq.LastFragment);
getInt(req, "FutureSerial", &myreq.FutureSerial);
getChar(req, "BankSecuAccType", myreq.BankSecuAccType);
getChar(req, "BrokerIDByBank", myreq.BrokerIDByBank);
getChar(req, "SecuPwdFlag", myreq.SecuPwdFlag);
getChar(req, "Message", myreq.Message);
getChar(req, "Message", myreq.Message);
getChar(req, "Message", myreq.Message);
getChar(req, "Digest", myreq.Digest);
int i = this->api->ReqFromBankToFutureByFuture(&myreq, nRequestID);
return i;
};
int TdApi::reqFromFutureToBankByFuture(dict req, int nRequestID)
{
CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BrokerBranchID", myreq.BrokerBranchID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "BankPassWord", myreq.BankPassWord);
getChar(req, "TradeTime", myreq.TradeTime);
getChar(req, "VerifyCertNoFlag", myreq.VerifyCertNoFlag);
getInt(req, "TID", &myreq.TID);
getChar(req, "AccountID", myreq.AccountID);
getChar(req, "BankAccount", myreq.BankAccount);
getInt(req, "InstallID", &myreq.InstallID);
getChar(req, "CustomerName", myreq.CustomerName);
getChar(req, "TradeCode", myreq.TradeCode);
getChar(req, "BankBranchID", myreq.BankBranchID);
getInt(req, "SessionID", &myreq.SessionID);
getChar(req, "BankID", myreq.BankID);
getChar(req, "Password", myreq.Password);
getChar(req, "BankPwdFlag", myreq.BankPwdFlag);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "CustType", myreq.CustType);
getChar(req, "IdentifiedCardNo", myreq.IdentifiedCardNo);
getChar(req, "FeePayFlag", myreq.FeePayFlag);
getChar(req, "BankSerial", myreq.BankSerial);
getChar(req, "OperNo", myreq.OperNo);
getChar(req, "TradingDay", myreq.TradingDay);
getChar(req, "BankSecuAcc", myreq.BankSecuAcc);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "DeviceID", myreq.DeviceID);
getChar(req, "TransferStatus", myreq.TransferStatus);
getChar(req, "IdCardType", myreq.IdCardType);
getInt(req, "PlateSerial", &myreq.PlateSerial);
getInt(req, "PlateSerial", &myreq.PlateSerial);
getChar(req, "TradeDate", myreq.TradeDate);
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "BankAccType", myreq.BankAccType);
getChar(req, "LastFragment", myreq.LastFragment);
getInt(req, "FutureSerial", &myreq.FutureSerial);
getChar(req, "BankSecuAccType", myreq.BankSecuAccType);
getChar(req, "BrokerIDByBank", myreq.BrokerIDByBank);
getChar(req, "SecuPwdFlag", myreq.SecuPwdFlag);
getChar(req, "Message", myreq.Message);
getChar(req, "Message", myreq.Message);
getChar(req, "Message", myreq.Message);
getChar(req, "Digest", myreq.Digest);
int i = this->api->ReqFromFutureToBankByFuture(&myreq, nRequestID);
return i;
};
int TdApi::reqQueryBankAccountMoneyByFuture(dict req, int nRequestID)
{
CThostFtdcReqQueryAccountField myreq = CThostFtdcReqQueryAccountField();
memset(&myreq, 0, sizeof(myreq));
getChar(req, "BrokerBranchID", myreq.BrokerBranchID);
getChar(req, "UserID", myreq.UserID);
getChar(req, "BankPassWord", myreq.BankPassWord);
getChar(req, "TradeTime", myreq.TradeTime);
getChar(req, "VerifyCertNoFlag", myreq.VerifyCertNoFlag);
getInt(req, "TID", &myreq.TID);
getChar(req, "AccountID", myreq.AccountID);
getChar(req, "BankAccount", myreq.BankAccount);
getInt(req, "InstallID", &myreq.InstallID);
getChar(req, "CustomerName", myreq.CustomerName);
getChar(req, "TradeCode", myreq.TradeCode);
getChar(req, "BankBranchID", myreq.BankBranchID);
getInt(req, "SessionID", &myreq.SessionID);
getChar(req, "BankID", myreq.BankID);
getChar(req, "Password", myreq.Password);
getChar(req, "BankPwdFlag", myreq.BankPwdFlag);
getInt(req, "RequestID", &myreq.RequestID);
getChar(req, "CustType", myreq.CustType);
getChar(req, "IdentifiedCardNo", myreq.IdentifiedCardNo);
getChar(req, "BankSerial", myreq.BankSerial);
getChar(req, "OperNo", myreq.OperNo);
getChar(req, "TradingDay", myreq.TradingDay);
getChar(req, "BankSecuAcc", myreq.BankSecuAcc);
getChar(req, "BrokerID", myreq.BrokerID);
getChar(req, "DeviceID", myreq.DeviceID);
getChar(req, "IdCardType", myreq.IdCardType);
getInt(req, "PlateSerial", &myreq.PlateSerial);
getChar(req, "TradeDate", myreq.TradeDate);
getChar(req, "CurrencyID", myreq.CurrencyID);
getChar(req, "BankAccType", myreq.BankAccType);
getChar(req, "LastFragment", myreq.LastFragment);
getInt(req, "FutureSerial", &myreq.FutureSerial);
getChar(req, "BankSecuAccType", myreq.BankSecuAccType);
getChar(req, "BrokerIDByBank", myreq.BrokerIDByBank);
getChar(req, "SecuPwdFlag", myreq.SecuPwdFlag);
getChar(req, "Digest", myreq.Digest);
int i = this->api->ReqQueryBankAccountMoneyByFuture(&myreq, nRequestID);
return i;
};