@hbec-public
2016-10-19T07:58:25.000000Z
字数 3492
阅读 629
接口文档 模块划分
方法名,@since 3.x
followStockService.follow
调用示例
加密接口,需要_b_ \ _e_{site}/followStockService.follow?p={'securityType':3,'stockCode':'150012','stockName':'国联安双禧中证100A','exchange':'SH','subFundType':11}
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| securityType | int | Y | 参考securityType |
| subFundType | int | Y | 基金二级分类,参考subFundType |
| stockCode | String | Y | 股票code |
| stockName | String | Y | 股票名称 |
| exchange | String | Y | 交易所 |
响应结构
{"message":"","result":"1","data":308593}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| result | String | "" |
| message | String | “” |
| data | int | 自选股主键followId, != null && >0 表示请求成功 |
方法名
followStockService.add
调用示例
{site}/followStockService.add?model={'userId':2,'deviceId':'aa-sd-232-232rrr','followType':3,'bondType':11,'bondCode':'150012'}
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
| deviceId | String | Y | 设备id |
| followType | int | Y | 参考followType |
| bondType | int | Y | 参考bondType |
| bondCode | String | Y | 关注code |
响应结构
{"message":"","result":"1","data":308593}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| result | String | "" |
| result | String | “” |
| data | int | 自选followId |
方法名,@since 3.x
followStockService.query
旧版地址
https://www.zybuluo.com/hbec-public/note/164774#1查询自选股列表接口支持股票指数分级基金
调用示例
加密接口,需要_b_ \ _e_{site}/followStockService.query
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|
响应结构
{"result": "1","data": [{"stockCode": '94169',"stockName": "2","currentPrice": "080c111d738","changesPercent": "华锦股份","exchange": "000059","followId": 0,"securityType": 3,"bondTypeunit": "元","sort": 0,"isHasWarn": 1},{"changesPercent":10.04,"stockCode":"002427","currentPrice":12.93,"exchange":"SZ","followId":138419,"securityType":4,"sort":2951,"isHasWarn":0,"stockName":"尤夫股份",}]}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| stockCode | String | 股票code |
| stockName | String | 股票名称 |
| currentPrice | Double | 当前价 |
| changesPercent | Double | 涨跌幅 |
| exchange | String | 交易所 |
| followId | int | 自选股主键id,可根据id != null && id >0,判断是否为自选 |
| sort | Y | *新增出参: 排序,对应之前的followsort |
| securityType | Y | *新增出参: 证券类型,对应FollowType,数据字典 |
| Y | ||
| Y | ||
| String | ||
| int | ||
| isHasWarn | int | 是否包含预警 |
| securityState | int | 参见securityState |
| pinyinAbbr | String | 股票名称拼音简称,如果数据库中没有股票名称则返回"" |
删除自选股接口(提供批量删除)
方法名,@since 3.x
followStockService.unfollow
调用示例
加密接口,需要_b_ \ _e_{site}/followStockService.unfollow?followIds=[1, 2, 3]
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| int | Y | ||
| followIds | int[] | Y | 自选股id,来自自选股列表返回结果 |
响应结构
{"message": "1","result": "1","data": true}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| result | String | 1 |
| message | String | 1 |
| data | boolean | true 表示操作成功 |
方法名
followStockService.queryFollowStock
调用示例
{site}/followStockService.queryFollowStock?follow={'userId':'2'}
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
响应结构
{"result": "1","data": [{"code": '94169',"name": "2","currentPrice": "080c111d738","changesPercent": "华锦股份","exchange": "000059","followId": 0,"followType": 8,"bondTypeunit": "元","followsort": "0","follow": 1,"isHasWarn": 1},{"bondType":20,"changesPercent":10.04,"code":"002427","currentPrice":12.93,"exchange":"SZ","follow":0,"followId":138419,"followType":4,"followsort":"2951","isHasWarn":0,"name":"尤夫股份",}]}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| code | String | 股票code |
| name | String | 股票名称 |
| currentPrice | Double | 当前价 |
| changesPercent | Double | 涨跌幅 |
| exchange | String | 交易所 |
| followId | int | 自选股主键id |
| followType | int | 3:关注场内基金 4:关注股票 5:关注指数 |
| bondType | int | 10:分级A,11:分级B, 20:股票 21:指数, 22:ETF交易型开放式指数基金 23:LOF上市型开放式基金' |
| followsort | String | 排序字段 |
| follow | int | 是否自选 |
| isHasWarn | int | 是否包含预警 |
| securityState | int | 参见securityState |
方法名,@since 3.x
followStockService.stickStock
调用示例
加密接口,需要_b_ \ _e_{site}/followStockService.stickStock?followId=111232
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| followId | int | Y | 自选股id |
响应结构
{"message": "1","result": "1","data": true}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| result | String | 1 |
| message | String | 1 |
| data | boolean | true 表示操作成功 |
方法名
followStockService.unfollow
调用示例
{site}/followStockService.unfollow?userId=2&followIds=[1, 2, 3]
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
| followIds | int[] | Y | 自选股id,来自自选股列表返回结果 |
响应结构
{"result": "1","data": true}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| result | String | 1 |
| data | boolean | 操作结果 true or false |