const _url = "http://boniu.xazhima.com/api/v1.0/demo/";
const indexApiList = [
  {
    name: "指数基本信息",
    apiurl: _url + "index_list.html",
    inputpara: ["method=stock_info&code=股票代码&timestamp=时间戳&sign=签名值"],
    url: "/indexApi/indexBasicInfo",
    key: "indexBasic",
    data: {
      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: "交易板块"
        },
        {
          key: "6",
          name: "exchange",
          desc: "所属市场"
        }
      ],
      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: "指数当天信息",
    apiurl: _url + "index_current_day.html",
    inputpara: [
      "method=index_current_day&timestamp=时间戳&code=指数代码&sign=签名值",
      "参数说明：如果取日期时间不是交易日，则使用这个日期之前的最近一个交易日"
    ],
    url: "/indexApi/indexNow",
    key: "indexNow",
    data: {
      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: "open_price",
          desc: "开盘价"
        },
        {
          key: "7",
          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_ratio",
          desc: "涨跌幅"
        },
        {
          key: "13",
          name: "increase_price",
          desc: "涨跌额"
        }
      ],
      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: "时间段信息（指数代码+起止日期）",
    apiurl: _url + "index_day_k.html",
    inputpara: [
      "method=index_day_k&timestamp=时间戳&code=指数代码&sign=签名值&start_date=开始日期&end_date=结束日期&order=列表正序/倒序"
    ],
    url: "/indexApi/indexQuant",
    key: "indexQuant",
    data: {
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200
        },
        {
          key: "2",
          name: "message",
          desc: "success"
        },
        {
          key: "3",
          name: "code",
          desc: "指数代码"
        },
        {
          key: "4",
          name: "start_date",
          desc: "开始日期"
        },
        {
          key: "5",
          name: "end_date",
          desc: "结束日期"
        },
        {
          key: "6",
          name: "order",
          desc: "列表正序/倒序"
        },
        {
          key: "7",
          name: "list",
          desc: "",
          children: [
            {
              key: "3",
              name: "code",
              desc: "指数代码"
            },
            {
              key: "4",
              name: "name",
              desc: "指数名称"
            },
            {
              key: "5",
              name: "date",
              desc: "交易日期"
            },
            {
              key: "6",
              name: "open_price",
              desc: "开盘价"
            },
            {
              key: "7",
              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_ratio",
              desc: "涨跌幅"
            },
            {
              key: "13",
              name: "increase_price",
              desc: "涨跌额"
            }
          ]
        }
      ],

      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: "指数回溯",
    apiurl: _url + "index_recent_days.html",
    inputpara: [
      "method=ndex_recent_days&timestamp=时间戳&code=指数代码&sign=签名值&start_date=开始日期&traceback_days=回溯天数&order=列表正序/倒序",
      "参数说明：回溯天数，取交易日"
    ],
    url: "/indexApi/indexBack",
    key: "indexBack",
    data: {
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200
        },
        {
          key: "2",
          name: "message",
          desc: "success"
        },
        {
          key: "3",
          name: "code",
          desc: "指数代码"
        },
        {
          key: "4",
          name: "start_date",
          desc: "开始日期"
        },
        {
          key: "5",
          name: "end_date",
          desc: "回溯天数"
        },
        {
          key: "6",
          name: "order",
          desc: "列表正序/倒序"
        },
        {
          key: "7",
          name: "list",
          desc: "",
          children: [
            {
              key: "3",
              name: "code",
              desc: "指数代码"
            },
            {
              key: "4",
              name: "name",
              desc: "指数名称"
            },
            {
              key: "5",
              name: "date",
              desc: "交易日期"
            },
            {
              key: "6",
              name: "open_price",
              desc: "开盘价"
            },
            {
              key: "7",
              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_ratio",
              desc: "涨跌幅"
            },
            {
              key: "13",
              name: "increase_price",
              desc: "涨跌额"
            }
          ]
        }
      ],

      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: "指数某天信息",
    apiurl: _url + "index_any_day.html",
    inputpara: [
      "method=index_any_day&timestamp=时间戳&code=指数代码&date=交易日",
      "参数说明：无论是否查询日期是不是交易日，都输出结果，不需要向前推到最近的交易日"
    ],
    url: "/indexApi/indexSomeDay",
    key: "indexSomeDay",
    data: {
      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: "open_price",
          desc: "开盘价"
        },
        {
          key: "7",
          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_ratio",
          desc: "涨跌幅"
        },
        {
          key: "13",
          name: "increase_price",
          desc: "涨跌额"
        }
      ],
      errorResult: [
        {
          key: "1",
          type: "指数代码错误",
          code: 300,
          message: "指数代码不存在/错误"
        },
        {
          key: "2",
          type: "返回数据为空",
          code: 301,
          message: "指数数据为空"
        },
        {
          key: "3",
          type: "签名错误",
          code: 401,
          message: "非法签名"
        }
      ]
    }
  },
  {
    name: "指数列表信息",
    apiurl: _url + "index_list.html",
    inputpara: [
      "method=index_list&timestamp=时间戳&sign=签名值",
      "参数说明：指数列表不分页"
    ],
    url: "/indexApi/indexListInf",
    key: "indexListInf",
    data: {
      outputResult: [
        {
          key: "1",
          name: "message_code",
          desc: 200
        },
        {
          key: "2",
          name: "message",
          desc: "success"
        },
        {
          key: "3",
          name: "list",
          desc: "",
          children: [
            {
              key: "3",
              name: "code",
              desc: "指数代码"
            },
            {
              key: "3",
              name: "name",
              desc: "指数名称"
            },
            {
              key: "4",
              name: "name",
              desc: "sector"
            },
            {
              key: "5",
              name: "exchange",
              desc: "所属市场"
            }
          ]
        }
      ],
      errorResult: [
        {
          key: "1",
          type: "交易板块错误",
          code: 302,
          message: "交易板块不存在/错误"
        },
        {
          key: "2",
          type: "所属市场错误",
          code: 303,
          message: "所属市场不存在/错误"
        },
        {
          key: "3",
          type: "签名错误",
          code: 401,
          message: "非法签名"
        }
      ]
    }
  }
];

export default indexApiList;
