1. I want to view the changes in stock information in real time. I compared the stock API of Sina, Netease, and yahoo with a delay of 15 minutes. The returned data of Sina is in csv format, while that of Netease is in json format. Therefore, Netease's stock API is used. 2. Use the following format to query stock information... SyntaxHighlighter. all ();
1. I want to view the changes in stock information in real time. I compared the stock API of Sina, Netease, and yahoo with a delay of 15 minutes. The returned data of Sina is in csv format, while that of Netease is in json format. Therefore, Netease's stock API is used.
2. Use the following format to query the stock information
[Html]
Http://api.money.126.net/data/feed/1000002,1000001,1000881,money.api
The Stock Codes are separated by commas. For the naming rules of the Stock Codes, see Netease financial rules.
The returned json result is as follows:
[Plain]
_ Ntes_quote_callback ({
"1000002 ":{
"Code": "1000002 ",
"Percent":-0.012731481481481621,
"High": 8.6999999999999993,
"Askvol3": 10700,
"Askvol2": 41700,
"Askvol5": 22500,
"Askvol4": 36822,
"Price": 8.5299999999999994,
"Open": 8.6300000000000008,
"Bid5": 8.4800000000000004,
"Bid4": 8.4900000000000002,
"Bid3": 8.5,
"Bid2": 8.5099999999999998,
"Bid1": 8.5199999999999996,
"Low": 8.5,
"Updown":-0.11000000000000121,
"Type": "SZ ",
"Bidvol1": 1000,
"Bidvol3": 168500,
"Bidvol2": 63395,
"Symbol": "000002 ",
"Update": "13:46:28 ",
"Bidvol5": 215300,
"Bidvol4": 176600,
"Volume": 17132617,
"Askvol1": 11413,
"Ask5": 8.5700000000000003,
"Ask4": 8.5600000000000005,
"Ask1": 8.5299999999999994,
"Name": "\ u4e07 \ u79d1 \ uff21 ",
"Ask3": 8.5500000000000007,
"Ask2": 8.5399999999999991,
"Arrow": "\ u2193 ",
"Time": "13:46:20 ",
"Yestclose": 8.6400000000000006,
"Turnover": 147404890.41999999
},
"1000001 ":{
"Code": "1000001 ",
"Percent": 0.0093896713615023858,
"High": 15.1,
"Askvol3": 71712,
"Askvol2": 135132,
"Askvol5": 392350,
"Askvol4": 111230,
"Price": 15.050000000000001,
"Open": 14.91,
"Bid5": 15.01,
"Bid4": 15.02,
"Bid3": 15.029999999999999,
"Bid2": 15.039999999999999,
"Bid1": 15.050000000000001,
"Low": 14.880000000000001,
"Updown": 0.14000000000000057,
"Type": "SZ ",
"Bidvol1": 265,
"Bidvol3": 39983,
"Bidvol2": 15060,
"Symbol": "000001 ",
"Update": "13:46:28 ",
"Bidvol5": 50349,
"Bidvol4": 24437,
"Volume": 7187625,
"Askvol1": 67847,
"Ask5": 15.1,
"Ask4": 15.09,
"Ask1": 15.06,
"Name": "\ u5e73 \ u5b89 \ u94f6 \ u884c ",
"Ask3": 15.08,
"Ask2": 15.07,
"Arrow": "\ u2191 ",
"Time": "13:46:20 ",
"Yestclose": 14.91,
"Turnover": 107989733.23
},
"1000881 ":{
"Code": "1000881 ",
"Percent":-0.014388489208633001,
"High": 8.3800000000000008,
"Askvol3": 500,
"Askvol2": 47500,
"Askvol5": 3100,
"Askvol4": 2978,
"Price": 8.2200000000000006,
"Open": 8.3000000000000007,
"Bid5": 8.1899999999999995,
"Bid4": 8.1999999999999993,
"Bid3": 8.2100000000000009,
"Bid2": 8.2200000000000006,
"Bid1": 8.2300000000000004,
"Low": 8.2100000000000009,
"Updown":-0.11999999999999922,
"Type": "SZ ",
"Bidvol1": 1000,
"Bidvol3": 38154,
"Bidvol2": 5611,
"Symbol": "000881 ",
"Update": "13:46:28 ",
"Bidvol5": 28500,
"Bidvol4": 32200,
"Volume": 1652944,
"Askvol1": 12262,
"Ask5": 8.2899999999999991,
"Ask4": 8.2799999999999994,
"Ask1": 8.2400000000000002,
"Name": "\ u5927 \ u8fde \ u56fd \ u9645 ",
"Ask3": 8.2599999999999998,
"Ask2": 8.25,
"Arrow": "\ u2193 ",
"Time": "13:46:20 ",
"Yestclose": 8.3399999999999999,
"Turnover": 13662482.58
}
});
3. Retrieve the corresponding value based on the corresponding attribute.
Corresponding Jquery processing Json code reference http://bingzone.sinaapp.com/JobAlliance/quotes/stock.php
4. The address of the K-line chart.
Http://img1.quotes.ws.126.net/chart/timechart/1000001.png time chart
Http://img1.quotes.ws.126.net/chart/kchart/30/1000001.png 30-day K line
Http://img1.quotes.ws.126.net/chart/kchart/90/1000001.png 90-day K line
Http://img1.quotes.ws.126.net/chart/kchart/180/1000001.png 180-day K line
Http://img1.quotes.ws.126.net/chart/kchart/week/1000001.png weekly
Http://img1.quotes.ws.126.net/chart/kchart/month/1000001.png monthly
Http://img1.quotes.ws.126.net/chart/kchart/180/1000001.png half year line