()
| 2258 | } |
| 2259 | |
| 2260 | public java.util.concurrent.CompletableFuture<Object> testKucoinfutures() |
| 2261 | { |
| 2262 | |
| 2263 | return java.util.concurrent.CompletableFuture.supplyAsync(() -> { |
| 2264 | |
| 2265 | Exchange exchange = this.initOfflineExchange("kucoinfutures"); |
| 2266 | Object reqHeaders = null; |
| 2267 | Object id = "ccxtfutures"; |
| 2268 | Object futureId = Helpers.GetValue(Helpers.GetValue(Helpers.GetValue(exchange.options, "partner"), "future"), "id"); |
| 2269 | Object futureKey = Helpers.GetValue(Helpers.GetValue(Helpers.GetValue(exchange.options, "partner"), "future"), "key"); |
| 2270 | Assert(Helpers.isEqual(futureId, id), Helpers.add(Helpers.add("kucoinfutures - id: ", futureId), " not in options.")); |
| 2271 | Assert(Helpers.isEqual(futureKey, "1b327198-f30c-4f14-a0ac-918871282f15"), Helpers.add(Helpers.add("kucoinfutures - key: ", futureKey), " not in options.")); |
| 2272 | try |
| 2273 | { |
| 2274 | Helpers.addElementToObject(exchange.options, "uta", false); |
| 2275 | (exchange.createOrder("BTC/USDT:USDT", "limit", "buy", 1, 20000)).join(); |
| 2276 | } catch(Exception e) |
| 2277 | { |
| 2278 | reqHeaders = exchange.last_request_headers; |
| 2279 | } |
| 2280 | Assert(Helpers.isEqual(Helpers.GetValue(reqHeaders, "KC-API-PARTNER"), id), Helpers.add(Helpers.add("kucoinfutures - id: ", id), " not in headers.")); |
| 2281 | try |
| 2282 | { |
| 2283 | Helpers.addElementToObject(exchange.options, "uta", true); |
| 2284 | (exchange.createOrder("BTC/USDT:USDT", "limit", "buy", 1, 20000)).join(); |
| 2285 | } catch(Exception e) |
| 2286 | { |
| 2287 | reqHeaders = exchange.last_request_headers; |
| 2288 | } |
| 2289 | Assert(Helpers.isEqual(Helpers.GetValue(reqHeaders, "KC-API-PARTNER"), id), Helpers.add(Helpers.add("kucoinfutures - id: ", id), " not in headers for uta orders.")); |
| 2290 | if (!Helpers.isTrue(isSync())) |
| 2291 | { |
| 2292 | (close(exchange)).join(); |
| 2293 | } |
| 2294 | return true; |
| 2295 | }); |
| 2296 | |
| 2297 | } |
| 2298 | |
| 2299 | public java.util.concurrent.CompletableFuture<Object> testBitget() |
| 2300 | { |
no test coverage detected