跳至主要內容

基础信息

大约 3 分钟

基础信息

获取股票信息

接口地址:/stock/list

请求方式:POST

请求示例:

{
  "values": ["000001.SZ"]
}

请求参数:

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
batchReq«string»BatchReq«string»bodytrueBatchReq«string»BatchReq«string»
  valuestruearraystring

响应参数:

参数名称参数说明类型schema
codeinteger(int32)integer(int32)
dataarrayStockInfoResp
  imageUrl公司头像string
  isAdd是否添加自选boolean
  isStop股票状态boolean
  label股票代码string
  stockName股票名称string
  stockStatus股票状态string
  swName1申万swName1string
  swName2申万swName2string
  swName3申万swName3string
msgstring

响应示例:

{
 "code": 0,
 "data": [
  {
   "imageUrl": "",
   "isAdd": false,
   "isStop": false,
   "label": "",
   "stockName": "",
   "stockStatus": "",
   "swName1": "",
   "swName2": "",
   "swName3": ""
  }
 ],
 "msg": ""
}

获取股票财务信息

接口地址:/stock/{label}/finance

请求方式:GET

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
label股票标签pathtruestring

响应参数:

参数名称参数说明类型schema
codeinteger(int32)integer(int32)
dataStockFinanceInfoRespStockFinanceInfoResp
  bvps每股净资产(用于计算市净率)number(bigdecimal)
  bvpsDatestring(date-time)
  eps每股收益(用于计算静态市盈率)number(bigdecimal)
  epsDatestring(date-time)
  latestEps最新财报的每股收益(用于计算动态市盈率)number(bigdecimal)
  latestEpsDatestring(date-time)
  latestNp预估的净利润(用于计算动态市盈率)number(bigdecimal)
  latestNpDatestring(date-time)
  np归属于母公司所有者的净利润(用于计算静态市盈率)number(bigdecimal)
  npDatestring(date-time)
  recentEps最近四个季度的每股收益(用于计算市盈率TTM)number(bigdecimal)
  recentEpsDatestring(date-time)
  recentNp最近四个季度的净利润(用于计算市盈率TTM)number(bigdecimal)
  recentNpDatestring(date-time)
  shareDatestring(date-time)
  shares总股本number(bigdecimal)
  tradeShares流通股本number(bigdecimal)
msgstring

响应示例:

{
 "code": 0,
 "data": {
  "bvps": 0,
  "bvpsDate": "",
  "eps": 0,
  "epsDate": "",
  "latestEps": 0,
  "latestEpsDate": "",
  "latestNp": 0,
  "latestNpDate": "",
  "np": 0,
  "npDate": "",
  "recentEps": 0,
  "recentEpsDate": "",
  "recentNp": 0,
  "recentNpDate": "",
  "shareDate": "",
  "shares": 0,
  "tradeShares": 0
 },
 "msg": ""
}

搜索股票

接口地址:/stock/search

请求方式:GET

请求示例:

/stock/search?content=000001.SZ

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
content搜索内容querytruestring

响应参数:

参数名称参数说明类型schema
codeinteger(int32)integer(int32)
dataarrayStockInfoResp
  imageUrl公司头像string
  isAdd是否添加自选boolean
  isStop股票状态boolean
  label股票代码string
  stockName股票名称string
  stockStatus股票状态string
  swName1申万swName1string
  swName2申万swName2string
  swName3申万swName3string
msgstring

响应示例:

{
 "code": 0,
 "data": [
  {
   "imageUrl": "",
   "isAdd": false,
   "isStop": false,
   "label": "",
   "stockName": "",
   "stockStatus": "",
   "swName1": "",
   "swName2": "",
   "swName3": ""
  }
 ],
 "msg": ""
}

获取股票的除权除息

接口地址:/stock/finance/xdr

请求方式:GET

请求示例:

/stock/finance/xdr?label=000001.SZ&endTime=2023-07-31

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
labellabelquerytruestring
startTime除权开始日期 yyyy-MM-ddqueryfalsestring(date)
endTime除权开始日期 yyyy-MM-ddqueryfalsestring(date)

响应参数:

参数名称参数说明类型schema
codeinteger(int32)integer(int32)
dataarrayXdrInfoResp
  divCash每股派现number(double)
  divShare每股派红股number(double)
  endDate截止日期string(date-time)
  excludeDate除权除息日期string(date-time)
  factor复权因子number(double)
  issuePrice配股价格number(double)
  issueShare每股配股number(double)
  label股票代码string
  registerDate股权登记日string(date-time)
  registerPrice股权登记日收盘价number(double)
  sumFactor累积复权因子number(double)
  transferShare每股公积金转增number(double)
msgstring

响应示例:

{
 "code": 0,
 "data": [
  {
   "divCash": 0,
   "divShare": 0,
   "endDate": "",
   "excludeDate": "",
   "factor": 0,
   "issuePrice": 0,
   "issueShare": 0,
   "label": "",
   "registerDate": "",
   "registerPrice": 0,
   "sumFactor": 0,
   "transferShare": 0
  }
 ],
 "msg": ""
}
上次编辑于:
贡献者: 陈志强