• 股票数据查询接口


    股票数据查询接口

    Haoservice沪深股票数据接口使用说明

    支持格式:json

    请求方式:GET

    GEMO: http://apis.haoservice.com/lifeservice/stock/hs?gid=sh601009&key=您申请的APPKEY

    参数说明:

    名称

    类型

    必须

    说明

    key

    string

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

    gid

    string

    股票编号,上海股市以sh开头,深圳股市以sz开头如:sh601009

    Json返回示例:

    {

        "resultcode":"0",    /*返回码,0:正常*/

        "reason":"SUCCESSED!",

        "result":{

            "data":{

                "gid":"sh601009",               /*股票编号*/

                "name":"南京银行",              /*股票名称*/

                "todayStartPri":"8.26",         /*今日开盘价*/

                "yestodEndPri":"8.26",          /*昨日收盘价*/

                "nowPri":"8.37",                /*当前价格*/

                "todayMax":"8.55",              /*今日最高价*/

                "todayMin":"8.25",              /*今日最低价*/

                "competitivePri":"8.37",        /*竞买价*/

                "reservePri":"8.38",            /*竞卖价*/

                "traNumber":"34501453",         /*成交量*/

                "traAmount":"290889560",        /*成交金额*/

                "buyOne":"10870",               /*买一*/

                "buyOnePri":"8.37",             /*买一报价*/

               ……..

            "dapandata":{

                "name":"南京银行",              /*大盘指数名称*/

                "dot":"8.37"                    /*大盘当前点数*/

                "nowPic":"0.11",                /*大盘当前价格*/

                "rate":"1.33",                  /*大盘涨跌率*/

                "traNumber":"345014",           /*大盘成交量(手)*/

                "traAmount":"29088",            /*大盘成交金额(万元)*/        

            },

            "gopicture":{    

                "minurl":"http://image.sinajs.cn/newchart/min/n/sh601009.gif",/*分时K线图*/

                "dayurl":"http://image.sinajs.cn/newchart/daily/n/sh601009.gif",/*K线图*/

                "weekurl":"http://image.sinajs.cn/newchart/weekly/n/sh601009.gif",/*K线图*/

                "monthurl":"http://image.sinajs.cn/newchart/monthly/n/sh601009.gif"/*K线图*/

            }

        }

    }

    Haoservice香港股票数据接口使用说明

    支持格式:json

    请求方式:GET

    GEMO: http://apis.haoservice.com/lifeservice/stock/hk?num=00001&key=您申请的APPKEY

    参数说明:

    名称

    类型

    必须

    说明

    key

    string

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

    num

    int

    股票代码,如:00001 长江实业股票代码

    Json返回示例:
    {

        "error_code":"0",

        "reason":"Success",

        "result":{

        "data":{

    "gid":"hk00001", /*股票编号*/

    "ename":"CHEUNG KONG", /*股票英文简称*/

    "name":"长江实业", /*股票名称*/

    "openpri":"119.600", /*今日开盘价*/

    "formpri":"119.200", /*前收盘价*/

    "maxpri":"120.600", /*最高价*/

    "minpri":"119.600", /*最低价*/

    "lastestpri":"119.800", /*最新价*/

    "uppic":"0.600", /*涨跌*/

    "limit":"0.503", /*涨跌幅%*/

    "inpic":"119.700", /*买入价*/

    "outpic":"119.900", /*卖出价*/

    "traAmount":"121700502",/*成交额(元)*/

    "traNumber":"1014242", /*成交量(股)*/

    "priearn":"6.025", /*市盈率*/

    "max52":"132.700", /*52周最高*/

    "min52":"86.000", /*52周最低*/

    "date":"2013/03/12", /*日期*/

    "time":"11:19:12" /*更新时间*/

        },

        "gopicture":{

    "minurl":"http://image.sinajs.cn/newchart/hk_stock/min/00001.gif",/*分时K线*/

    "dayurl":"http://image.sinajs.cn/newchart/hk_stock/daily/00001.gif",/*K线图*/

    "weekurl":"http://image.sinajs.cn/newchart/hk_stock/weekly/00001.gif",/*K线图*/

    "monthurl":"http://image.sinajs.cn/newchart/hk_stock/monthly/00001.gif"/*K线图*/

        },

        "hengsheng_data": {                  /*恒生指数*/

                "date":"2014/05/12",             /*日期*/

                    "formpri":"21862.99",        /*前收盘价*/

                    "lastestpri":"22220.65",     /*最新价*/

                    "limit":"1.64",              /*涨跌幅%*/

                    "max52":"24111.55",          /*52周最高*/

                    "maxpri":"22250.28",         /*最高价*/

                    "min52":"0.00",              /*52周最低*/

                    "minpri":"21796.90",         /*最低价*/

                    "openpri":"21921.59",        /*开盘价*/

                    "time":"11:44:00",           /*时间*/

                    "traAmount":"31524616000",   /*成交额*/

                    "uppic":"357.66"             /*涨跌额*/

             }

        }

    }

    Haoservice美国股票数据接口使用说明

    支持格式:json

    请求方式:GET

    DEMO: http://apis.haoservice.com/lifeservice/stock/usa?gid=aapl&key=您申请的APPKEY

    参数说明:

    名称

    类型

    必须

    说明

    key

    string

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

    gid

    string

    股票代码,如:aapl 苹果公司的股票代码

    Json返回示例:

    {

      "error_code":"0",

      "reason":"Success",

      "result":{

         "data":{

           "gid":"aapl",         /*股票编号*/

           "name":"苹果",         *股票名称*/

           "lastestpri":"437.87",         /*最新价*/

           "openpri":"429.70",         /*开盘价*/

           "formpri":"431.72",         /*前收盘价*/

           "maxpri":"439.01",         /*最高价*/

           "minpri":"425.14",         /*最低价*/

           "uppic":"6.15",         /*涨跌额*/

           "limit":"1.42",         /*涨跌幅%*/

           "traAmount":"16884191",     /*成交量(股)*/

           "avgTraNumber":"16910781",     /*平均成交量(股)*/

           "markValue":"411185326460",     /*市值*/

           "max52":"705.07",         /*52周最高*/

           "min52":"419.00",         /*52周最低*/

           "EPS":"44.16",         /*美股收益*/

           "priearn":"9.92",         /*市盈率*/

           "beta":"1.10",         /*贝塔系数*/

           "divident":"10.60",         /*股息*/

           "ROR":"10.24",         /*收益率*/

           "capital":"939058000",     /*股本*/

           "afterpic":"437.29",     /*盘后价*/

           "afterlimit":"-0.13",     /*盘后涨跌幅%*/

           "afteruppic":"-0.58",     /*盘后涨跌额*/

           "aftertime":"Mar 11 7:59PM EDT", /*盘后计算时间*/

           "ustime":"Mar 11 4:00PM EDT", /*美国当前更新时间*/

           "chtime":"2013-03-12 07:58:04" /*中国时间*/

          },

          "gopicture":{

             "minurl":"http://image.sinajs.cn/newchartv5/usstock/min/aapl.gif",/*分时K线图*/

             "min_weekpic":"http://image.sinajs.cn/newchartv5/usstock/min_week/aapl.gif",/*5K线图*/

             "dayurl":"http://image.sinajs.cn/newchartv5/usstock/daily/aapl.gif",/*K线图*/

             "weekurl":"http://image.sinajs.cn/newchartv5/usstock/weekly/aapl.gif",/*K线图*/

             "monthurl":"http://image.sinajs.cn/newchartv5/usstock/monthly/aapl.gif"/*K线图*/

          }

       }

    }

     

    备注:

    http://www.haoservice.com/docs/34 有沪深股票查询,香港股票查询,以及美国股票查询

     

  • 相关阅读:
    [linux] 将socket设置为非阻塞(nonblocking)
    翻译—IvorHorton的Begining Visual C++ 2005 [第一章]
    深入解析ATL(第二版ATL8.0)(1.11.3节)
    gdb使用初步
    编程其实就是一个不断做出选择的过程
    windows和linux下多线程的一些区别
    makefile编写入门
    深入解析ATL(第二版ATL8.0)(1.41.7节)
    深入解析ATL(第二版ATL8.0)(1.81.10节)
    用gdb调试子进程
  • 原文地址:https://www.cnblogs.com/haoservice/p/4019428.html
Copyright © 2020-2023  润新知