QUANTBOXC2XSPEED_API int __stdcall TD_SendOrder( void* pTraderApi, long localOrderID, const char* szInstrumentId, DFITCBuySellTypeType sBuySellType, DFITCOpenCloseTypeType sOpenCloseType, DFITCSpeculatorType sSpeculator, DFITCAmountType lAmount, DFITCPriceType dbPrice, DFITCOrderTypeType orderType, DFITCOrderPropertyType orderProperty, DFITCInstrumentTypeType nInstrumentType, DFITCInsertType insertType) { if(pTraderApi &&szInstrumentId) { return TD_GetApi(pTraderApi)->ReqInsertOrder( localOrderID, szInstrumentId, sBuySellType, sOpenCloseType, sSpeculator, lAmount, dbPrice, orderType, orderProperty, nInstrumentType, insertType); } return 0; }
QUANTBOXC2CTP_API void __stdcall TD_ReqQryInvestorPositionDetail(void* pTraderApi,const char* szInstrumentId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryInvestorPositionDetail(NULL==szInstrumentId?"":szInstrumentId); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryDepthMarketData(void* pTraderApi,const char* szInstrumentId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryDepthMarketData(szInstrumentId); } }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQuoteSubscribe(void* pTraderApi) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQuoteSubscribe(); } }
QUANTBOXC2CTP_API int __stdcall TD_SendQuote( void* pTraderApi, int QuoteRef, const char* szInstrument, double AskPrice, double BidPrice, int AskVolume, int BidVolume, TThostFtdcOffsetFlagType AskOffsetFlag, TThostFtdcOffsetFlagType BidOffsetFlag, TThostFtdcHedgeFlagType AskHedgeFlag, TThostFtdcHedgeFlagType BidHedgeFlag) { if (pTraderApi &&szInstrument) { return TD_GetApi(pTraderApi)->ReqQuoteInsert( QuoteRef, szInstrument, AskPrice, BidPrice, AskVolume, BidVolume, AskOffsetFlag, BidOffsetFlag, AskHedgeFlag, BidHedgeFlag); } return 0; }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQrySpecifyInstrument(void* pTraderApi,const char* szInstrumentId,const char* szExchangeId,DFITCInstrumentTypeType instrumentType) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQrySpecifyInstrument(szInstrumentId,szExchangeId,instrumentType); } }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryOrderInfo(void* pTraderApi,DFITCInstrumentTypeType instrumentType) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryOrderInfo(instrumentType); } }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryArbitrageInstrument(void* pTraderApi,const char* szExchangeId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryArbitrageInstrument(szExchangeId); } }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryCustomerCapital(void* pTraderApi) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryCustomerCapital(); } }
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryPositionDetail(void* pTraderApi,const char* szInstrumentId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryPositionDetail(szInstrumentId); } }
QUANTBOXC2CTP_API void __stdcall TD_CancelQuote(void* pTraderApi, CThostFtdcQuoteField *pQuote) { if (pTraderApi) { TD_GetApi(pTraderApi)->ReqQuoteAction(pQuote); } }
QUANTBOXC2CTP_API void __stdcall TD_ReqQryInstrumentMarginRate(void* pTraderApi,const char* szInstrumentId,TThostFtdcHedgeFlagType HedgeFlag) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryInstrumentMarginRate(szInstrumentId,HedgeFlag); } }
QUANTBOXC2XSPEED_API void __stdcall TD_RegMsgQueue2TdApi(void* pTraderApi,void* pMsgQueue) { if(pTraderApi) { TD_GetApi(pTraderApi)->RegisterMsgQueue((CXSpeedMsgQueue*)pMsgQueue); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryInstrumentCommissionRate(void* pTraderApi,const char* szInstrumentId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryInstrumentCommissionRate(szInstrumentId); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryTradingAccount(void* pTraderApi) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryTradingAccount(); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryInstrument(void* pTraderApi,const char* szInstrumentId) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqQryInstrument(NULL==szInstrumentId?"":szInstrumentId); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_Disconnect(void* pTraderApi) { if(pTraderApi) { TD_GetApi(pTraderApi)->Disconnect(); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_ReleaseTdApi(void* pTraderApi) { if(pTraderApi) { delete TD_GetApi(pTraderApi); } }
QUANTBOXC2CTPZQ_API int __stdcall TD_SendOrder( void* pTraderApi, const char* szInstrument, const char* szExchange, TZQThostFtdcDirectionType Direction, const char* szCombOffsetFlag, const char* szCombHedgeFlag, TZQThostFtdcVolumeType VolumeTotalOriginal, TZQThostFtdcStockPriceType LimitPrice, TZQThostFtdcOrderPriceTypeType OrderPriceType, TZQThostFtdcTimeConditionType TimeCondition, TZQThostFtdcContingentConditionType ContingentCondition, double StopPrice) { if(pTraderApi &&szInstrument &&szCombOffsetFlag &&szCombHedgeFlag) { return TD_GetApi(pTraderApi)->ReqOrderInsert(szInstrument, szExchange, Direction, szCombOffsetFlag, szCombHedgeFlag, VolumeTotalOriginal, LimitPrice, OrderPriceType, TimeCondition, ContingentCondition, StopPrice); } return 0; }
QUANTBOXC2CTPZQ_API void __stdcall TD_CancelOrder(void* pTraderApi,CZQThostFtdcOrderField *pOrder) { if(pTraderApi) { TD_GetApi(pTraderApi)->ReqOrderAction(pOrder); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_RegMsgQueue2TdApi(void* pTraderApi,void* pMsgQueue) { if(pTraderApi) { TD_GetApi(pTraderApi)->RegisterMsgQueue((CCTPZQMsgQueue*)pMsgQueue); } }
QUANTBOXC2CTP_API void __stdcall TD_ReqQrySettlementInfo(void* pTraderApi, const char* szTradingDay) { if (pTraderApi) { TD_GetApi(pTraderApi)->ReqQrySettlementInfo(szTradingDay); } }
QUANTBOXC2CTPZQ_API void __stdcall TD_Connect( void* pTraderApi, const char* szPath, const char* szAddresses, const char* szBrokerId, const char* szInvestorId, const char* szPassword, ZQTHOST_TE_RESUME_TYPE nResumeType, const char* szUserProductInfo, const char* szAuthCode) { if(pTraderApi &&szPath &&szAddresses &&szBrokerId &&szInvestorId &&szPassword) { if(szUserProductInfo&&szAuthCode) TD_GetApi(pTraderApi)->Connect(szPath,szAddresses,szBrokerId,szInvestorId,szPassword,nResumeType,szUserProductInfo,szAuthCode); else TD_GetApi(pTraderApi)->Connect(szPath,szAddresses,szBrokerId,szInvestorId,szPassword,nResumeType,"",""); } }
QUANTBOXC2XSPEED_API void __stdcall TD_CancelQuoteOrder( void* pTraderApi, const char* szInstrumentId, DFITCLocalOrderIDType localOrderID, DFITCSPDOrderIDType spdOrderID) { if(pTraderApi &&szInstrumentId) { TD_GetApi(pTraderApi)->ReqQuoteCancelOrder( szInstrumentId, localOrderID, spdOrderID); } }
QUANTBOXC2XSPEED_API void __stdcall TD_Connect( void* pTraderApi, const char* szSvrAddr, const char* szAccountID, const char* szPassword, short sCompanyID) { if(pTraderApi &&szSvrAddr &&szAccountID &&szPassword) { TD_GetApi(pTraderApi)->Connect(szSvrAddr,szAccountID,szPassword,sCompanyID); } }
QUANTBOXC2XSPEED_API int __stdcall TD_SendQuoteOrder( void* pTraderApi, long localOrderID, const char* szInstrumentId, const char* quoteID, DFITCAmountType bOrderAmount, DFITCAmountType sOrderAmount, DFITCPriceType bInsertPrice, DFITCPriceType sInsertPrice, DFITCOpenCloseTypeType bOpenCloseType, DFITCOpenCloseTypeType sOpenCloseType, DFITCSpeculatorType bSpeculator, DFITCSpeculatorType sSpeculator, DFITCStayTimeType stayTime, DFITCInstrumentTypeType nInstrumentType) { if(pTraderApi &&szInstrumentId) { return TD_GetApi(pTraderApi)->ReqQuoteInsert( localOrderID, szInstrumentId, quoteID, bOrderAmount, sOrderAmount, bInsertPrice, sInsertPrice, bOpenCloseType, sOpenCloseType, bSpeculator, sSpeculator, stayTime, nInstrumentType); } return 0; }