import { PageQueryParam, PageResult } from "../../base";

export interface ExchangeOrderQueryForm {
    amount: number;
    baseSymbol: string;
    canceledTime: number;
    coinSymbol: string;
    completedTime: number;
    currentPage: number;
    direction: number;
    memberId: number | string;
    orderId: number | string;
    orderResource: number;
    pageSize: number;
    price: number;
    status: number;
    symbol: string;
    time: number;
    tradedAmount: number;
    triggerPrice: number;
    turnover: number;
    type: number;
    useDiscount: string;
}

export interface walletQueryForm {
    address: string;
    balance: number;
    coinId: string | number;
    currentPage: number;
    frozenBalance: number;
    id: number | string;
    isLock: string;
    memberId: number | string;
    pageSize: number;
    toReleased: number;
    version: number;
}

export interface CoinsQueryForm {
    baseSymbol: string;
    coinSymbol: string;
    currentPage: number;
    enable: number;
    enableBuy: number;
    enableMarketBuy: number;
    enableMarketSell: number;
    enableSell: number;
    exchangeable: number;
    flag: number;
    pageSize: number;
    sort: number;
    symbol: string;
    zone: number;
}

export interface CoinSymbolConfigForm {
    coinSymbol: string;
    currentPage: number;
    pageSize: number;
    startTime: string;
    endTime: string;
}

export interface CoinSymbolConfig {
    id: number;
    coinSymbol: string;
    contractPrecision: number;
    showPrecision: number;
    isQuote: number;
    isOpen: number;
    icon: string;
    sort: number;
    name: string;
    tokenBase: string;
    tagType: number;
    ctime: string;
    mtime: string;
}

export interface CoinsPageResult {
    baseCoinScale: number;
    baseSymbol: string;
    clearTime: string;
    coinScale: number;
    coinSymbol: string;
    enable: number | string;
    enableBuy: number | string;
    enableMarketBuy: number | string;
    enableMarketSell: number | string;
    enableSell: number | string;
    endTime: string;
    exchangeable: number | string;
    fee: number;
    flag: number | string;
    instrument: string;
    maxBuyPrice: number;
    maxTradingOrder: number;
    maxTradingTime: number;
    maxVolume: number;
    minSellPrice: number;
    minTurnover: number;
    minVolume: number;
    publishAmount: number;
    publishPrice: number;
    publishType: number | string;
    robotType: number;
    sellFee: number;
    sort: number;
    startTime: string;
    symbol: string;
    visible: number;
    zone: number;
}

export interface ConfigSymbolQuery {
    pageNo: number;
    pageSize: number;
    base?: string;
    quote?: string;
    zone?: string;
    isOpen?: string;
}

export interface ConfigSymbolSlippage {
    id?: number;
    symbol?: string;
    amountMin: string;
    amountMax: string;
    slippage: string;
    isOpen: number;
    sort?: number;
    remark?: string;
}

export interface ConfigSymbol {
    id?: number;
    symbol: string;
    base: string;
    quote: string;
    isOpen: number;
    takerFee?: string;
    makerFee?: string;
    maxOrdersPerUser?: number;
    dailyVolumeLimit?: string;
    openPrice?: string;
    depth0Pre: number;
    depth1Pre: number;
    depth2Pre: number;
    pricePre: number;
    volumePre: number;
    publish: number;
    limitPriceMin?: string;
    limitVolumeMin?: string;
    marketBuyMin?: string;
    marketSellMin?: string;
    category?: string;
    label?: number;
    sort: number;
    description?: string;
    customize?: number;
    ctime?: string;
    mtime?: string;
    slippageList?: ConfigSymbolSlippage[];
}

export interface AdminOrderQuery {
    page: number;
    size: number;
    id?: string;
    userId?: string;
    symbol?: string;
    type?: string;
    side?: string;
    status?: string;
    ctimeBegin?: string;
    ctimeEnd?: string;
}

export interface ConfigRobot {
  id?: number;
  symbol: string;
  trend: number;
  openPrice: string;
  targetPrice?: string;
  hoverRange: string;
  minChangeRate: string;
  maxChangeRate: string;
  hoverMinChangeRate: string;
  hoverMaxChangeRate: string;
  bridgeMinRatio: string;
  bridgeMaxRatio: string;
  upProbability?: string;
  intervalMs: number;
  klineMaxHighRatio: string;
  klineMaxLowRatio: string;
  minuteChangeLimit?: string;
  status: number;
  remark?: string;
  createTime?: string;
  updateTime?: string;
}

export interface AdminTradeQuery {
    page: number;
    size: number;
    id?: string;
    orderId?: string;
    userId?: string;
    symbol?: string;
    side?: string;
    role?: string;
    ctimeBegin?: string;
    ctimeEnd?: string;
}
