接口说明: 返回指定日期指定编码的指数信息. 股票编码一次最多传送50个.
接口地址: https://i.h0.cn/log.php
返回格式: json
请求方式: HTTP协议,支持GET
/POST
方法。
调试工具: 测试工具
参数名称 | 类型 | 示例值 | 必须 | 描述 |
m_id | Int | 10001 | 是 | 好灵数据网 会员MID |
sign | String | 698d51a19d8a121ce581499d7b701668 | 是 | 数字签名 sign = md5( $token . md5($bjtime)) [PHP CODE: $token = 您的token; $bjtime = date("YmdHi")] [说明: $bjtime = date("YmdHi") 即:$bjtime = "年月日时分";即:201801010930;] |
参数名称 | 类型 | 默认值 | 示例值 | 必须 | 描述 |
actNmae | String | zhiShu | 是 | 接口名称(固定: actName=zhiShu) | |
gcodes | Int | sz300251,sz300021 | 是 | 返回sh000001,sh000002对应的历史股票指数 | |
date | Int | 20190530 | 是 | 返回日期是20190530日的指数编号是sh000001,sh000002对应的历史股票指数 |
以JSON
格式返回结果。
名称 | 类型 | 示例值 | 描述 |
msg | String | 接口执行情况描述。 | |
code | int | 100 | 好灵数据网 接口执行状态,正数代表执行成功,负数代表执行失败。 100, 接口成功,数据查询成功. -101,系统签名sign验证失败 |
名称 | 类型 | 示例值 | 描述 |
data | array[] | 股票分类列表 | |
- s_date | String | 日期 | |
- s_zscode | String | 指数编号 | |
- s_zsname | String | 指数名称 | |
- s_kaipan | String | 指数开盘数值 | |
- s_zuigao | String | 当日最高指数 | |
- s_zuidi | String | 当日最低指数 | |
- s_shoupan | String | 当日收盘指数 | |
- s_zuoshou | String | 昨日收盘指数 | |
- s_cjgu | String | 成交股数 | |
- s_cjprice | String | 成交价值 | |
- s_sdprice | String | 当日指数升跌值 | |
- s_sdbili | String | 指数名称 | |
- s_gdchabi | String | 当日指数升跌比例 |
{"code":100,"msg":"\u6570\u636e\u83b7\u53d6\u6210\u529f.","dataNums":2,"data":[{"s_date":"20190529","s_zscode":"sh000002","s_kaipan":"3031.89","s_zuigao":"3074.03","s_zuidi":"3027.52","s_shoupan":"3052.74","s_zuoshou":"3047.74","s_cjgu":"1988110","s_cjprice":"20276806.00","s_sdprice":"5.000","s_sdbili":"0.160","s_gdchabi":"1.530"},{"s_date":"20190529","s_zscode":"sh000003","s_kaipan":"291.05","s_zuigao":"292.15","s_zuidi":"290.18","s_shoupan":"291.41","s_zuoshou":"290.53","s_cjgu":"1478","s_cjprice":"8697.38","s_sdprice":"0.880","s_sdbili":"0.300","s_gdchabi":"0.680"}]}JSON转数组后:
Array ( [code] => 100 [msg] => 数据获取成功. [dataNums] => 2 [data] => Array ( [0] => Array ( [s_date] => 20190529 [s_zscode] => sh000002 [s_kaipan] => 3031.89 [s_zuigao] => 3074.03 [s_zuidi] => 3027.52 [s_shoupan] => 3052.74 [s_zuoshou] => 3047.74 [s_cjgu] => 1988110 [s_cjprice] => 20276806.00 [s_sdprice] => 5.000 [s_sdbili] => 0.160 [s_gdchabi] => 1.530 ) [1] => Array ( [s_date] => 20190529 [s_zscode] => sh000003 [s_kaipan] => 291.05 [s_zuigao] => 292.15 [s_zuidi] => 290.18 [s_shoupan] => 291.41 [s_zuoshou] => 290.53 [s_cjgu] => 1478 [s_cjprice] => 8697.38 [s_sdprice] => 0.880 [s_sdbili] => 0.300 [s_gdchabi] => 0.680 ) ) )