美文网首页
【免费接口】聚合数据-股票查询数据

【免费接口】聚合数据-股票查询数据

作者: Matt_Z_ | 来源:发表于2018-08-07 09:13 被阅读0次

    一、股票查询接口

    注:此接口可以通过公司的股票名称进行查询,公司的全称查不到,还有部分公司股票名称也查询不到(查询规则,未找规律)

    接口地址http://op.juhe.cn/onebox/stock/query
    请求方式:get
    请求参数

    image.png

    返回内容

    {
        "reason":"查询成功",
        "result":[
            {
                "is_rank_mutable":1,
                "type":"news",
                "rank":4,
                "doc_url":[
                    "http:\/\/news.so.com\/ns?q=%e9%87%91%e7%89%9b%e5%8c%96%e5%b7%a5%20%e8%82%a1%e7%a5%a8&src=onebox",
                    "http:\/\/www.miaogu.com\/html\/gegufenxi\/20180803\/203516.html",
                    "os:1094317498_1621310603_8360655504468ea7"
                ],
                "onebox_ext":"{\"is_gaia\":0,\"buffer_type\":\"4\"}",
                "location":"left",
                "data":{
                    "search_url":"https:\/\/www.so.com\/link?url=http%3A%2F%2Fnews.so.com%2Fns%3Fq%3D%25e9%2587%2591%25e7%2589%259b%25e5%258c%2596%25e5%25b7%25a5%2520%25e8%2582%25a1%25e7%25a5%25a8%26src%3Donebox&q=&ts=1533534677&t=79d2c98984b071c4f51312fe6100539",
                    "rank":"4",
                    "news_brand":"news_a",
                    "img":"http:\/\/p6.qhimg.com\/dmfd\/125_84_\/t01f07041e6fda8d7c8.png",
                    "img_width":"}",
                    "img_length":"X",
                    "imgurl":"https:\/\/www.so.com\/link?url=http%3A%2F%2Fwww.miaogu.com%2Fhtml%2Fgegufenxi%2F20180803%2F203516.html&q=&ts=1533534677&t=5a8a58e35d8ad37870110c5cc3925cc",
                    "rank_adjust":"4",
                    "show_result":[
                        {
                            "title":"<em>金牛化工<\/em>600722<em>股票<\/em>行情分析 短线多头非常强势",
                            "full_title":"金牛化工600722股票行情分析 短线多头非常强势",
                            "content":"短线的MACD处于低位金叉状态下运行,而且金叉还在进一步扩大,说明短线多头非常强势,很可能扭转态势,形成多头主导局面。<em>金牛化工<\/em>(600722)的短线支撑在4.67,距离这个位置还有0.04。<em>金牛化工<\/em>(600722)的短线阻力在4.89,距离这个位置还有0.18。短线密集阻力区在6.81-7.12。此处...",
                            "src":"瞄股网",
                            "show":26466784,
                            "dupnum":"36",
                            "img":"http:\/\/p6.qhimg.com\/t01f07041e6fda8d7c8.png",
                            "img_length":"472",
                            "img_width":"333",
                            "url":"https:\/\/www.so.com\/link?url=http%3A%2F%2Fwww.miaogu.com%2Fhtml%2Fgegufenxi%2F20180803%2F203516.html&q=&ts=1533534677&t=5a8a58e35d8ad37870110c5cc3925cc",
                            "pdate":"3天前",
                            "pdate_src":"2018-08-03 18:36:31",
                            "sim_dupid1":"1094317498",
                            "sim_dupid2":"1621310603",
                            "rptid":"8360655504468ea7",
                            "images":[
                                {
                                    "img":"http:\/\/p6.qhimg.com\/t01f07041e6fda8d7c8.png",
                                    "img_length":"472",
                                    "img_width":"333"
                                }
                            ]
                        }
                    ]
                },
                "num":1,
                "zhida":0,
                "recall":"",
                "keyword":"kw%3d%25e9%2587%2591%25e7%2589%259b%25e5%258c%2596%25e5%25b7%25a5%2520%25e8%2582%25a1%25e7%25a5%25a8",
                "addinfo_value":"2",
                "rank_adjust":"4"
            }
        ],
        "error_code":0
    }
    

    二、股票数据接口

    1.沪深股市 :若获取上/深指数,需要单独通过type值获取

    image.png

    返回结果: 只填股票编码(上/深指数需要单独获取)

    {
        "resultcode":"200",
        "reason":"SUCCESSED!",
        "result":[
            {
                "data":{
                    "buyFive":"1200",
                    "buyFivePri":"24.500",
                    "buyFour":"1600",
                    "buyFourPri":"24.510",
                    "buyOne":"100",
                    "buyOnePri":"24.570",
                    "buyThree":"300",
                    "buyThreePri":"24.530",
                    "buyTwo":"200",
                    "buyTwoPri":"24.540",
                    "competitivePri":"24.570",
                    "date":"2018-08-06",
                    "gid":"sz300513",
                    "increPer":"-3.08",
                    "increase":"-0.780",
                    "name":"恒泰实达",
                    "nowPri":"24.570",
                    "reservePri":"24.580",
                    "sellFive":"7600",
                    "sellFivePri":"24.670",
                    "sellFour":"100",
                    "sellFourPri":"24.650",
                    "sellOne":"1200",
                    "sellOnePri":"24.580",
                    "sellThree":"4400",
                    "sellThreePri":"24.640",
                    "sellTwo":"100",
                    "sellTwoPri":"24.630",
                    "time":"14:01:12",
                    "todayMax":"25.410",
                    "todayMin":"24.490",
                    "todayStartPri":"25.410",
                    "traAmount":"8268301.400",
                    "traNumber":"3329",
                    "yestodEndPri":"25.350"
                },
                "dapandata":{
                    "dot":"24.57",
                    "name":"恒泰实达",
                    "nowPic":"-0.780",
                    "rate":"-3.08",
                    "traAmount":"826",
                    "traNumber":"3329"
                },
                "gopicture":{
                    "minurl":"http://image.sinajs.cn/newchart/min/n/sz300513.gif",
                    "dayurl":"http://image.sinajs.cn/newchart/daily/n/sz300513.gif",
                    "weekurl":"http://image.sinajs.cn/newchart/weekly/n/sz300513.gif",
                    "monthurl":"http://image.sinajs.cn/newchart/monthly/n/sz300513.gif"
                }
            }
        ],
        "error_code":0
    }
    

    上证指数:type 为0

    {
        "error_code":0,
        "reason":"SUCCESSED!",
        "result":{
            "dealNum":"98054247",
            "dealPri":"102152527478",
            "highPri":"2760.4744",
            "increPer":"-0.98",
            "increase":"-26.9903",
            "lowpri":"2707.5824",
            "name":"上证指数",
            "nowpri":"2713.4526",
            "openPri":"2736.5256",
            "time":"2018-08-06 14:06:04",
            "yesPri":"2740.4429"
        }
    }
    

    深证指数:type 为1

    {
        "error_code":0,
        "reason":"SUCCESSED!",
        "result":{
            "dealNum":"11854689495",
            "dealPri":"119373194293.806",
            "highPri":"8638.366",
            "increPer":"-1.64",
            "increase":"-141.254",
            "lowpri":"8421.821",
            "name":"深证成指",
            "nowpri":"8460.864",
            "openPri":"8582.430",
            "time":"2018-08-06 14:05:36",
            "yesPri":"8602.118"
        }
    }
    

    2.香港股市 :默认获取恒生指数,无需再次操作

    image.png

    返回参数:包含了恒生指数

    {
        "resultcode":"200",
        "reason":"SUCCESSED!",
        "result":[
            {
                "data":{
                    "gid":"hk00001",
                    "ename":"CKH HOLDINGS",
                    "name":"长和",
                    "openpri":"84.800",
                    "formpri":"84.000",
                    "maxpri":"88.150",
                    "minpri":"84.500",
                    "lastestpri":"87.800",
                    "uppic":"3.800",
                    "limit":"4.524",
                    "inpic":"87.800",
                    "outpic":"87.850",
                    "traAmount":"588255243.072",
                    "traNumber":"6799476",
                    "priearn":"9.105",
                    "max52":"107.000",
                    "min52":"80.600",
                    "date":"2018/08/06",
                    "time":"14:08:56"
                },
                "gopicture":{
                    "minurl":"http://image.sinajs.cn/newchart/hk_stock/min/00001.gif",
                    "dayurl":"http://image.sinajs.cn/newchart/hk_stock/daily/00001.gif",
                    "weekurl":"http://image.sinajs.cn/newchart/hk_stock/weekly/00001.gif",
                    "monthurl":"http://image.sinajs.cn/newchart/hk_stock/monthly/00001.gif"
                },
                "hengsheng_data":{
                    "date":"2018/08/06",
                    "formpri":"27676.320",
                    "lastestpri":"27816.701",
                    "limit":"0.510",
                    "max52":"33484.078",
                    "maxpri":"28074.531",
                    "min52":"26863.711",
                    "minpri":"27748.828",
                    "openpri":"27885.510",
                    "time":"14:08:58",
                    "traAmount":"58276632.410000",
                    "uppic":"140.380"
                }
            }
        ],
        "error_code":0
    }
    

    3.美国股市:无法get大盘指数

    image.png

    返回参数:不包含所属大盘

    {
        "resultcode":"200",
        "reason":"SUCCESSED!",
        "result":[
            {
                "data":{
                    "gid":"aapl",
                    "name":"苹果",
                    "lastestpri":"207.9900",
                    "openpri":"207.0300",
                    "formpri":"207.3900",
                    "maxpri":"208.7400",
                    "minpri":"205.4803",
                    "uppic":"0.6000",
                    "limit":"0.29",
                    "traAmount":"33447396",
                    "avgTraNumber":"30526890",
                    "markValue":"1015441914330",
                    "max52":"208.7400",
                    "min52":"149.1600",
                    "EPS":"8.33",
                    "priearn":"24.97",
                    "beta":"0.00",
                    "divident":"0.73",
                    "ROR":"0.00",
                    "capital":"4882167000",
                    "afterpic":"207.9300",
                    "afterlimit":"-0.03",
                    "afteruppic":"-0.06",
                    "aftertime":"Aug 03 08:00PM EDT",
                    "ustime":"Aug 03 04:00PM EDT",
                    "chtime":"2018-08-04 08:34:50"
                },
                "gopicture":{
                    "minurl":"http://image.sinajs.cn/newchartv5/usstock/min/aapl.gif",
                    "min_weekpic":"http://image.sinajs.cn/newchartv5/usstock/min_week/aapl.gif",
                    "dayurl":"http://image.sinajs.cn/newchartv5/usstock/daily/aapl.gif",
                    "weekurl":"http://image.sinajs.cn/newchartv5/usstock/weekly/aapl.gif",
                    "monthurl":"http://image.sinajs.cn/newchartv5/usstock/monthly/aapl.gif"
                }
            }
        ],
        "error_code":0
    }
    

    相关文章

      网友评论

          本文标题:【免费接口】聚合数据-股票查询数据

          本文链接:https://www.haomeiwen.com/subject/vpawvftx.html