免费金融数据API(基金,股票),基金股票网格交易模拟服务

文档地址 www.doctorxiong.club/api

网站主页 www.doctorxiong.club

使用真实数据对基金股票进行网格交易模拟,可以自己设置本金,时间跨度,持有份额等,模拟真实的网格交易


image.png

API介绍

  1. 通过基金代码获取基金详情;
  2. 通过股票代码获取股票详情;
  3. 按条件获取基金排行;
  4. 按条件获取股票排行;
  5. 获取热门基金(属于基金规模较大,收益良好);
  6. 获取热门股票;
    8.获取基金持仓详情;

获取基金详情

请求方式GET
https://api.doctorxiong.club/v1/fund/detail?code=003171.
会返回这个基金所有信息的json数据,具体参看文档,数据太多,这里只贴出和解释部分数据

返回结果示例:所有字段在文档中都有详细的解释,货币基金与非货币基金是两种不同的数据格式,。

{
    "code": 200,
    "message": "操作成功",
    "data": {
        "code": "003171",
        "name": "信达澳银慧理财货币",
        "type": "货币型",
        "monthGrowth": 0.1,
        "threeMonthGrowth": 0.28,
        "sixMonthGrowth": 0.7,
        "yearGrowth": 1.98,
        "buyMin": 100,
        "buySourceRate": 0,
        "buyRate": 0,
        "manager": "孔学峰",
        "fundScale": "0.20亿(2019-03-31)",
        "millionCopiesIncomeData": [
            [
                "160923",
                0.4773
            ],
            [
                "160925",
                0.9546
            ]
        ],
        "millionCopiesIncomeDate": "2019-06-27 00:00",
        "sevenDaysYearIncome": 1.073,
        "sevenDaysYearIncomeDate": [
            [
                "160923",
                2.131
            ],
            [
                "160925",
                1.706
            ]
        ]
    },
    "meta": "003171"
}

获取基金排行

基金的排行条件数据较多,目前只支持json格式的数据请求
可以支持基金类型,基金公司,基金评级,成立年限,基金规模等按收益进行排行

比如下面这个请求就是获取嘉实,易方达,博时,汇添富的指数型,股票型,混合型基金,成立年限小于5,基金规模小于100的基金按照近一周的收益进行排行。

{
        "fundType": ["指数型","股票型","混合型"],
        "sort":"lastMonth",
        "creatTimeLimit":5,
        "fundCompany":["嘉实","易方达","博时","汇添富"],
        "fundScale": 100
}

返回示例

{
    "code": 200,
    "message": "操作成功",
    "data": [
        {
            "code": "004424",
            "name": "汇添富文体娱乐混合",
            "netWorth": "1.2547",
            "dayGrowth": "0.2637",
            "lastWeekGrowth": "3.60",
            "lastMonthGrowth": "10.3227",
            "lastThreeMonthGrowth": "10.5560",
            "lastSixMonthGrowth": "32.2268",
            "lastYearGrowth": "25.47",
            "thisYearGrowth": "31.8793"
        },
        {
            "code": "000950",
            "name": "易方达沪深300非银ETF联接",
            "netWorth": "1.0310",
            "dayGrowth": "0.1165",
            "lastWeekGrowth": "-0.2998",
            "lastMonthGrowth": "9.6459",
            "lastThreeMonthGrowth": "9.7392",
            "lastSixMonthGrowth": "42.9166",
            "lastYearGrowth": "40.0054",
            "thisYearGrowth": "42.9166"
        }
    ],
    "meta": {
        "pageIndex": 1,
        "pageSize": 2
    }
}

获取股票详情

两个参数code为股票代码,year为查询K线查询年限,目前只支持五年内的数据,默认查询今年的,数据的刷新间隔为每分钟。

查询000001,也就是大家说的上证指数
https://api.doctorxiong.club/v1/stock/detail?code=000001.

真实数据过长,当日分时数据和K线数据只保留了部分

{
    "code": 200,
    "message": "操作成功",
    "data": {
        "code": "000001",
        "name": "上证指数",
        "open": 2992.2426,
        "close": 2996.7926,
        "price": 2978.88,
        "priceChange": -13.3626,
        "changePercent": -0.447,
        "high": 2992.2426,
        "low": 2961.2225,
        "volume": 1814315.23,
        "amount": 18364176.74,
        "date": "2019-06-28 15:00",
        "dayMinData": [
            [
                "0930",
                2992.24,
                5366055
            ],
            [
                "1500",
                2978.88,
                181431523
            ]
        ],
        "dailyData": [
            [
                "190628",
                2992.24,
                2978.88,
                2992.24,
                2961.22,
                181431523
            ]
        ]
    },
    "meta": "sh000001"
}

推荐阅读更多精彩内容