From d663147264d0fc97e9e7ddbd4aeee69e833ad025 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 02 Jun 2026 15:14:02 +0800
Subject: [PATCH] fix(okxNewPrice): 修复合约面值配置错误并更新文档

---
 src/main/java/com/xcong/excoin/modules/okxNewPrice/okxpi/config/RequestHandler.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxpi/config/RequestHandler.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxpi/config/RequestHandler.java
index 17c0d82..da84578 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxpi/config/RequestHandler.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxpi/config/RequestHandler.java
@@ -118,9 +118,20 @@
         if (null == secretKey || secretKey.isEmpty() || null == apiKey || apiKey.isEmpty()) {
             throw new FebsException("[RequestHandler] Secret key/API key cannot be null or empty!");
         }
-        //parameters.put("timestamp", UrlBuilder.buildTimestamp());
-        //String queryString = UrlBuilder.joinQueryParameters(parameters);
-        //String signature = SignatureGenerator.getSignature(queryString, secretKey);
         return sendApiRequest(baseUrl, urlPath, parameters, httpMethod, RequestType.SIGNED, isSimluate);
     }
+
+    public String sendSignedRequestRaw(String baseUrl, String urlPath, String rawBody,
+                                        HttpMethod httpMethod, boolean isSimluate) {
+        if (null == secretKey || secretKey.isEmpty() || null == apiKey || apiKey.isEmpty()) {
+            throw new FebsException("[RequestHandler] Secret key/API key cannot be null or empty!");
+        }
+        String fullUrl = UrlBuilder.buildFullUrl(baseUrl, urlPath, null, null);
+        log.debug("{} {}", httpMethod, fullUrl);
+        String timestamp = DateUtils.format(DateUtils.FORMAT_UTC_ISO8601, new Date(), 0);
+        String queryString = urlPath;
+        String sign = SignUtils.signRest(secretKey, timestamp, httpMethod.toString(), queryString, rawBody);
+        Request request = RequestBuilder.buildApiKeyRequest(fullUrl, rawBody, passphrase, sign, timestamp, httpMethod, apiKey, isSimluate);
+        return ResponseHandler.handleResponse(request, isSimluate);
+    }
 }

--
Gitblit v1.9.1