misc:stock-data

# 实时股票数据 （股票分析软件之本源）

## 如何得到实时股票数据

`http://hq.sinajs.cn/list=sh601006`

```var hq_str_sh601006="大秦铁路, 27.55, 27.25, 26.91, 27.55, 26.20, 26.91,
26.92, 22114263, 589824680, 4695, 26.91, 57590, 26.90, 14700, 26.89, 14300,
26.88, 15100, 26.87, 3100, 26.92, 8900, 26.93, 14230, 26.94, 25150, 26.95,
15220, 26.96, 2008-01-11, 15:05:32";```

## 股票数据分析

```0: "大秦铁路"，股票名字；
1: "27.55"，今日开盘价；
2: "27.25"，昨日收盘价；
3: "26.91"，当前价格；
4: "27.55"，今日最高价；
5: "26.20"，今日最低价；
6: "26.91"，竞买价，即“买一”报价；
7: "26.92"，竞卖价，即“卖一”报价；
8: "22114263"，成交的股票数，由于股票交易以一百股为基本单位，
所以在使用时，通常把该值除以一百；
9: "589824680"，成交金额，单位为“元”，为了一目了然，
通常以“万元”为成交金额的单位，
所以通常把该值除以一万；
10: "4695"，“买一”申请4695股，即47手；
11: "26.91"，“买一”报价；
12: "57590"，“买二”
13: "26.90"，“买二”
14: "14700"，“买三”
15: "26.89"，“买三”
16: "14300"，“买四”
17: "26.88"，“买四”
18: "15100"，“买五”
19: "26.87"，“买五”
20: "3100"，“卖一”申报3100股，即31手；
21: "26.92"，“卖一”报价
(22, 23), (24, 25), (26,27), (28, 29)分别为“卖二”至“卖四的情况”
30: "2008-01-11"，日期；
31: "15:05:32"，时间；```

## JavaScript进行股票分析实例

```<script type="text/javascript"
src="http://hq.sinajs.cn/list=sh601006" charset="gb2312"></script>
<script type="text/javascript">
var elements=hq_str_sh601006.split(",");
document.write("current price:"+elements[3]);
</script>```

`current price:14.20`

## 同时得到多个股票数据

`http://hq.sinajs.cn/list=sh601003,sh601001`

```var hq_str_sh601003="柳钢股份,9.30,9.51,9.32,9.60,9.17,9.32,9.33,
23586489,221150256,23331,9.32,77800,9.31,246400,9.30,136880,9.29,
150000,9.28,37120,9.33,26600,9.34,69140,9.35,7180,9.36,6900,9.37,
2009-07-17,15:03:32";

var hq_str_sh601001="大同煤业,40.90,41.08,42.84,42.93,40.62,42.83,
42.84,16000498,672773993,1100,42.83,4000,42.81,25400,42.80,1300,
42.78,4500,42.77,500,42.84,21710,42.85,36000,42.86,2400,42.87,30860,42.88,
2009-07-17,15:03:32";```

## 查询大盘指数

`http://hq.sinajs.cn/list=s_sh000001`

`var hq_str_s_sh000001="上证指数,3094.668,-128.073,-3.97,436653,5458126";`

## 查询深圳成指数

`http://hq.sinajs.cn/list=s_sz399001`

`var hq_str_s_sz399001="深证成指,13131.972,50.082,0.38,11653715,2101747";`

## 股票K线图数据

### 股票分时线的查询

`http://image.sinajs.cn/newchart/min/n/sh000001.gif`

### 查看股票日K线图

`http://image.sinajs.cn/newchart/daily/n/sh000001.gif`

### 周K线查询

`http://image.sinajs.cn/newchart/weekly/n/sh000001.gif`

### 月K线查询

`http://image.sinajs.cn/newchart/monthly/n/sh000001.gif`

misc/stock-data.txt · 最后更改: 2010/06/02 01:18 (外部编辑)