大家好,又见面了,我是你们的朋友全栈君。
原标题:股票数据接口-股票数据接口api
量亿数据专注金融领域API数据接口,其中包括期货、股票、期权、外汇等,只需要注册即可申请使用。
免费申请网址:http://www.liangyee.com/
如何获取股票数据,股票数据接口-股票数据接口api,以美股API数据接口为例。
5分钟K线
接口地址:
http://stock.liangyee.com/bus-api/USStock/marketData/get5MinK
获取方式:http get
请求示例:
http://stock.liangyee.com/bus-api/USStock/marketData/get5MinK?userKey=XXX&symbol=AAPL
请将上述链接中XXX替换为您用户中心的userKey
请求参数说明:
参数名
类型
说明
必填
userKey
string
您申请的userKey
是
symbol
string
股票代码
是
返回参数说明
参数名
类型
说明
code
string
返回错误码
message
string
返回成功与否信息
result
string
返回结果集
JSON返回示例
{
“code”: “000000”,
“message”: “success”,
“result”: [
“2017-04-13 09:35:00,141.8720,141.9500,141.6300,141.6900,813357”,
“2017-04-13 09:40:00,141.7000,141.7900,141.7000,141.7900,282475”,
“2017-04-13 09:45:00,141.6500,141.7100,141.6200,141.7100,300200”,
“2017-04-13 09:50:00,141.7000,141.7790,141.7000,141.7500,243932”,
“2017-04-13 09:55:00,141.7600,142.0700,141.7600,141.9700,541436”,
“2017-04-13 10:00:00,141.9000,142.0900,141.9000,141.9800,273174”,
“2017-04-13 10:05:00,142.0400,142.1900,142.0400,142.1900,293476”,
“2017-04-13 10:10:00,142.2100,142.2100,142.0800,142.1100,186000”,
“2017-04-13 10:15:00,142.0960,142.1760,142.0960,142.1300,158066”,
“2017-04-13 10:20:00,142.1300,142.1600,142.1100,142.1100,155606”,
“2017-04-13 10:25:00,142.0300,142.1400,142.0300,142.1400,291403”,
“2017-04-13 10:30:00,142.1500,142.1700,142.0800,142.0900,184382”,
“2017-04-13 10:35:00,142.0700,142.1420,142.0700,142.1300,177926”,
“2017-04-13 10:40:00,142.1400,142.1900,142.1350,142.1800,111557”,
“2017-04-13 10:45:00,142.1400,142.2000,142.1400,142.2000,84002”,
“2017-04-13 10:50:00,142.2200,142.2400,142.1400,142.1400,246370”,
…
…
…
/*交易时间,开盘价,最高价,最低价,收盘价,成交量*/
]
}
日线
接口地址:
http://stock.liangyee.com/bus-api/USStock/marketData/getDailyKBar
获取方式:http get
请求示例:
http://stock.liangyee.com/bus-api/USStock/marketData/getDailyKBar?userKey=XXXX&symbol=AAPL&startDate=2015-01-01&endDate=2016-02-20
请将上述链接中XXX替换为您用户中心的userKey
请求参数说明
参数名
类型
说明
必填
userKey
string
您申请的userKey
是
symbol
string
股票代码
是
startDate
string
起始时间
是
endDate
string
截止时间
是
返回参数说明
参数名
类型
说明
code
string
返回错误码
message
string
返回成功与否信息
result
string
返回结果集
JSON返回示例: { “code”: “000000”, “message”: “success”, “result”: [ “2015-01-02,111.39,109.33,111.44,107.35,53204626,-0.95”, “2015-01-05,108.29,106.25,108.65,105.41,64285491,-2.82”, “2015-01-06,106.54,106.26,107.43,104.63,65797116,0.01”, “2015-01-07,107.2,107.75,108.2,106.7,40105934,1.4”, “2015-01-08,109.23,111.89,112.15,108.7,59364547,3.84”, “2015-01-09,112.67,112.01,113.25,110.21,53699527,0.11”, “2015-01-12,112.6,109.25,112.63,108.8,49650790,-2.46”, “2015-01-13,111.43,110.22,112.8,108.91,67091928,0.89”, “2015-01-14,109.04,109.8,110.49,108.5,48956588,-0.38”, “2015-01-15,110,106.82,110.06,106.66,60013996,-2.71”, “2015-01-16,106.47,105.96,107.58,105.2,7039139,-0.93”, “2015-01-20,107.84,108.72,108.97,106.5,49899907,2.58”, “2015-01-21,108.95,109.55,111.06,108.27,48575897,0.76”, … … … /*交易日,开盘价,收盘价,最高价,最低价,成交量,涨跌幅%*/ ] }
服务级错误码参照
错误码
返回字符
错误码说明
000000
success
成功查询
100001
requestFrequencyLimit
访问过于频繁
200001
dateFormatError
日期格式错误
200002
paramError
参数错误
200003
accessKeyError
访问凭证错误
200004
notFoundError
数据未找到
200005
unknownError
未知错误
200006
numberError
数字错误
说明:量亿数据专注金融领域API数据接口,只需要注册即可申请免费使用
免费申请网址:http://www.liangyee.com/返回搜狐,查看更多
责任编辑:
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/126259.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...