新版仿ok交易所-后端
1
zj
2025-09-30 0c389d73cc79a0027cf779721c6bf184b12f5d86
trading-order-huobi/src/main/java/com.yami.trading.huobi/hobi/internal/XinLangDataServiceImpl.java
@@ -65,17 +65,7 @@
    private ItemService itemService;
    public static void main(String[] args) {
        XinLangDataServiceImpl service = new XinLangDataServiceImpl();
        List<Realtime> usdsgd = service.realtimeSingle("USDSGD");
        for (Realtime re : usdsgd) {
            System.out.println(JSONObject.toJSONString(re));
        }
//        List<Kline> sz300750 = service.buildOneYearPeriod("AAPL");
//        System.out.println(sz300750.size());
//        List<Kline> eurusd = service.getTimeseriesByPeriodOneDay("EURUSD");
//        System.out.println(JSONObject.toJSONString(eurusd));
    }
    /**
@@ -142,10 +132,10 @@
        return list;
    }
    public List<Realtime> realtime(String symbols) {
        List<Realtime> realtimeList = realtimeSingle(symbols);
        return realtimeList;
    }
//    public List<Realtime> realtime(String symbols) {
//        List<Realtime> realtimeList = realtimeSingle(symbols);
//        return realtimeList;
//    }
    /**
     * 1day       历史数据  : 周期 1年
@@ -250,7 +240,6 @@
    public List<Kline> getTimeseriesByPeriodMinute(String currency, int scale, String period) {
        // https://vip.stock.finance.sina.com.cn/forex/api/jsonp.php/var%20_fx_seurusd_1_1688818651726=/NewForexService.getMinKline?symbol=fx_seurusd&scale=1&datalen=2000
        long nowTs = System.currentTimeMillis();
        String url = klineUrl.replace("{1}", currency.toLowerCase()).replace("{3}", nowTs + "").replace("{2}", scale + "");
        List<Kline> resList = new ArrayList<>();