const api_URL = 'http://boniu.xazhima.com/api/v1.0/demo/'
const download_URL = 'http://bn-data.xazhima.com/sdk/'
const stockApiList = [
  {
    name: "股票基本信息",
    url: "/stocks/basicInfo",
    key: "basicInfo",
    data: {
      download: download_URL + 'stock_info.sdk',
      url: api_URL + 'stock_info.html',
      params: 'method=stock_info&code=股票代码&timestamp=时间戳&sign=签名值',
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "股票代码",
        },
        {
          key: "4",
          name: "name",
          desc: "股票名称",
        },
        {
          key: "5",
          name: "sector",
          desc: "交易板块",
        },
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "2",
          type: "交易板块错误",
          code: 302,
          message: "交易板块不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
  {
    name: "股票当天信息",
    url: "/stocks/now",
    key: "now",
    data: {
      download: download_URL + 'stock_current_day.sdk',
      url: api_URL + 'stock_current_day.html',
      params: 'method=stock_current_day&timestamp=时间戳&code=股票代码&fq_price=复权&sign=签名值',
      paramsInfo: [
        '1.如果取日期时间不是交易日，则使用这个日期之前的最近一个交易日',
        '2.输入参数中fq_price代表复权，0：不复权 1:前复权'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "指数代码",
        },
        {
          key: "4",
          name: "name",
          desc: "股票名称",
        },
        {
          key: "5",
          name: "date",
          desc: "交易日期",
        },
        {
          key: "6",
          name: "fq_price",
          desc: "是否复权",
        },
        {
          key: "7",
          name: "open_price",
          desc: "开盘价",
        },
        {
          key: "8",
          name: "highest_price",
          desc: "最高价",
        },
        {
          key: "9",
          name: "lowest_price",
          desc: "最低价",
        },
        {
          key: "10",
          name: "amount",
          desc: "成交量",
        },
        {
          key: "11",
          name: "value",
          desc: "成交金额",
        },
        {
          key: "12",
          name: "increase_sign",
          desc: "收盘涨跌停标志",
        },
        {
          key: "13",
          name: "up_price",
          desc: "涨停价",
        },
        {
          key: "14",
          name: "down_price",
          desc: "跌停价",
        },
        {
          key: "15",
          name: "increase_ratio",
          desc: "涨跌幅",
        },
        {
          key: "16",
          name: "increase_price",
          desc: "涨跌额",
        },
        {
          key: "17",
          name: "if_st",
          desc: "是否ST",
        },
        {
          key: "18",
          name: "m5",
          desc: "5日线",
        },
        {
          key: "19",
          name: "m10",
          desc: "10日线",
        },
        {
          key: "20",
          name: "m20",
          desc: "20日线",
        },
        {
          key: "21",
          name: "m30",
          desc: "30日线",
        },
        {
          key: "22",
          name: "m60",
          desc: "60日线",
        },
        {
          key: "23",
          name: "m233",
          desc: "233线",
        },
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "2",
          type: "交易板块错误",
          code: 302,
          message: "交易板块不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
  {
    name: "时间段信息（股票代码+起止日期）",
    url: "/stocks/time",
    key: "time",
    data: {
      download: download_URL + 'stock_day_k.sdk',
      url: api_URL + 'stock_day_k.html',
      params: 'method=stock_day_k&timestamp=时间戳&code=股票代码&sign=签名值&start_date=开始日期&end_date=结束日期&order=列表正序/倒序&fq_price=复权',
      paramsInfo: [
        '输入参数中fq_price代表复权，0：不复权 1:前复权'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "股票代码",
        },
        {
          key: "4",
          name: "fq_price",
          desc: "夫否复权",
        },
        {
          key: "5",
          name: "start_date",
          desc: "开始日期",
        },
        {
          key: "6",
          name: "end_date",
          desc: "结束日期",
        },
        {
          key: "7",
          name: "order",
          desc: "列表正序/倒序"
        },
        {
          key: '8',
          name: 'list',
          desc: '',
          children: [
            {
              key: "9",
              name: "code",
              desc: "股票代码",
            },
            {
              key: "10",
              name: "name",
              desc: "股票名称",
            },
            {
              key: "11",
              name: "fq_price",
              desc: "是否复权",
            },
            {
              key: "12",
              name: "date",
              desc: "交易日期",
            },
            {
              key: "13",
              name: "open_price",
              desc: "开盘价",
            },
            {
              key: "14",
              name: "close_price",
              desc: "收盘价",
            },
            {
              key: "15",
              name: "highest_price",
              desc: "最高价",
            },
            {
              key: "16",
              name: "lowest_price",
              desc: "最低价",
            },
            {
              key: "17",
              name: "amount",
              desc: "成交量",
            },
            {
              key: "18",
              name: "value",
              desc: "成交金额",
            },
            {
              key: "19",
              name: "increase_sign",
              desc: "涨跌停标志",
            },
            {
              key: "20",
              name: "up_price",
              desc: "涨停价",
            },
            {
              key: "21",
              name: "down_price",
              desc: "跌停价",
            },
            {
              key: "22",
              name: "increase_ratio",
              desc: "涨跌幅",
            },
            {
              key: "23",
              name: "increase_price",
              desc: "涨跌额",
            },
            {
              key: "24",
              name: "if_st",
              desc: "是否ST",
            },
            {
              key: "25",
              name: "m5",
              desc: "5日线",
            },
            {
              key: "26",
              name: "m10",
              desc: "10日线",
            },
            {
              key: "27",
              name: "m20",
              desc: "20日线",
            },
            {
              key: "28",
              name: "m30",
              desc: "30日线",
            },
            {
              key: "29",
              name: "m60",
              desc: "60日线",
            },
            {
              key: "30",
              name: "m233",
              desc: "233线",
            }
          ]
        }
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
  {
    name: "股票回溯",
    url: "/stocks/back",
    key: "back",
    data: {
      download: download_URL + 'stock_recent_days.sdk',
      url: api_URL + 'stock_recent_days.html',
      params: 'method=stock_recent_days&timestamp=时间戳&code=股票代码&sign=签名值&start_date=开始日期& traceback_days=回溯天数&order=列表正序/倒序&fq_price=复权',
      paramsInfo: [
        '输入参数中fq_price代表复权，0：不复权 1:前复权',
        '回溯天数，取交易日'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "股票代码",
        },
        {
          key: "5",
          name: "start_date",
          desc: "开始日期",
        },
        {
          key: "6",
          name: "traceback_days",
          desc: "回溯天数",
        },
        {
          key: "11",
          name: "fq_price",
          desc: "是否复权",
        },
        {
          key: "7",
          name: "order",
          desc: "列表正序/倒序",
        },
        {
          key: '8',
          name: 'list',
          desc: '',
          children: [
            {
              key: "9",
              name: "code",
              desc: "股票代码",
            },
            {
              key: "10",
              name: "name",
              desc: "股票名称",
            },
            {
              key: "4",
              name: "fq_price",
              desc: "是否复权",
            },
            {
              key: "12",
              name: "date",
              desc: "交易日期",
            },
            {
              key: "13",
              name: "open_price",
              desc: "开盘价",
            },
            {
              key: "14",
              name: "close_price",
              desc: "收盘价",
            },
            {
              key: "15",
              name: "highest_price",
              desc: "最高价",
            },
            {
              key: "16",
              name: "lowest_price",
              desc: "最低价",
            },
            {
              key: "17",
              name: "amount",
              desc: "成交量",
            },
            {
              key: "18",
              name: "value",
              desc: "成交金额",
            },
            {
              key: "19",
              name: "increase_sign",
              desc: "涨跌停标志",
            },
            {
              key: "20",
              name: "up_price",
              desc: "涨停价",
            },
            {
              key: "21",
              name: "down_price",
              desc: "跌停价",
            },
            {
              key: "22",
              name: "increase_ratio",
              desc: "涨跌幅",
            },
            {
              key: "23",
              name: "increase_price",
              desc: "涨跌额",
            },
            {
              key: "24",
              name: "if_st",
              desc: "是否ST",
            },
            {
              key: "25",
              name: "m5",
              desc: "5日线",
            },
            {
              key: "26",
              name: "m10",
              desc: "10日线",
            },
            {
              key: "27",
              name: "m20",
              desc: "20日线",
            },
            {
              key: "28",
              name: "m30",
              desc: "30日线",
            },
            {
              key: "29",
              name: "m60",
              desc: "60日线",
            },
            {
              key: "30",
              name: "m233",
              desc: "233线",
            }
          ]
        }
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
  {
    name: "股票某天信息",
    url: "/stocks/someDay",
    key: "someDay",
    data: {
      download: download_URL + 'stock_any_day.sdk',
      url: api_URL + 'stock_any_day.html',
      params: 'method=stock_any_day&timestamp=时间戳&code=股票代码&date=交易日期&sign=签名值fq_price=复权',
      paramsInfo: [
        '输入参数中fq_price代表复权，0：不复权 1:前复权'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "股票代码",
        },
        {
          key: "4",
          name: "name",
          desc: "股票名称",
        },
        {
          key: "5",
          name: "fq_price",
          desc: "是否复权",
        },
        {
          key: "6",
          name: "date",
          desc: "交易日期",
        },
        {
          key: "7",
          name: "open_price",
          desc: "开盘价",
        },
        {
          key: "8",
          name: "close_price",
          desc: "收盘价",
        },
        {
          key: "9",
          name: "highest_price",
          desc: "最高价",
        },
        {
          key: "10",
          name: "lowest_price",
          desc: "最低价",
        },
        {
          key: "11",
          name: "value",
          desc: "成交量",
        },
        {
          key: "12",
          name: "increase_sign",
          desc: "涨跌停标志",
        },
        {
          key: "20",
          name: "up_price",
          desc: "涨停价",
        },
        {
          key: "21",
          name: "down_price",
          desc: "跌停价",
        },
        {
          key: "22",
          name: "increase_ratio",
          desc: "涨跌幅",
        },
        {
          key: "23",
          name: "increase_price",
          desc: "涨跌额",
        },
        {
          key: "24",
          name: "if_st",
          desc: "是否ST",
        },
        {
          key: "25",
          name: "m5",
          desc: "5日线",
        },
        {
          key: "26",
          name: "m10",
          desc: "10日线",
        },
        {
          key: "27",
          name: "m20",
          desc: "20日线",
        },
        {
          key: "28",
          name: "m30",
          desc: "30日线",
        },
        {
          key: "29",
          name: "m60",
          desc: "60日线",
        },
        {
          key: "30",
          name: "m233",
          desc: "233线",
        },
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
  {
    name: "股票列表信息",
    url: "/stocks/list",
    key: "list",
    data: {
      download: download_URL + 'stock_list.sdk',
      url: api_URL + 'stock_list.html',
      params: 'method=stock_list&timestamp=时间戳&pagesize=页面大小&page=分页数& sector=交易板块&sign=签名值',
      paramsInfo: [
        'page参数为空、0、-1表示不分页，其他分页参数默认pagesize为10',
        'sector参数为空或0表示全部交易板块，10-上证主板，11-科创板，20-深证主板，21-中小板'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "sector",
          desc: "交易板块",
        },
        {
          key: "4",
          name: "pagesize",
          desc: "页面大小",
        },
        {
          key: "5",
          name: "page",
          desc: "分页数",
        },
        {
          key: "6",
          name: "count",
          desc: "总数量",
        },
        {
          key: "7",
          name: "page_count",
          desc: "总页数",
        },
        {
          key: '8',
          name: 'list',
          desc: '',
          children: [
            {
              key: "9",
              name: "code",
              desc: "股票代码",
            },
            {
              key: "10",
              name: "name",
              desc: "股票名称",
            },
            {
              key: "11",
              name: "sector",
              desc: "交易板块",
            }
          ]
        }
      ],
      errorResult: [
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
        {
          key: "6",
          type: "交易板块错误",
          code: 302,
          message: "交易板块不存在/错误",
        },
      ],
    },
  },
  {
    name: "股票距离某天最近一个交易日",
    url: "/stocks/lastTime",
    key: "lastTime",
    data: {
      download: download_URL + 'stock_least_day.sdk',
      url: api_URL + 'stock_least_day.html',
      params: 'method= stock_least_day&timestamp=时间戳&code=股票代码&date=交易日期&sign=签名值fq_price=复权',
      paramsInfo: [
        '输入参数中fq_price代表复权，0：不复权 1:前复权'
      ],
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200,
        },
        {
          key: "2",
          name: "message",
          desc: "success",
        },
        {
          key: "3",
          name: "code",
          desc: "股票代码",
        },
        {
          key: "4",
          name: "name",
          desc: "股票名称",
        },
        {
          key: "5",
          name: "fq_price",
          desc: "是否复权",
        },
        {
          key: "6",
          name: "date",
          desc: "交易日期",
        },
        {
          key: "7",
          name: "open_price",
          desc: "开盘价",
        },
        {
          key: "50",
          name: "close_price",
          desc: "收盘价",
        },
        {
          key: "8",
          name: "highest_price",
          desc: "最高价",
        },
        {
          key: "9",
          name: "lowest_price",
          desc: "最低价",
        },
        {
          key: "10",
          name: "amount",
          desc: "成交量",
        },
        {
          key: "11",
          name: "value",
          desc: "成交金额",
        },
        {
          key: "12",
          name: "increase_sign",
          desc: "收盘涨跌停标志",
        },
        {
          key: "13",
          name: "up_price",
          desc: "涨停价",
        },
        {
          key: "14",
          name: "down_price",
          desc: "跌停价",
        },
        {
          key: "15",
          name: "increase_ratio",
          desc: "涨跌幅",
        },
        {
          key: "16",
          name: "increase_price",
          desc: "涨跌额",
        },
        {
          key: "17",
          name: "if_st",
          desc: "是否ST",
        },
        {
          key: "18",
          name: "m5",
          desc: "5日线",
        },
        {
          key: "19",
          name: "m10",
          desc: "10日线",
        },
        {
          key: "20",
          name: "m20",
          desc: "20日线",
        },
        {
          key: "21",
          name: "m30",
          desc: "30日线",
        },
        {
          key: "22",
          name: "m60",
          desc: "60日线",
        },
        {
          key: "23",
          name: "m233",
          desc: "233线",
        },
      ],
      errorResult: [
        {
          key: "1",
          type: "股票代码错误",
          code: 301,
          message: "股票代码不存在/错误",
        },
        {
          key: "3",
          type: "签名错误",
          code: 304,
          message: "非法签名",
        },
        {
          key: "4",
          type: "返回数据为空",
          code: 401,
          message: "股票数据为空",
        },
        {
          key: "5",
          type: "服务器错误",
          code: 501,
          message: "服务器错误",
        },
      ],
    },
  },
];

export default stockApiList;
