@hbec-public
2016-09-06T09:44:06.000000Z
字数 1576
阅读 492
接口文档方法名
followStockService.queryStock
调用示例
{site}/followStockService.queryStock?userId=55555
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
相应结构
{"message": "","result": "1","data": [{"followId": 70,"followsort": 9,"currentPrice": 15.900,"code": "600053""isHasWarn": 0,"marketType": 1,"name": "中江地产","changesPercent": 10.0300,"securityState": 0,"exchange": "SH"},{"followId": 69,"followsort": 8,"currentPrice": 15.900,"code": "600053","isHasWarn": 0,"marketType": 1,"name": "中江地产","changesPercent": 10.0300,"securityState": 0,"exchange": "SH"}]}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| followId | int | 自选股主键ID |
| followsort | int | 排序字段 |
| currentPrice | Double | 当前价格 |
| code | String | 股票CODE |
| isHasWarn | int | 是否预警 |
| marketType | int | 行情类型 见数据字典 |
| name | String | 股票名称 |
| changesPercent | Double | 涨跌幅 |
| securityState | int | 证券状态 见数据字典 |
| exchange | String | 交易所 |
方法名
followStockService.deleteStock
调用示例
{site}/followStockService.deleteStock?userId=55555&followIds=[1,2,3]
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
| followIds | int[] | Y | 自选股ID |
响应结构
{"message": "","result": "1","data": true}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| data | boolean | 返回结果:成功 true / 失败 false |
方法名
followStockService.topStock
调用示例
{site}/followStockService.topStock?userId=55555&followId=1
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
| followId | int | Y | 自选股ID |
响应结构
{"message": "","result": "1","data": true}
响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| data | boolean | 返回结构:成功 true / 失败 false |
方法名
followStockService.addStock
调用示例
{site}/followStockService.addStock?follow={'userId':55555,'marketType':1,'code':'600873'}
参数列表
| 参数名 | 类型 | 不可为空 | 说明 |
|---|---|---|---|
| userId | int | Y | 用户ID |
| marketType | int | Y | 行情类型 见数据字典 |
| code | String | Y | 股票CODE |
响应结构
{"message": "","result": "1","data": 10}
相应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| data | int | 自选股ID 说明:添加失败返回-1 |
marketType 行情类型| 值 | 含义 |
|---|---|
| 1 | 证券(包括场内基金和股票) |
| 2 | 指数 |
securityState 证券状态| 值 | 含义 |
|---|---|
| 0 | 上市 |
| 1 | 停牌 |
| 2 | 终止 |