[关闭]
@hbec-public 2016-09-06T09:44:06.000000Z 字数 1576 阅读 492

【已废弃】自选股模块接口文档

接口文档

接口规范

自选股接口

1.自选股查询列表接口(2.x)

方法名

followStockService.queryStock

调用示例

  1. {site}/followStockService.queryStock?userId=55555

参数列表

参数名 类型 不可为空 说明
userId int Y 用户ID

相应结构

  1. {
  2. "message": "",
  3. "result": "1",
  4. "data": [
  5. {
  6. "followId": 70,
  7. "followsort": 9,
  8. "currentPrice": 15.900,
  9. "code": "600053"
  10. "isHasWarn": 0,
  11. "marketType": 1,
  12. "name": "中江地产",
  13. "changesPercent": 10.0300,
  14. "securityState": 0,
  15. "exchange": "SH"
  16. },
  17. {
  18. "followId": 69,
  19. "followsort": 8,
  20. "currentPrice": 15.900,
  21. "code": "600053",
  22. "isHasWarn": 0,
  23. "marketType": 1,
  24. "name": "中江地产",
  25. "changesPercent": 10.0300,
  26. "securityState": 0,
  27. "exchange": "SH"
  28. }
  29. ]
  30. }

响应字段说明

字段名 类型 说明
followId int 自选股主键ID
followsort int 排序字段
currentPrice Double 当前价格
code String 股票CODE
isHasWarn int 是否预警
marketType int 行情类型 见数据字典
name String 股票名称
changesPercent Double 涨跌幅
securityState int 证券状态 见数据字典
exchange String 交易所

2.自选股删除接口(提供批量删除)

方法名

followStockService.deleteStock

调用示例

  1. {site}/followStockService.deleteStock?userId=55555&followIds=[1,2,3]

参数列表

参数名 类型 不可为空 说明
userId int Y 用户ID
followIds int[] Y 自选股ID

响应结构

  1. {
  2. "message": "",
  3. "result": "1",
  4. "data": true
  5. }

响应字段说明

字段名 类型 说明
data boolean 返回结果:成功 true / 失败 false

3.自选股置顶功能接口

方法名

followStockService.topStock

调用示例

  1. {site}/followStockService.topStock?userId=55555&followId=1

参数列表

参数名 类型 不可为空 说明
userId int Y 用户ID
followId int Y 自选股ID

响应结构

  1. {
  2. "message": "",
  3. "result": "1",
  4. "data": true
  5. }

响应字段说明

字段名 类型 说明
data boolean 返回结构:成功 true / 失败 false

4.自选股新增

方法名

followStockService.addStock

调用示例

  1. {site}/followStockService.addStock?follow={'userId':55555,'marketType':1,'code':'600873'}

参数列表

参数名 类型 不可为空 说明
userId int Y 用户ID
marketType int Y 行情类型 见数据字典
code String Y 股票CODE

响应结构

  1. {
  2. "message": "",
  3. "result": "1",
  4. "data": 10
  5. }

相应字段说明

字段名 类型 说明
data int 自选股ID 说明:添加失败返回-1

数据字典

marketType 行情类型

含义
1 证券(包括场内基金和股票)
2 指数

securityState 证券状态

含义
0 上市
1 停牌
2 终止

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注