import request from '@/utils/request'

// 登录接口
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

// 获取币币
export function GetCoins() {
  return request({
    url: '/finance/trading_pair/get_display_coin/',
    method: 'get'
  })
}

//获取K线
export function GetCandlestickChart(id) {
  return request({
    url: `/finance/trading_pair/${id?.symbol}/get_kline/`,
    method: 'get',
    params: {
        interval: id.period,
        limit: 150
    }
  })
}


//交易对
export function TradingPair(id) {
    return request({
    url: `/finance/trading_pair/`,
    method: 'get',
    params: {
        pageSize: id.pageSize,
        pageNum: id.pageNum,
    }
  })
}