ipo_buy - 新股新债申购
注:仅在实盘中可以使用
函数原型:
Order ipo_buy(const char *symbol, int volume, double price, const char *account = NULL);
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | const char * | 标的代码,只能单个标的 |
| volume | int | 委托数量 |
| price | double | 申购价 |
| account | const char * | 实盘账号id,关联多实盘账号时填写,可以从 get_accounts获取,也可以从终端实盘账号配置里拷贝。如果策略只关联一个账号,可以设置为NULL |
| 返回值 | Order | 一个Order结构, 如果函数调用失败, Order.status 值为 OrderStatus_Rejected, Order.ord_rej_reason_detail 为错误原因描述, 其它情况表示函数调用成功,Order.cl_ord_id 为本次委托的标识,可用于追溯订单状态或撤单 |
示例:
//申购1000股的SHSE.688001Order o = ipo_buy("SHSE.688001", 1000, 42.0);
ipo_get_quota - 查询客户新股新债申购额度
注:仅在实盘中可以使用
函数原型:
DataArray<IPOQI>* ipo_get_quota(const char *account = NULL);
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| account | const char * | 实盘账号id,关联多实盘账号时填写,可以从 get_accounts获取,也可以从终端实盘账号配置里拷贝。如果策略只关联一个账号,可以设置为NULL |
| 返回值 | DataArray<IPOQI>* |
返回每个板块的申购额度 |
示例:
DataArray<IPOQI>*da = ipo_get_quota();
ipo_get_instruments - 查询当日新股新债清单
注:仅在实盘中可以使用
函数原型:
DataArray<IPOInstruments>* ipo_get_instruments(int security_type, const char *account = NULL);
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| security_type | int | 指定要查询的品种,参见枚举SecurityType |
| account | const char * | 实盘账号id,关联多实盘账号时填写,可以从 get_accounts获取,也可以从终端实盘账号配置里拷贝。如果策略只关联一个账号,可以设置为NULL |
| 返回值 | DataArray<IPOInstruments>* |
一个IPOInstruments结构数组 |
ipo_get_match_number - 配号查询
注:仅在实盘中可以使用
函数原型:
DataArray<IPOMatchNumber>* ipo_get_match_number(const char *account = NULL);
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| account | const char * | 实盘账号id,关联多实盘账号时填写,可以从 get_accounts获取,也可以从终端实盘账号配置里拷贝。如果策略只关联一个账号,可以设置为NULL |
| 返回值 | DataArray<IPOMatchNumber>* |
一个IPOMatchNumber结构数组 |
ipo_get_lot_info - 中签查询
注:仅在实盘中可以使用
函数原型:
DataArray<IPOLotInfo>* ipo_get_lot_info(const char *account = NULL);
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| account | const char * | 实盘账号id,关联多实盘账号时填写,可以从 get_accounts获取,也可以从终端实盘账号配置里拷贝。如果策略只关联一个账号,可以设置为NULL |
| 返回值 | DataArray<IPOLotInfo>* |
一个IPOLotInfo结构数组 |