()
| 2467 | } |
| 2468 | |
| 2469 | public java.util.concurrent.CompletableFuture<Object> testCoinex() |
| 2470 | { |
| 2471 | |
| 2472 | return java.util.concurrent.CompletableFuture.supplyAsync(() -> { |
| 2473 | |
| 2474 | Exchange exchange = this.initOfflineExchange("coinex"); |
| 2475 | Object id = "x-167673045"; |
| 2476 | Assert(Helpers.isEqual(Helpers.GetValue(exchange.options, "brokerId"), id), Helpers.add(Helpers.add("coinex - id: ", id), " not in options")); |
| 2477 | Object spotOrderRequest = null; |
| 2478 | try |
| 2479 | { |
| 2480 | (exchange.createOrder("BTC/USDT", "limit", "buy", 1, 20000)).join(); |
| 2481 | } catch(Exception e) |
| 2482 | { |
| 2483 | spotOrderRequest = jsonParse(exchange.last_request_body); |
| 2484 | } |
| 2485 | Object clientOrderId = Helpers.GetValue(spotOrderRequest, "client_id"); |
| 2486 | Object idString = String.valueOf(id); |
| 2487 | Assert(((String)clientOrderId).startsWith(((String)idString)), Helpers.add(Helpers.add(Helpers.add("coinex - clientOrderId: ", clientOrderId), " does not start with id: "), idString)); |
| 2488 | if (!Helpers.isTrue(isSync())) |
| 2489 | { |
| 2490 | (close(exchange)).join(); |
| 2491 | } |
| 2492 | return true; |
| 2493 | }); |
| 2494 | |
| 2495 | } |
| 2496 | |
| 2497 | public java.util.concurrent.CompletableFuture<Object> testBingx() |
| 2498 | { |
no test coverage detected