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

Method testPhemex

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

Source from the content-addressed store, hash-verified

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 {

Callers 1

runBrokerIdTestsMethod · 0.95

Calls 9

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

Tested by

no test coverage detected