示例#1
0
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;
}
示例#2
0
QUANTBOXC2CTP_API void __stdcall TD_ReqQryInvestorPositionDetail(void* pTraderApi,const char* szInstrumentId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryInvestorPositionDetail(NULL==szInstrumentId?"":szInstrumentId);
	}
}
示例#3
0
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryDepthMarketData(void* pTraderApi,const char* szInstrumentId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryDepthMarketData(szInstrumentId);
	}
}
示例#4
0
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQuoteSubscribe(void* pTraderApi)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQuoteSubscribe();
	}
}
示例#5
0
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;
}
示例#6
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);
	}
}
示例#7
0
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryOrderInfo(void* pTraderApi,DFITCInstrumentTypeType instrumentType)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryOrderInfo(instrumentType);
	}
}
示例#8
0
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryArbitrageInstrument(void* pTraderApi,const char* szExchangeId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryArbitrageInstrument(szExchangeId);
	}
}
示例#9
0
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryCustomerCapital(void* pTraderApi)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryCustomerCapital();
	}
}
示例#10
0
QUANTBOXC2XSPEED_API void __stdcall TD_ReqQryPositionDetail(void* pTraderApi,const char* szInstrumentId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryPositionDetail(szInstrumentId);
	}
}
示例#11
0
QUANTBOXC2CTP_API void __stdcall TD_CancelQuote(void* pTraderApi, CThostFtdcQuoteField *pQuote)
{
	if (pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQuoteAction(pQuote);
	}
}
示例#12
0
QUANTBOXC2CTP_API void __stdcall TD_ReqQryInstrumentMarginRate(void* pTraderApi,const char* szInstrumentId,TThostFtdcHedgeFlagType HedgeFlag)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryInstrumentMarginRate(szInstrumentId,HedgeFlag);
	}
}
示例#13
0
QUANTBOXC2XSPEED_API void __stdcall TD_RegMsgQueue2TdApi(void* pTraderApi,void* pMsgQueue)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->RegisterMsgQueue((CXSpeedMsgQueue*)pMsgQueue);
	}
}
示例#14
0
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryInstrumentCommissionRate(void* pTraderApi,const char* szInstrumentId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryInstrumentCommissionRate(szInstrumentId);
	}
}
示例#15
0
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryTradingAccount(void* pTraderApi)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryTradingAccount();
	}
}
示例#16
0
QUANTBOXC2CTPZQ_API void __stdcall TD_ReqQryInstrument(void* pTraderApi,const char* szInstrumentId)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQryInstrument(NULL==szInstrumentId?"":szInstrumentId);
	}
}
示例#17
0
QUANTBOXC2CTPZQ_API void __stdcall TD_Disconnect(void* pTraderApi)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->Disconnect();
	}
}
示例#18
0
QUANTBOXC2CTPZQ_API void __stdcall TD_ReleaseTdApi(void* pTraderApi)
{
	if(pTraderApi)
	{
		delete TD_GetApi(pTraderApi);
	}
}
示例#19
0
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;
}
示例#20
0
QUANTBOXC2CTPZQ_API void __stdcall TD_CancelOrder(void* pTraderApi,CZQThostFtdcOrderField *pOrder)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqOrderAction(pOrder);
	}
}
示例#21
0
QUANTBOXC2CTPZQ_API void __stdcall TD_RegMsgQueue2TdApi(void* pTraderApi,void* pMsgQueue)
{
	if(pTraderApi)
	{
		TD_GetApi(pTraderApi)->RegisterMsgQueue((CCTPZQMsgQueue*)pMsgQueue);
	}
}
示例#22
0
QUANTBOXC2CTP_API void __stdcall TD_ReqQrySettlementInfo(void* pTraderApi, const char* szTradingDay)
{
	if (pTraderApi)
	{
		TD_GetApi(pTraderApi)->ReqQrySettlementInfo(szTradingDay);
	}
}
示例#23
0
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,"","");
	}
}
示例#24
0
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);
	}
}
示例#25
0
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);
	}
}
示例#26
0
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;
}