()
| 2522 | } |
| 2523 | |
| 2524 | public java.util.concurrent.CompletableFuture<Object> testPhemex() |
| 2525 | { |
| 2526 | |
| 2527 | return java.util.concurrent.CompletableFuture.supplyAsync(() -> { |
| 2528 | |
| 2529 | Exchange exchange = this.initOfflineExchange("phemex"); |
| 2530 | Object id = "CCXT123456"; |
| 2531 | Object request = null; |
| 2532 | try |
| 2533 | { |
| 2534 | (exchange.createOrder("BTC/USDT", "limit", "buy", 1, 20000)).join(); |
| 2535 | } catch(Exception e) |
| 2536 | { |
| 2537 | request = jsonParse(exchange.last_request_body); |
| 2538 | } |
| 2539 | Object clientOrderId = Helpers.GetValue(request, "clOrdID"); |
| 2540 | Object idString = String.valueOf(id); |
| 2541 | Assert(((String)clientOrderId).startsWith(((String)idString)), Helpers.add(Helpers.add(Helpers.add("phemex - clOrdID: ", clientOrderId), " does not start with id: "), idString)); |
| 2542 | if (!Helpers.isTrue(isSync())) |
| 2543 | { |
| 2544 | (close(exchange)).join(); |
| 2545 | } |
| 2546 | return true; |
| 2547 | }); |
| 2548 | |
| 2549 | } |
| 2550 | |
| 2551 | public java.util.concurrent.CompletableFuture<Object> testBlofin() |
| 2552 | { |
no test coverage detected