Yahoo Stock Interface Reprint _ Stock

Source: Internet
Author: User
Tags web services

Yahoo Stock interface

This article by ARTHURXF portrait dedication, reprint please keep the author's description. Another I was employed in Shanghai Special Education Institute to teach it technical courses, admission brochure here: http://www.bizeway.net/read.php/285.htm, interested in learning, can contact me or telephone consultation. qq:29011218,tel:021-51097877.
Recently, the stock market is very hot, hired to develop a stock site, the stock of data from where to become a big problem, the stock software is generally encryption processing, and some Web services are also to account, the free method is only a kind of, grabbing other people's website data. Fortunately, it is a great blessing for me to find that Yahoo offers daily trading data on both domestic and foreign stock markets.
Http://table.finance.yahoo.com/table.csv?s=ibm&d=6&e=22&f=2006&g=d&a=11&b=16&c= 1991&ignore=.csv
The links above can crawl IBM shares from November 16, 1991 to 22 of June 2006 data. Change IBM to Sohu, you can catch Sohu stock data.
Http://table.finance.yahoo.com/table.csv?s=sohu&d=6&e=22&f=2008&g=d&a=11&b=16&c= 2008&ignore=.csv
The above link can catch Sohu stock data.

So is there any data on the Chinese stock market? The answer is yes, but there are some adjustments to the parameters below, which provide information on the global Stock exchange. The
Shanghai stock is followed by the stock code plus. SS, the stock is a stock code followed by. SZ
For example: 000001 = 000001.SZ
Shenzhen data Link: http://table.finance.yahoo.com/ TABLE.CSV?S=000001.SZ
Listing Data Link: HTTP://TABLE.FINANCE.YAHOO.COM/TABLE.CSV?S=600000.SS
Shanghai index Code: 000001.SS, Deep proof exponentially code: 399001.SZ, CSI 300 code: 000300.SS

Here is the world Stock Exchange's Web site and abbreviations, to find which stock exchange data, according to the above format and so on.
Shanghai Exchange =CN.FINANCE.YAHOO.COM,.SS,CHINESE,SL1D1T1C1OHGV
Shenzhen Exchange =CN.FINANCE.YAHOO.COM,.SZ,CHINESE,SL1D1T1C1OHGV
American Exchange =finance.yahoo.com,,united STATES,SL1D1T1C1OHGV
Canadian =CA.FINANCE.YAHOO.COM,.TO,TORONTO,SL1D1T1C1OHGV
New Zealand =AU.FINANCE.YAHOO.COM,.NZ,SL1D1T1C1OHGV
Singapore =SG.FINANCE.YAHOO.COM,.SI,SINGAPORE,SL1D1T1C1OHGV
Hong Kong =hk.finance.yahoo.com,.hk,hong KONG,SL1D1T1C1OHGV
Taiwan =TW.FINANCE.YAHOO.COM,.TW,TAIWAN,SL1D1T1C1OHGV
Indian =IN.FINANCE.YAHOO.COM,.BO,BOMBAY,SL1D1T1C1OHGV
London =UK.FINANCE.YAHOO.COM,.L,LONDON,SL1D1T1C1OHGV
Australian =AU.FINANCE.YAHOO.COM,.AX,SYDNEY,SL1D1T1C1OHGV
Brazilian =br.finance.yahoo.com,.sa,sao PAULO,SL1D1T1C1OHGV
Swedish =SE.FINANCE.YAHOO.COM,.ST,STOCKHOLM,SL1D1T1C1OHGV

The above methods can only provide historical data, real-time data can not crawl, this method provided by ARTHURXF, reproduced please indicate the source. Thank you.

Posted @ 2013-05-17 14:11 qi Shui na Bend reading (22) Comments (0) Edit

Stock real-time data interface

Stock real-time data interface

Posted on 2013-01-11 by the rich-no comments↓ of the intellectual foot

Made a little stock analysis data preparation, made a moving average figure:

Http://stock.chenpeng.info/randomone

Query stock Trends Please move: http://stock.chenpeng.info/, search Please enter the code or stock name.

