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

Method testMexc

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

Source from the content-addressed store, hash-verified

2323 }
2324
2325 public java.util.concurrent.CompletableFuture<Object> testMexc()
2326 {
2327
2328 return java.util.concurrent.CompletableFuture.supplyAsync(() -> {
2329
2330 Exchange exchange = this.initOfflineExchange("mexc");
2331 Object reqHeaders = null;
2332 Object id = "CCXT";
2333 Assert(Helpers.isEqual(Helpers.GetValue(exchange.options, "broker"), id), Helpers.add(Helpers.add("mexc - id: ", id), " not in options"));
2334 (exchange.loadMarkets()).join();
2335 try
2336 {
2337 (exchange.createOrder("BTC/USDT", "limit", "buy", 1, 20000)).join();
2338 } catch(Exception e)
2339 {
2340 reqHeaders = exchange.last_request_headers;
2341 }
2342 Assert(Helpers.isEqual(Helpers.GetValue(reqHeaders, "source"), id), Helpers.add(Helpers.add("mexc - id: ", id), " not in headers."));
2343 if (!Helpers.isTrue(isSync()))
2344 {
2345 (close(exchange)).join();
2346 }
2347 return true;
2348 });
2349
2350 }
2351
2352 public java.util.concurrent.CompletableFuture<Object> testHtx()
2353 {

Callers 1

runBrokerIdTestsMethod · 0.95

Calls 10

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

Tested by

no test coverage detected