调用sina专门的js服务器来获得数据,速度飞快:
http://hq.sinajs.cn/list=sh600151,sz000830,s_sh000001,s_sz399001,s_sz399106,s_sz399107,s_sz399108
var hq_str_sh600151="航天机电,7.08,7.09,6.95,7.08,6.90,6.95,6.96,4368014,30484831,2900,6.95,5700,6.94,11687,6.93,19700,6.92,28200,6.91,700,6.96,6000,6.97,26600,6.98,21701,6.99,104259,7.00,2012-06-12,15:03:05";
var hq_str_sz000830="鲁西化工,4.90,4.93,4.85,4.90,4.83,4.84,4.85,5637089,27390414.02,147400,4.84,123000,4.83,90200,4.82,103300,4.81,280200,4.80,37510,4.85,34949,4.86,27899,4.87,31500,4.88,75400,4.89,2012-06-12,15:05:52";
var hq_str_s_sh000001="上证指数,2289.791,-16.065,-0.70,599419,5529858";
var hq_str_s_sz399001="深证成指,9790.197,-59.573,-0.60,71142542,5714888";
var hq_str_s_sz399106="深证综指,942.182,-3.439,-0.36,49774192,5544763";
var hq_str_s_sz399107="深证A指,985.824,-3.544,-0.36,49558295,5535505";
var hq_str_s_sz399108="深证B指,621.687,-5.293,-0.84,215896,9258";
注:
上证指数(指数名称),2289.791(当前点数),-16.065(涨跌额),-0.70(涨跌幅度),599419(总手),5529858(成交金额)";
"航天机电,名称
7.08,今开
7.09,昨收
6.95,当前
7.08,今日最高
6.90,今日最低
6.95,竞买价,即买一报价
6.96,竞卖价,即卖一报价
4368014,成交的股票数量,应除以100
30484831,成交金额,单位为元
2900,6.95,买一申请股数(29手),买一报价
5700,6.94,买二申请,买二报价
11687,6.93,买三申请,买三报价
19700,6.92,买四申请,买四报价
28200,6.91,买五申请,买五报价
700,6.96,卖一申请,卖一报价
6000,6.97,卖二申请,卖二报价
26600,6.98,卖三申请,卖三报价
21701,6.99,卖四申请,卖四报价
104259,7.00,卖五申请,卖五报价
2012-06-12,日期
15:03:05 时间
一共31个值。
http://hq.sinajs.cn/list=s_sz399001,s_sz399002,s_sz399003,s_sz399010,s_sz399106,s_sz399107,s_sz399108
var hq_str_s_sz399001="深证成指,9790.197,-59.573,-0.60,71142542,5714888";
var hq_str_s_sz399002="成份A指,10776.287,-64.126,-0.59,6351301,791833";
var hq_str_s_sz399003="成份B指,4425.993,-39.460,-0.88,59239,4837";
var hq_str_s_sz399010="深证700,3403.759,-8.677,-0.25,17953551,1896751";
var hq_str_s_sz399106="深证综指,942.182,-3.439,-0.36,49774192,5544763";
var hq_str_s_sz399107="深证A指,985.824,-3.544,-0.36,49558295,5535505";
var hq_str_s_sz399108="深证B指,621.687,-5.293,-0.84,215896,9258";
http://hq.sinajs.cn/list=s_sh000001,s_sh000002,s_sh000003,s_sh000004,s_sh000005,s_sh000006,s_sh000007,s_sh000008
var hq_str_s_sh000001="上证指数,2289.791,-16.065,-0.70,599419,5529858";
var hq_str_s_sh000002="A股指数,2398.401,-16.998,-0.70,597460,5512715";
var hq_str_s_sh000003="B股指数,232.017,1.908,0.83,1958,17143";
var hq_str_s_sh000004="工业指数,1952.040,-17.161,-0.87,306777,3263599";
var hq_str_s_sh000005="商业指数,2650.303,-18.454,-0.69,19013,166771";
var hq_str_s_sh000006="地产指数,3500.208,60.763,1.77,46296,287382";
var hq_str_s_sh000007="公用指数,3769.470,-40.401,-1.06,63828,372671";
var hq_str_s_sh000008="综合指数,1931.844,-10.102,-0.52,163504,1439434";
http://hq.sinajs.cn/list=sh600151,sh600152,sh600153,sz000830,
返回
var hq_str_sh600151="航天机电,7.08,7.09,6.95,7.08,6.90,6.95,6.96,4368014,30484831,2900,6.95,5700,6.94,11687,6.93,19700,6.92,28200,6.91,700,6.96,6000,6.97,26600,6.98,21701,6.99,104259,7.00,2012-06-12,15:03:05";
var hq_str_sh600152="维科精华,6.89,7.10,6.94,6.97,6.48,6.83,6.84,17509035,116787535,4900,6.83,19900,6.82,3500,6.81,38800,6.80,100,6.79,26700,6.84,4000,6.85,1400,6.86,14500,6.89,13600,6.90,2012-06-12,15:03:05";
var hq_str_sh600153="建发股份,7.47,7.52,7.62,7.68,7.46,7.61,7.62,15063933,113836559,537575,7.61,77600,7.60,102600,7.59,93900,7.58,133299,7.57,41400,7.62,39800,7.63,129349,7.64,193540,7.65,130400,7.66,2012-06-12,15:03:05";
var hq_str_sz000830="鲁西化工,4.90,4.93,4.85,4.90,4.83,4.84,4.85,5637089,27390414.02,147400,4.84,123000,4.83,90200,4.82,103300,4.81,280200,4.80,37510,4.85,34949,4.86,27899,4.87,31500,4.88,75400,4.89,2012-06-12,15:05:52";
指数的格式
"s_sh"+"000001"
股票代码 股票名称
000001 上证指数
000002 A股指数
000003 B股指数
000004 工业指数
000005 商业指数
000006 地产指数
000007 公用指数
000010 上证180
000011 沪市基金
000012 国债指数
000013 企债指数
000015 红利指数
000016 上证50
000017 新 综 指
000019 治理指数
000042 上证央企
000043 超 大 盘
000049 上证民企
000054 上证海外
000055 上证地企
000056 上证国企
000057 全指成长
000058 全指价值
000059 全R成长
000060 全R价值
000061 沪企债30
000062 上证沪企
000063 上证周期
000064 非周期
000066 上证商品
000067 上证新兴
000300 沪深300
000926 中证央企(上)
000927 央企100(上)
000964 中证新兴
000999 两岸三地
"s_sz"+"399001"
399001 深证成指
399002 成份A指
399003 成份B指
399004 深证100R
399006 创业板指
399101 中小板综
399102 创业板综
399106 深证综指
399107 深证A指
399108 深证B指
399110 农林指数
399120 采掘指数
399130 制造指数
399131 食品指数
399132 纺织指数
399133 木材指数
399134 造纸指数
399135 石化指数
399136 电子指数
399137 金属指数
399138 机械指数
399139 医药指数
399140 水电指数
399150 建筑指数
399160 运输指数
399170 IT指数
399180 批零指数
399190 金融指数
399200 地产指数
399210 服务指数
399220 传播指数
399300 沪深300
399305 深市基金
399323 深证红利
399352 深报综指
399369 CBN-兴业
399481 企债指数
399606 创业板R
399926 中证央企(深)
399927 央企100(深)
http://hq.stock.sohu.com/hqindex/finaceindex/financeindexhq1.js
fortune_hq({"cna":[["上证指数","2289.79","-16.06","-0.70%","http://q.stock.sohu.com/zs/000001/index.shtml"],["深证成指","9790.20","-59.57","-0.60%","http://q.stock.sohu.com/zs/399001/index.shtml"],["中小板综","5253.22","-13.70","-0.26%","http://q.stock.sohu.com/zs/399101/index.shtml"]],"cnb":[["B股指数","232.02","1.91","0.83%","http://q.stock.sohu.com/zs/000003/index.shtml"],["成份B指","4425.99","-39.46","-0.88%","http://q.stock.sohu.com/zs/399003/index.shtml"]],"cnf":[["沪市基金","3824.81","-21.85","-0.57%","http://q.stock.sohu.com/zs/000011/index.shtml"],["深市基金","4601.38","-25.05","-0.54%","http://q.stock.sohu.com/zs/399305/index.shtml"]],"hk":[["恒生指数","18872.56","-81.07","-0.43%","http://q.stock.sohu.com/hk/HSI/index.shtml"],["国企指数","9519.53","-55.27","-0.58%","http://q.stock.sohu.com/hk/HSCEI/index.shtml"],["红筹指数","3789.30","-3.77","-0.10%","http://q.stock.sohu.com/hk/HSCCI/index.shtml"]],"us":[["道琼斯工业指数","12411.23","-142.97","-1.14%","http://q.stock.sohu.com/us/index.shtml?DJI"],["纳斯达克综合指数","2809.73","-48.69","-1.70%","http://q.stock.sohu.com/us/index.shtml?IXIC"],["标准普尔500指数","1312.39","3.46","0.26%","http://q.stock.sohu.com/us/index.shtml?GSPC"]]})
http://hq.stock.sohu.com/hqindex/finaceindex/financeindexhq2.js
PEAK_ODIA(['financeindexhq',[['zs_000001','上证指数','2289.79','-16.06','-0.70%','http://q.stock.sohu.com/zs/000001/index.shtml'],['zs_399001','深证成指','9790.20','-59.57','-0.60%','http://q.stock.sohu.com/zs/399001/index.shtml'],['zs_399101','中小板综','5253.22','-13.70','-0.26%','http://q.stock.sohu.com/zs/399101/index.shtml'],['zs_000003','B股指数','232.02','+1.91','0.83%','http://q.stock.sohu.com/zs/000003/index.shtml'],['zs_399003','成份B指','4425.99','-39.46','-0.88%','http://q.stock.sohu.com/zs/399003/index.shtml'],['zs_000011','沪市基金','3824.81','-21.85','-0.57%','http://q.stock.sohu.com/zs/000011/index.shtml'],['zs_399305','深市基金','4601.38','-25.05','-0.54%','http://q.stock.sohu.com/zs/399305/index.shtml'],['HSI','恒生指数','18872.56','-81.07','-0.43%','http://q.stock.sohu.com/hk/HSI/index.shtml'],['HSCCI','红筹指数','3789.30','-3.77','-0.10%','http://q.stock.sohu.com/hk/HSCCI/index.shtml'],['HSCEI','国企指数','9519.53','-55.27','-0.58%','http://q.stock.sohu.com/hk/HSCEI/index.shtml']])
http://hq.stock.sohu.com/hqindex/finaceindex/financeindexhq.js
PEAK_ODIA(['financeindexhq',[['zs_000001','上证指数','2289.79','-16.06','-0.70%','http://q.stock.sohu.com/zs/000001/index.shtml'],['zs_399001','深证成指','9790.20','-59.57','-0.60%','http://q.stock.sohu.com/zs/399001/index.shtml'],['zs_399101','中小板综','5253.22','-13.70','-0.26%','http://q.stock.sohu.com/zs/399101/index.shtml'],['zs_000003','沪市B股','232.02','+1.91','0.83%','http://q.stock.sohu.com/zs/000003/index.shtml'],['zs_399003','成份B指','4425.99','-39.46','-0.88%','http://q.stock.sohu.com/zs/399003/index.shtml'],['zs_000011','沪市基金','3824.81','-21.85','-0.57%','http://q.stock.sohu.com/zs/000011/index.shtml'],['zs_399305','深市基金','4601.38','-25.05','-0.54%','http://q.stock.sohu.com/zs/399305/index.shtml'],['HSI','恒生指数','18872.56','-81.07','-0.43%','http://q.stock.sohu.com/hk/HSI/index.shtml'],['HSCEI','国企指数','9519.53','-55.27','-0.58%','http://q.stock.sohu.com/hk/HSCEI/index.shtml'],['HSCCI','红筹指数','3789.30','-3.77','-0.10%','http://q.stock.sohu.com/hk/HSCCI/index.shtml']],[[['cn_600401','海润光伏','7.99','10.06%'],['cn_600978','宜华木业','5.27','7.55%'],['cn_600777','新潮实业','5.35','6.36%'],['cn_600596','新安股份','6.62','6.09%'],['cn_600657','信达地产','5.01','5.92%']],[['cn_601339','N百隆','12.33','-9.34%'],['cn_601908','京运通','8.60','-7.13%'],['cn_600495','晋西车轴','12.30','-6.32%'],['cn_600158','XD中体产','6.99','-6.30%'],['cn_600470','六国化工','10.42','-6.21%']],[['cn_002683','N宏大 ','16.00','10.65%'],['cn_000736','重庆实业','10.85','10.04%'],['cn_002499','科林环保','21.43','10.01%'],['cn_300147','香雪制药','8.37','9.99%'],['cn_300266','兴源过滤','19.07','9.98%']],[['cn_002238','天威视讯','14.74','-9.40%'],['cn_002685','N华重机 ','9.08','-9.11%'],['cn_002682','N龙洲 ','9.76','-7.92%'],['cn_300136','信维通信','15.36','-7.69%'],['cn_002616','长青集团','17.45','-6.03%']]],[['25','S板','8','10.16','+0.12','0.65%','111101','9321','cn_600733','S*ST前锋','18.26','+0.87','5.00%'],['22','房地产','143','7.69','+0.05','0.65%','14823974','1117434','cn_000736','重庆实业','10.85','+0.99','10.04%'],['59','医药板块','188','16.54','+0.16','0.63%','6170241','874796','cn_300147','香雪制药','8.37','+0.76','9.99%'],['39','ST板块','139','7.18','+0.02','0.56%','3426392','203147','cn_600074','ST中达','3.07','+0.15','5.14%'],['291','重庆板块','27','10.57','+0.03','0.40%','1374186','139496','cn_000736','重庆实业','10.85','+0.99','10.04%']]])
---------------------------------------------
http://hq.sinajs.cn/list=s_sh000001 上证指数
http://hq.sinajs.cn/list=s_sz399001 深证成指
http://hq.sinajs.cn/list=int_hangseng 恒生指数
http://hq.sinajs.cn/list=s_sz399300 沪生300
http://hq.sinajs.cn/list=int_dji 道琼斯
http://hq.sinajs.cn/list=int_nasdaq 纳斯达克
http://hq.sinajs.cn/list=int_sp500 标普500
http://hq.sinajs.cn/list=int_ftse 英金融时报指数
---------------------------------------------------------
期货
http://hq.sinajs.cn/rn=1318986550609&list=hf_CL,hf_GC,hf_SI,hf_CAD,hf_ZSD,hf_S,hf_C,hf_W
var hq_str_hf_CL="83.3500,0.7860,83.3400,83.3500,83.4300,81.0700,22:47:46,82.7000,81.2700,17929,0,0,2012-06-12";
var hq_str_hf_GC="1608.4000,0.7265,1608.3000,1608.4000,1611.6000,1587.0000,22:47:46,1596.8000,1597.1000,17965,0,0,2012-06-12";
var hq_str_hf_SI="28.7500,0.4893,28.7400,28.7500,28.9500,28.3100,22:47:44,28.6100,28.5000,7509,0,0,2012-06-12";
var hq_str_hf_CAD="7392.5000,-0.2133,7390.5000,7392.2998,7444.2998,7328.2998,22:47:46,7408.2998,7368.0000,12568,1,1,2012-06-12";
var hq_str_hf_ZSD="1886.0000,-0.2116,1886.0000,1888.3000,1893.3000,1874.3000,22:47:34,1890.0000,1885.0000,3502,1,2,2012-06-12";
var hq_str_hf_S="1428.5000,0.2632,1428.0000,1428.5000,1449.2500,1416.2500,22:47:46,1424.7500,1426.7500,5144,0,0,2012-06-12";
var hq_str_hf_C="584.5000,-1.2669,584.5000,584.7500,598.5000,575.5000,22:47:45,592.0000,593.5000,3509,0,0,2012-06-12";
var hq_str_hf_W="622.7500,-1.2292,622.7500,623.0000,639.5000,618.2500,22:47:45,630.5000,628.5000,2433,0,0,2012-06-12";
外汇
http://hq.sinajs.cn/rn=1318986628214&list=USDCNY,USDHKD,EURCNY,GBPCNY,USDJPY,EURUSD,GBPUSD,
var hq_str_USDCNY="16:58:22,6.3705,6.3673,6.3692,32,6.3694,6.3782,6.3685,6.3705,美元人民币";
var hq_str_USDHKD="22:48:57,7.7594,7.7596,7.7599,2,7.7601,7.7601,7.7531,7.7594,美元港元";
var hq_str_EURCNY="22:44:55,7.9453,7.9478,7.8917,25,7.9491,7.9725,7.8917,7.9453,欧元人民币";
var hq_str_GBPCNY="22:44:55,9.9032,9.9057,9.7923,25,9.8649,9.9103,9.7923,9.9032,英镑人民币";
var hq_str_USDJPY="22:48:56,79.50,79.50,79.38,0,79.38,79.69,79.15,79.50,美元日元";
var hq_str_EURUSD="22:48:57,1.2468,1.2468,1.2467,0,1.2469,1.2529,1.2441,1.2468,欧元美元";
var hq_str_GBPUSD="22:48:57,1.5537,1.5542,1.5471,5,1.5469,1.5557,1.5454,1.5537,英镑美元";
--------------
日K线
http://image.sinajs.cn/newchart/daily/n/sh601006.gif
周K线
http://image.sinajs.cn/newchart/weekly/n/sh601006.gif
月K线
http://image.sinajs.cn/newchart/monthly/n/sh601006.gif
分时图
http://image.sinajs.cn/newchart/min/n/sh000001.gif
这是一个人(http://blog.csdn.net/jiangxinyu/article/details/6150476)写的java获得数据的代码:
String url = "http://hq.sinajs.cn/list=sh600151,sz000830,s_sh000001,s_sz399001,s_sz399106";
try {
URL u = new URL(url);
byte[] b = new byte[256];
InputStream in = null;
ByteArrayOutputStream bo = new ByteArrayOutputStream();
while (true) {
try {
in = u.openStream();
int i;
while ((i = in.read(b)) != -1) {
bo.write(b, 0, i);
}
String result = bo.toString();
String[] stocks = result.split(";");
for (String stock : stocks) {
String[] datas = stock.split(",");
//根据对照自己对应数据
}
bo.reset();
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
if (in != null) {
in.close();
}
}
}
} catch (Exception ex) {
相关推荐
6. **历史数据**:除了实时数据,GDAT 还提供历史交易数据查询,便于用户进行回溯分析,检验策略的有效性。 7. **数据接口**:GDAT 提供API接口,方便用户将其集成到自己的分析系统或交易平台上,实现数据的无缝...
3. **历史交易数据接口**:提供过去一段时间内的股票每日交易数据,用于回测交易策略或进行技术分析。 调用这些接口时,我们需要遵循一定的请求格式,通常包括: - **URL**:接口的地址,通常由服务提供商提供。 -...
【VB股票实时交易数据采集源码】是一个使用Visual Basic(VB)编程语言编写的程序,其主要功能是针对中国A股市场,包括沪深两市共3396只股票的实时交易数据进行批量采集。该程序具备灵活性,允许用户根据特定的交易...
腾讯作为中国最大的互联网公司之一,提供了丰富的API服务,其中包括财经数据接口,允许开发者获取股票市场数据,如实时报价、历史交易数据等。这些接口通常通过HTTP请求发送到腾讯服务器,并返回JSON或XML格式的数据...
这种接口通常以API的形式存在,允许开发者通过发送特定的请求来获取股票市场的实时信息。在VC++ 6.0中,我们可以使用HTTP或HTTPS请求库(如WinInet或WinHttp)来实现对接口的调用。调用接口时,我们需要遵循腾讯设定...
该源代码项目是一个基于VC++的股票数据获取与实时图表显示的应用程序,使用了Visual Studio 2010进行开发。这个程序的核心功能是通过新浪网提供的股市接口,获取最新的股票市场数据,包括6个主要的大盘指数和50个...
在Python编程语言中,获取股票行情数据是一项常见的任务,尤其对于金融数据分析和自动化交易系统开发而言至关重要。Python提供了丰富的库和API接口,使得获取实时或历史股票数据变得相对简单。以下是一些关于如何...
3. 实时分笔数据获取:在股市交易中,分笔数据指的是每一个交易笔录的数据,包括价格、数量、时间等信息。这种数据对于进行高频交易、市场分析等量化投资活动至关重要。 4. 数据获取优化:文档中提到的优化方法是...
最近学习Python进行量化交易,第一步是获取实时行情数据,本资源是从新浪财经API接口获取期货实时行情数据的Python源代码(本代码获得的数据不再仅是5分钟行情数据,而是秒级行情更新,行情刷新间隔视网速及获取品种...
在IT行业中,实时获取股票行情数据是一项至关重要的任务,尤其对于投资者、交易员以及金融分析人员来说。Delphi是一款强大的面向对象的编程环境,它基于Pascal语言,以其高效的性能和丰富的组件库闻名,常被用于开发...
新浪财经提供了免费的股票数据接口,可以用来获取股票的实时行情。通过访问特定的URL,如`http://hq.sinajs.cn/list=sz000723`,我们可以得到股票的详细信息。这些信息以字符串形式返回,包含了股票的多个属性,例如...
中国股市,python最简封装的API接口,包含日线,历史K线,分时线,分钟线,全部实时采集,系统包括新浪腾讯双数据核心采集获取,自动故障切换,STOCK数据格式成DataFrame格式,可用来查询研究量化分析,股票程序自动化交易...
在金融领域,实时数据是至关重要的,特别是在股票市场中,投资者需要及时获取五档盘口信息来做出决策。本文将详细介绍如何使用Python编程语言和tushare库来爬取五档盘口的实时数据。 首先,tushare是一个专业的...
在现代金融分析与交易系统中,实时获取股票市场数据至关重要。本文将详细介绍如何利用Java编程语言通过两种主要方式(HTTP/JavaScript接口与Web Service接口)从互联网上获取股票实时数据。 #### 1. ...
标题中的“有32个列名----可以直接导入腾讯股票实时行情数据----GridCtr---FileInput.rar”表明这是一个关于金融数据处理的项目,具体是用于获取并显示腾讯股票实时行情的数据系统。这个系统可能使用了GridCtrl控件...
在金融数据分析领域,获取实时或历史的股票交易数据是至关重要的。本项目通过Python编程语言,利用多线程技术从Yahoo Finance API获取了上证50指数的成分股交易数据。接下来,我们将深入探讨这个过程涉及的技术点和...
历史数据涵盖了期货、期权以及股票等市场,用户可以获取到丰富的K线、分时、交易量等多维度数据,为策略开发和回测提供坚实的基础。实时数据服务则确保了策略对市场变化的及时响应,为高频交易和动态管理提供了可能...
在IT行业中,获取股票数据是一项常见的任务,尤其对于金融分析师、投资者和开发人员来说,能够实时、准确地获取和分析股票数据是至关重要的。这里我们将深入探讨如何获取股票数据,并结合提供的“获取股票数据.xls”...
本文将详细介绍如何使用Python通过新浪、网易、腾讯提供的实时tick接口来获取股票数据,并探讨这些接口的工作原理以及如何利用这些数据进行股票分析。 首先,"tick数据"是股票市场交易中最小的数据单位,包括了股票...