// 周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线
export type CycleType = 0 | 1 | 2 | 3 | 120 | 240 | 11;

export interface QueryHistoryTikDatas {
    goodsCode: string, // 商品代码
    startTime?: string, // 开始时间，格式：yyyy-MM-dd HH:mm:ss
    endTime?: string, // 结束时间，格式：yyyy-MM-dd HH:mm:ss
    count?: number, // 条数
    isAsc? : boolean, // 是否按时间顺序排序（默认为时间倒序排序）
}

export interface QueryHistoryDatas extends QueryHistoryTikDatas {
    cycleType: CycleType, // 周期类型,
}

export interface QueryHistoryDatasRsp {
    c: number; //收盘价
    h: number; //最高价
    hv: number; //持仓量
    l: number; //最低价
    o: number; //开盘价
    s: number; //结算价，日线周期（包括）以上才有
    ts: string; //时间
    tt: number; //总金额
    tv: number; //总量
}

export interface QueryHistoryTikDatasRsp {
    AV: number;
    Ask: number;
    BV: number;
    Bid: number;
    HI: number;
    HV: number;
    PE: number;
    TDR: number;
    TK: number;
    TS: string;
    TT: number;
    Vol: number;
}

export interface historyDatas {
    c: number;
    f: boolean,
    h: number;
    hv: number;
    l: number;
    o: number;
    s: number;
    ts: string;
    tt: number;
    tv: number;
}
export interface QueryTSDataRsp {
    Count: number;
  decimalPlace: number;
  endTime: string;
  goodsCode: string;
   outGoodsCode: string;
  preSettle: number;
  startTime: string;
  tradeDate: string;
  historyDatas: historyDatas[],
  RunSteps: RunSteps[],
}

export interface RunSteps {
      end: string;
      endflag: number;
      endtime: string;
      endweekday: number;
      groupid: number;
      runstep: number;
      sectionid: number;
      start: string;
      startflag: number;
      starttime: string;
      startweekday: number;
      tradeweekday: number;
}

export interface QueryQuoteDayRsp {
  ask: number;
  ask1number: number;
  ask2: number;
  ask3: number;
  ask4: number;
  ask5: number;
  ask6: number;
  ask7: number;
  ask8: number;
  ask9: number;
  askorderid: number;
  askorderid2: number;
  askorderid3: number;
  askorderid4: number;
  askorderid5: number;
  askordervolume: number;
  askordervolume1number: number;
  askordervolume2: number;
  askordervolume3: number;
  askordervolume4: number;
  askordervolume5: number;
  askordervolume6: number;
  askordervolume7: number;
  askordervolume8: number;
  askordervolume9: number;
  askqueueinfo :string;
  askvolume: number;
  askvolume1number: number;
  askvolume2: number;
  askvolume3: number;
  askvolume4: number;
  askvolume5: number;
  askvolume6: number;
  askvolume7: number;
  askvolume8: number;
  askvolume9: number;
  averageprice: number;
  bid: number;
  bid1number: number;
  bid2: number;
  bid3: number;
  bid4: number;
  bid5: number;
  bid6: number;
  bid7: number;
  bid8: number;
  bid9: number;
  bidorderid: number;
  bidorderid2: number;
  bidorderid3: number;
  bidorderid4: number;
  bidorderid5: number;
  bidordervolume: number;
  bidordervolume1number: number;
  bidordervolume2: number;
  bidordervolume3: number;
  bidordervolume4: number;
  bidordervolume5: number;
  bidordervolume6: number;
  bidordervolume7: number;
  bidordervolume8: number;
  bidordervolume9: number;
  bidqueueinfo: string;
  bidvolume: number;
  bidvolume1number: number;
  bidvolume2: number;
  bidvolume3: number;
  bidvolume4: number;
  bidvolume5: number;
  bidvolume6: number;
  bidvolume7: number;
  bidvolume8: number;
  bidvolume9: number;
  calloptionpremiums: number;
  calloptionpremiums2: number;
  calloptionpremiums3: number;
  calloptionpremiums4: number;
  calloptionpremiums5: number;
  cleartime: number;
  exchangecode: number;
  exchangedate: number;
  goodscode: string;
  grepmarketprice: number;
  highest: number;
  holdincrement: number;
  holdvolume: number;
  iep: number;
  iev: number;
  inventory: number;
  iscleared: number;
  issettled: number;
  last: number;
  lastlot: number;
  lasttime: string;
  lastturnover: number;
  lastvolume: number;
  limitdown: number;
  limitup: number;
  lowest: number;
  nontotalholdervolume: number;
  nontotallot: number;
  nontotalturnover: number;
  nontotalvolume: number;
  opened: number;
  opentime: string;
  orderid: number;
  preclose: number;
  preholdvolume: number;
  presettle: number;
  publictradetype: string;
  putoptionpremiums: number;
  putoptionpremiums2: number;
  putoptionpremiums3: number;
  putoptionpremiums4: number;
  putoptionpremiums5: number;
  settle: number;
  strikeprice: number;
  totalaskvolume: number;
  totalbidvolume: number;
  totallot: number;
  totalturnover: number;
  totalvolume: number;
  utclasttime: string;
}
