跳转至

ReqForQuoteInsert

询价录入请求

错误响应: OnErrRtnForQuoteInsertOnRspForQuoteInsert

正确响应: OnRtnForQuoteRsp

详见做市商询价和报价

关于接口中的重要序号说明详见接口中一些重要序号说明

1. 函数原型

virtual int ReqForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, int nRequestID) = 0;

2. 参数

pInputForQuote:输入的询价

字段类型字段名称含义
TThostFtdcBrokerIDType BrokerID 经纪公司代码 必填
TThostFtdcInvestorIDType InvestorID 投资者代码 必填
TThostFtdcInstrumentIDType InstrumentID 合约代码 期权合约名称
TThostFtdcOrderRefType ForQuoteRef 询价引用 选填
TThostFtdcUserIDType UserID 用户代码
TThostFtdcExchangeIDType ExchangeID 交易所代码
TThostFtdcInvestUnitIDType InvestUnitID 投资单元代码
TThostFtdcIPAddressType IPAddress IP地址
TThostFtdcMacAddressType MacAddress Mac地址
TThostFtdcOldInstrumentIDType reserve1 保留的无效字段

ForQuoteRef:需要纯数字递增,不填则ctp自动填写

IPAddress:手工填写本机IP地址,不自动获取。填写规则如下:ipv4原样填写,ipv6要转成非零压缩地址,即原始地址,同时要去掉冒号,eg:AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH

nRequestID:请求ID,对应响应里的nRequestID,无递增规则,由用户自行维护。

3. 返回

0,代表成功。

-1,表示网络连接失败;

-2,表示未处理请求超过许可数;

-3,表示每秒发送请求数超过许可数。

4. 调用示例

CThostFtdcInputForQuoteField a = { 0 };
strcpy_s(a.BrokerID, "9999");
strcpy_s(a.InvestorID, "1000001");
strcpy_s(a.InstrumentID, "rb1809");
strcpy_s(a.UserID, "1000001");
strcpy_s(a.ExchangeID, "SHFE");
m_pUserApi->ReqForQuoteInsert(&a, nRequestID++);

5. FAQ

询价时报:“没有该合约的做市商”?

询价合约不对。