1. 新浪接口
- symnol = 股票代码
- scale = 5,15,30,60
- datalen = 获取数据长度,最大1023
返回结果:
[
{
"day": "2018-10-25 10:30:00",
"open": "3107.840",
"high": "3162.412",
"low": "3099.889",
"close": "3156.108",
"volume": "4803962600"
},
{
"day": "2018-10-25 11:30:00",
"open": "3155.638",
"high": "3156.178",
"low": "3130.454",
"close": "3145.298",
"volume": "1761647600"
}]
返回的结果数据并没有交易金额数据
2. 东方财富接口
http://pdfm.eastmoney.com/EM_UBG_PDTI_Fast/api/js?rtntype=2&id=0003001&type=m30k&_=1546486249481
- rtntype = 返回数据格式,支持:1,2,3,4,5,6
- id = 股票代码,后面多加个1
- type = k线类型,m5k,m15k,m30k,m60k
返回结果,注意结果为jsonp格式,需要去掉前后括号
[{
"time":"2018-11-21 10:00",
"open":"3187.10",
"close":"3214.17",
"high":"3221.20",
"low":"3185.24",
"volume":"24250345",
"amount":"244亿",
"amplitude":"-",
"turnoverrate":"0"},
{
"time":"2018-11-21 10:30",
"open":"3213.24",
"close":"3213.52",
"high":"3230.12",
"low":"3210.60",
"volume":"13652304",
"amount":"138亿",
"amplitude":"0.61%",
"turnoverrate":"0"}]
返回的交易金额为保留两位的亿,不够精确
3. 凤凰网接口
http://api.finance.ifeng.com/akmin?scode=sh000300&type=30
- scode = 股票代码
- type = k线类型
返回结果:
{
"record": [
[
"2018-10-31 11:00:00", # 日期
"3146.23", # 开盘价
"3146.23", # 最高价
"3130.41", # 收盘价
"3130.21", # 最低价
107709, # 成交量
"-15.82", # 价格变动
-0.5, # 涨跌幅
"3130.04", # 5日均价
"3119.8", # 10日均价
"3109.55", # 20日均价
159535, # 5日均量
150064, # 10日均量
138100, # 20日均量
0 # 换手率[注:指数无此项]
],
[
"2018-10-31 11:30:00",
"3130.19",
"3144.97",
"3143.7",
"3126.95",
105828,
"13.51",
0.43,
"3132.92",
"3126.49",
"3107.94",
160857,
147627,
137719,
0
]
]
}
4. 搜狐K线数据
http://q.stock.sohu.com/qp/hq?type=kline&code=000300&set=zs&period=30m&dr=0
结果不包含交易额
5. 证券之星
http://cq.ssajax.cn/interact/getTradedata.ashx?pic=qlpic_000300_1_4
- 000300 股票代码
- 1 标识沪,2 标识深
- 周期,1: 每分钟,2:5分钟K线,4:30分钟K线,6:日K线,7:周K线,8:月K线
结果数据与同花顺数据存在差异
{
"type": 'ThirtyMinutesK',
"code": '000300',
"picWidth": 630,
"left": 46,
"right": 46,
"top": 18,
"bottom": 3,
"mainHeight": 137.6087,
"count": 80,
"IsIndex": true,
"datas": [
['2019-1-2', '3017.07', '3018.78', '2976.94', '2977.05', '-33.61', '-1.12%', '1830.1744万手', '2099974.5988亿元', '']
['2019-1-2', '2977.90', '2982.50', '2972.32', '2975.34', '-1.71', '-0.06%', '870.7015万手', '1014299.3089亿元', '']
['2019-1-2', '2975.13', '2979.70', '2968.10', '2976.03', '0.70', '0.02%', '662.5779万手', '774487.0416亿元', '']
['2019-1-2', '2975.48', '2975.77', '2969.99', '2972.75', '-3.28', '-0.11%', '512.8981万手', '561504.6466亿元', '']
['2019-1-2', '2973.24', '2974.20', '2963.05', '2963.05', '-9.70', '-0.33%', '520.6500万手', '555401.0954亿元', '']
['2019-1-2', '2963.28', '2968.06', '2958.49', '2959.38', '-3.66', '-0.12%', '652.6460万手', '706160.9067亿元', '']
['2019-1-2', '2959.49', '2976.24', '2958.53', '2976.24', '16.86', '0.57%', '777.2934万手', '814835.7428亿元', '']
['2019-1-2', '2976.06', '2976.49', '2967.92', '2969.54', '-6.71', '-0.23%', '873.9827万手', '892372.3176亿元', '']
['2019-1-3', '2963.02', '2986.05', '2953.50', '2984.97', '15.43', '0.52%', '1644.8468万手', '1847877.8024亿元', '']
['2019-1-3', '2985.19', '3000.23', '2979.27', '2981.37', '-3.60', '-0.12%', '1368.3392万手', '1468697.7891亿元', '']
['2019-1-3', '2980.99', '2982.08', '2968.90', '2969.30', '-12.07', '-0.40%', '732.6996万手', '773648.5164亿元', '']
['2019-1-3', '2969.35', '2969.70', '2959.27', '2968.37', '-0.92', '-0.03%', '652.7249万手', '736984.9307亿元', '']
['2019-1-3', '2968.24', '2968.24', '2957.01', '2966.63', '-1.75', '-0.06%', '505.6024万手', '588579.1725亿元', '']
['2019-1-3', '2966.86', '2970.24', '2961.55', '2968.43', '1.80', '0.06%', '625.2699万手', '628144.8810亿元', '']
['2019-1-3', '2968.56', '2968.70', '2957.19', '2959.19', '-9.24', '-0.31%', '643.2986万手', '673772.6590亿元', '']
['2019-1-3', '2959.17', '2964.84', '2953.94', '2964.84', '5.65', '0.19%', '913.9289万手', '948774.1302亿元', '']]
}
6. 和讯网
5,15,30,60 统计时间和其他不一样
{
"KLine": [
{
"Time": "时间"
},
{
"LastClose": "前收盘价"
},
{
"Open": "开盘价"
},
{
"Close": "收盘价"
},
{
"High": "最高价"
},
{
"Low": "最低价"
},
{
"Volume": "成交量"
},
{
"Amount": "成交额"
}
],
"TABLE": [
{
"KLine[]": "K线列表"
},
{
"BeginTime": "最早时间"
},
{
"EndTime": "最后时间"
},
{
"Total": "总数"
},
{
"PriceWeight": "价格倍数"
}
],
"Data": [
[
[
20181226140000,
300240,
300224,
300750,
301374,
300163,
770036600,
6793688860
]
],
20181109130000,
20190103143000,
300,
100
]
}
7. 腾讯财经
缺少交易额数据
{
"code": 0,
"msg": "",
"data": {
"sh000300": {
"qt": {
"sh000300": ["1", "\u6caa\u6df1300", "000300", "2964.84", "2969.54", "2963.02", "70867103", "35432833", "35432833", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "0.00", "0", "15:00:14\/2964.84\/84960\/M\/54878944\/31359|15:00:09\/2964.38\/542063\/M\/614950538\/31350|15:00:04\/2961.67\/320165\/M\/278842088\/31335|14:57:09\/2961.67\/1191\/M\/2207995\/31163|14:57:04\/2961.72\/31903\/M\/34806277\/31159|14:56:59\/2961.59\/48068\/M\/38835054\/31150", "20190103151500", "-4.69", "-0.16", "3000.44", "2953.25", "2961.67\/70240080\/75994967911", "70867103", "7666480", "", "", "", "3000.44", "2953.25", "1.59", "", "", "0.00", "-1", "-1", "1.00", "0", "2971.29", "", ""]
"market": ["2019-01-03 19:04:01|HK_close_\u5df2\u6536\u76d8|SH_close_\u5df2\u6536\u76d8|SZ_close_\u5df2\u6536\u76d8|US_close_\u672a\u5f00\u76d8|SQ_close_\u5df2\u4f11\u5e02|DS_close_\u5df2\u4f11\u5e02|ZS_close_\u5df2\u4f11\u5e02|NEWSH_close_\u5df2\u6536\u76d8|NEWSZ_close_\u5df2\u6536\u76d8|NEWHK_close_\u5df2\u6536\u76d8|NEWUS_close_\u672a\u5f00\u76d8"]
"zhishu": ["", "", "145", "13", "142", "", "", "", "", "", "", "", "", ""]
"zjlx": []
},
"m30": [
["201901021000", "3017.07", "2977.01", "3018.78", "2976.94", "18749013.00", {
}, "0.0000"]
["201901021030", "2977.01", "2975.34", "2982.50", "2972.32", "8884351.00", {
}, "0.0000"]
["201901021100", "2975.34", "2976.03", "2979.70", "2968.10", "6798564.00", {
}, "0.0000"]
["201901021130", "2976.03", "2974.67", "2976.03", "2969.99", "5047638.00", {
}, "0.0000"]
["201901021330", "2974.67", "2963.05", "2975.26", "2963.05", "6144234.00", {
}, "0.0000"]
["201901021400", "2963.05", "2959.38", "2968.06", "2958.49", "6526460.00", {
}, "0.0000"]
["201901021430", "2959.38", "2976.24", "2976.24", "2958.52", "7772934.00", {
}, "0.0000"]
["201901021500", "2976.24", "2969.54", "2976.49", "2967.92", "8739827.00", {
}, "0.0000"]
["201901031000", "2963.02", "2984.97", "2986.05", "2953.50", "16448468.00", {
}, "0.0000"]
["201901031030", "2984.97", "2981.12", "3000.44", "2979.27", "13669432.00", {
}, "0.0000"]
["201901031100", "2981.37", "2969.30", "2982.08", "2968.90", "7340956.00", {
}, "0.0000"]
["201901031130", "2969.30", "2967.56", "2969.70", "2959.26", "6128922.00", {
}, "0.0000"]
["201901031330", "2967.56", "2966.63", "2968.39", "2957.01", "5454351.00", {
}, "0.0000"]
["201901031400", "2966.63", "2968.56", "2970.24", "2961.55", "6269618.00", {
}, "0.0000"]
["201901031430", "2968.56", "2959.19", "2968.70", "2957.19", "6416067.00", {
}, "0.0000"]
["201901031500", "2959.19", "2964.84", "2964.84", "2953.94", "9139289.00", {
}, "0.0000"]]
"prec": "2969.54"
}
}
8. 雪球网(需要登录)
缺少交易金额