void ReqOrderInsert()
{
ThostFtdcInputOrderField req = new ThostFtdcInputOrderField();
//经纪公司代码
req.BrokerID = BROKER_ID;
//投资者代码
req.InvestorID = INVESTOR_ID;
//合约代码
req.InstrumentID = INSTRUMENT_ID;
//报单引用
req.OrderRef = ORDER_REF;
//报单价格条件: 限价
req.OrderPriceType = KSFT.EnumOrderPriceTypeType.LimitPrice;
//买卖方向:
req.Direction = DIRECTION;
//组合开平标志: 开仓
req.CombOffsetFlag_0 = KSFT.EnumOffsetFlagType.Open;
//组合投机套保标志
req.CombHedgeFlag_0 = KSFT.EnumHedgeFlagType.Speculation;
//价格
req.LimitPrice = LIMIT_PRICE;
//数量: 1
req.VolumeTotalOriginal = 1;
//有效期类型: 当日有效
req.TimeCondition = KSFT.EnumTimeConditionType.GFD;
//成交量类型: 任何数量
req.VolumeCondition = KSFT.EnumVolumeConditionType.AV;
//最小成交量: 1
req.MinVolume = 1;
//触发条件: 立即
req.ContingentCondition = KSFT.EnumContingentConditionType.Immediately;
//强平原因: 非强平
req.ForceCloseReason = KSFT.EnumForceCloseReasonType.NotForceClose;
//自动挂起标志: 否
req.IsAutoSuspend = 0;
//请求编号
req.RequestID = iRequestID;
//用户强评标志: 否
req.UserForceClose = 0;
int iResult = api.ReqOrderInsert(req, ++iRequestID);
Console.WriteLine("--->>> 报单录入请求: " + ((iResult == 0) ? "成功" : "失败"));
}