Sina Stock Data Interface

eg:http://hq.sinajs.cn/list=sh600389

Returns the contents of the GB2312 encoding:
var hq_str_sh600389= "Jiangshan stake, 15.31,15.74,15.68,16.02,15.16,15.68,15.69,4044916,62900903,3350,15.68,9700,15.60,1000,15.57,2384,15.56,2100,15.54,13100,1 5.69,73100,15.70,1000,15.72,4000,15.74,14200,15.75,2013-01-11,14:14:24,00 ";

Client JS Call Example:
Script type= "Text/javascript" src= "http://hq.sinajs.cn/list=sh600389" charset= "gb2312" >/script>
/javascript ">
var elements=hq_str_sh600389.split (",");
document.write ("Current Price:" +elements[3]);
This code outputs the current stock price of Jiangshan shares (stock code: 600389)
Current price:15.68

At the end of each trading day, the third data, which is the current price, is the closing date.
var hq_str_sh601006= "Da-Qin Railway, 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 ";
This string is pieced together by many data, with different meanings of the data separated by commas, according to the programmer's thinking, sequence number starting from 0.
0: "Da Qin Railway", Stock name;
1: "27.55″, today's opening price;"
2: "27.25″, yesterday closing price;
3: "26.91″, current price;"
4: "27.55″, today's highest price;"
5: "26.20″, today's lowest price;"
6: "26.91″, bid price, namely" buy one "quotation;
7: "26.92″, bid price, that is," sell one "quote;
8: "22114263″, the number of shares traded, due to stock trading with 100 shares as the basic unit, so in use, usually the value divided by 100;"
9: "589824680″, the transaction amount, unit for" Yuan ", in order to glance, usually" million "as the unit of the transaction amount, so usually the value divided by 10,000;
10: "4695″", "buy one" to apply for 4695 shares, that is, 47 hands;
11: "26.91″", "buy one" quotation;
12: "57590″, buy two"
13: "26.90″, buy two"
14: "14700″, buy three"
15: "26.89″, buy three"
16: "14300″, buy four"
17: "26.88″, buy four"
18: "15100″, buy five"
19: "26.87″, buy five"
20: "3100″", "sell one" declaration 3100 shares, that is 31 hands;
21: "26.92″", "sell one" quote
(22, 23), (24, 25), (26,27), (28, 29) respectively, "sell two" to "sell four"
30: "2008-01-11″, date;"
31: "15:05:32″, Time";

If you want to query multiple stocks at the same time, then add a comma at the end of the URL, plus the stock code; For example, you should inquire about the market of the Datong-Qinhuangdao Railway (601006) and Da Tong Coal Industry (601001), so use the URL:
http://hq.sinajs.cn/list=sh600000,sh600004

Check the market index, such as the Shanghai Composite Index (000001):
http://hq.sinajs.cn/list=s_sh000001

The data returned by the server is:
var hq_str_s_sh000001= "Shanghai Composite Index, 2245.722,-37.936,-1.66,961537,7842727";

The data meaning is: Index name, current index, today's change value, today's change percentage, turnover (hand), turnover (million);
Query Shen Number:
http://hq.sinajs.cn/list=s_sz399001

The data returned by the server is:
var hq_str_s_sz399001= "Deep proof exponentially, 9033.616,-136.439,-1.49,114896246,8404494";

The basic data of stock analysis is all.
Tencent's real-time stock interface:
Http://qt.gtimg.cn/r=0.8409869808238q=s_sz000559,s_sz000913,s_sz002048,s_sz002085,s_sz002126,s_sz002284,s_ sz002434,s_sz002472,s_sz002488

R is a random number
Real-time stock interface of NetEase:
http://api.money.126.net/data/feed/ 1002151,0600036,0600016,0600000,0601398,0600031,1000002,1000858,0601166,0601318,0600019,0601857,1000078,1002024,0600028 , money.api?callback=_ntes_quote_callback13451765

Note: Both Sina and Tencent use SH, sz to distinguish Shanghai and Shenzhen, NetEase uses 1 and 0来 distinguish

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.