MCPcopy
hub / github.com/ccxt/ccxt / testBitmart

Method testBitmart

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

Source from the content-addressed store, hash-verified

2440 }
2441
2442 public java.util.concurrent.CompletableFuture<Object> testBitmart()
2443 {
2444
2445 return java.util.concurrent.CompletableFuture.supplyAsync(() -> {
2446
2447 Exchange exchange = this.initOfflineExchange("bitmart");
2448 Object reqHeaders = null;
2449 Object id = "CCXTxBitmart000";
2450 Assert(Helpers.isEqual(Helpers.GetValue(exchange.options, "brokerId"), id), Helpers.add(Helpers.add("bitmart - id: ", id), " not in options"));
2451 (exchange.loadMarkets()).join();
2452 try
2453 {
2454 (exchange.createOrder("BTC/USDT", "limit", "buy", 1, 20000)).join();
2455 } catch(Exception e)
2456 {
2457 reqHeaders = exchange.last_request_headers;
2458 }
2459 Assert(Helpers.isEqual(Helpers.GetValue(reqHeaders, "X-BM-BROKER-ID"), id), Helpers.add(Helpers.add("bitmart - id: ", id), " not in headers"));
2460 if (!Helpers.isTrue(isSync()))
2461 {
2462 (close(exchange)).join();
2463 }
2464 return true;
2465 });
2466
2467 }
2468
2469 public java.util.concurrent.CompletableFuture<Object> testCoinex()
2470 {

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