//package top.baogutang.admin.services.impl;
//
//import cn.hutool.core.bean.BeanUtil;
//import com.binance.connector.client.SpotClient;
//import com.binance.connector.client.WebSocketStreamClient;
//import com.fasterxml.jackson.core.type.TypeReference;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.stereotype.Service;
//import top.baogutang.admin.schedule.OkCoinMarketCandlesHandler;
//import top.baogutang.admin.services.IVirtualCoinService;
//import top.baogutang.common.utils.JacksonUtil;
//
//import javax.annotation.Resource;
//import java.util.Collections;
//import java.util.List;
//import java.util.Map;
//
///**
// * @description:
// * @author: nikooh
// * @date: 2024/08/23 : 17:50
// */
//@Slf4j
//@Service
//public class VirtualCoinServiceImpl implements IVirtualCoinService {
//
//    @Resource
//    private SpotClient spotClient;
//
//    @Resource
//    private WebSocketStreamClient webSocketStreamClient;
//
//
//    @Override
//    public List<String[]> uiKline(String symbol, String interval) {
//        OkCoinMarketCandlesHandler.KLinesRequestParameters kLinesRequestParameters = new OkCoinMarketCandlesHandler.KLinesRequestParameters(symbol, interval);
//        Map<String, Object> parameters = BeanUtil.beanToMap(kLinesRequestParameters, Boolean.FALSE, Boolean.TRUE);
//        String resultStr = spotClient.createMarket().uiKlines(parameters);
//        if (StringUtils.isBlank(resultStr)) {
//            log.error(">>>>>>>>>>request result is null!<<<<<<<<<<");
//            return Collections.emptyList();
//        }
//        return JacksonUtil.fromJson(resultStr, new TypeReference<List<String[]>>() {
//        });
//    }
//
//}
