MCPcopy Index your code
hub / github.com/ccxt/ccxt / testCoinex

Method testCoinex

java/tests/src/main/java/tests/exchange/TestMain.java:2469–2495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers 1

runBrokerIdTestsMethod · 0.95

Calls 10

initOfflineExchangeMethod · 0.95
isEqualMethod · 0.95
GetValueMethod · 0.95
addMethod · 0.95
createOrderMethod · 0.95
isTrueMethod · 0.95
AssertMethod · 0.80
jsonParseMethod · 0.80
isSyncMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected