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

Method Trade

java/lib/src/main/java/io/github/ccxt/types/Trade.java:20–37  ·  view source on GitHub ↗
(Object raw)

Source from the content-addressed store, hash-verified

18 public Map<String, Object> info;
19
20 @SuppressWarnings("unchecked")
21 public Trade(Object raw) {
22 Map<String, Object> data = TypeHelper.toMap(raw);
23 this.amount = TypeHelper.safeFloat(data, "amount");
24 this.price = TypeHelper.safeFloat(data, "price");
25 this.cost = TypeHelper.safeFloat(data, "cost");
26 this.id = TypeHelper.safeString(data, "id");
27 this.order = TypeHelper.safeString(data, "order");
28 this.timestamp = TypeHelper.safeInteger(data, "timestamp");
29 this.datetime = TypeHelper.safeString(data, "datetime");
30 this.symbol = TypeHelper.safeString(data, "symbol");
31 this.type = TypeHelper.safeString(data, "type");
32 this.side = TypeHelper.safeString(data, "side");
33 this.takerOrMaker = TypeHelper.safeString(data, "takerOrMaker");
34 Object feeRaw = TypeHelper.safeValue(data, "fee");
35 this.fee = feeRaw != null ? new Fee(feeRaw) : null;
36 this.info = TypeHelper.getInfo(data);
37 }
38}

Callers

nothing calls this directly

Calls 6

toMapMethod · 0.95
safeFloatMethod · 0.95
safeStringMethod · 0.95
safeIntegerMethod · 0.95
safeValueMethod · 0.95
getInfoMethod · 0.95

Tested by

no test coverage detected