首页 > 代码库 > 重创股金

重创股金

重创股金

using System;

using System.Text;

using System.Net;

 

namespace 重创股金

{

    class Program

    {

        static void Main(string[] args)

        {

            string key = "***********************";

            string URL = "http://apis.haoservice.com/lifeservice/zcgjj?key="+key;

            WebClient wc = new WebClient();

            wc.Encoding = Encoding.UTF8;

            string str = wc.DownloadString(URL);

            Console.WriteLine(str);

            Console.ReadKey();

        }

    }

}

 

接口信息:

URL:http://apis.haoservice.com/lifeservice/zcgjj

支持格式:json;

http请求方式:GET;

参数说明:

名称

类型

必须

说明

key

string

应用APPKEY(应用详细页查询)

返回结果:

{

"error_code":"0",

"reason":"Success",

"result":[{

"1":{

"code":"000002", /*股票代码*/

"name":"万科A", /*股票名称*/

"fundnum":"180", /*持有基金家数*/

"total":"247,221", /*持股总数(万股)*/

"change":"-42,289", /*持股变化(和上季度比)*/

"totalcap":"2084074.79",/*持股总市值(万元)*/

"accrate":"22.52", /*占该股流通市值比例(%*/

"changesta":"-3.85", /*占流通股比例表变化(和上季度比)(%*/

"time":"20120930" /*时间*/

},

"2":{

"code":"000858",

"name":"五粮液",

"fundnum":"157",

"total":"49,986",

"change":"-10,713",

"totalcap":"1694540.82",

"accrate":"13.17",

"changesta":"-2.82",

"time":"20120930"

},

......

"7":{

"code":"600837",

"name":"海通证券",

"fundnum":"112",

"total":"85,612",

"change":"-40,265",

"totalcap":"820166.78",

"accrate":"8.93",

"changesta":"-4.20",

"time":"20120930"

}

......

}]

}

 

 

重创股金