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

Method testCryptocom

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

Source from the content-addressed store, hash-verified

2140 }
2141
2142 public java.util.concurrent.CompletableFuture<Object> testCryptocom()
2143 {
2144
2145 return java.util.concurrent.CompletableFuture.supplyAsync(() -> {
2146
2147 Exchange exchange = this.initOfflineExchange("cryptocom");
2148 Object id = "CCXT";
2149 (exchange.loadMarkets()).join();
2150 Object request = null;
2151 try
2152 {
2153 (exchange.createOrder("BTC/USDT", "limit", "buy", 1, 20000)).join();
2154 } catch(Exception e)
2155 {
2156 request = jsonParse(exchange.last_request_body);
2157 }
2158 Object brokerId = Helpers.GetValue(Helpers.GetValue(request, "params"), "broker_id");
2159 Assert(Helpers.isEqual(brokerId, id), Helpers.add(Helpers.add(Helpers.add("cryptocom - id: ", id), " different from broker_id: "), brokerId));
2160 if (!Helpers.isTrue(isSync()))
2161 {
2162 (close(exchange)).join();
2163 }
2164 return true;
2165 });
2166
2167 }
2168
2169 public java.util.concurrent.CompletableFuture<Object> testBybit()
2170 {

Callers 1

runBrokerIdTestsMethod · 0.95

Calls 11

initOfflineExchangeMethod · 0.95
loadMarketsMethod · 0.95
createOrderMethod · 0.95
GetValueMethod · 0.95
isEqualMethod · 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