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

Method testBlofin

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

Source from the content-addressed store, hash-verified

2549 }
2550
2551 public java.util.concurrent.CompletableFuture<Object> testBlofin()
2552 {
2553
2554 return java.util.concurrent.CompletableFuture.supplyAsync(() -> {
2555
2556 Exchange exchange = this.initOfflineExchange("blofin");
2557 Object id = "ec6dd3a7dd982d0b";
2558 Object request = null;
2559 try
2560 {
2561 (exchange.createOrder("LTC/USDT:USDT", "market", "buy", 1)).join();
2562 } catch(Exception e)
2563 {
2564 request = jsonParse(exchange.last_request_body);
2565 }
2566 Object brokerId = Helpers.GetValue(request, "brokerId");
2567 Object idString = String.valueOf(id);
2568 Assert(((String)brokerId).startsWith(((String)idString)), Helpers.add(Helpers.add(Helpers.add("blofin - brokerId: ", brokerId), " does not start with id: "), idString));
2569 if (!Helpers.isTrue(isSync()))
2570 {
2571 (close(exchange)).join();
2572 }
2573 return true;
2574 });
2575
2576 }
2577
2578 // async testHyperliquid () {
2579 // const exchange = this.initOfflineExchange ('hyperliquid');

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