Fix breakage (part 1)

api-breakage
Jacopo De Simoi 3 years ago
parent 333bbce9bf
commit 88316d2f93
  1. 10
      src/cryptocom/exchange/structs.py

@ -141,11 +141,11 @@ class Candle:
def from_api(cls, pair: Pair, data: Dict): def from_api(cls, pair: Pair, data: Dict):
return cls( return cls(
time=int(data["t"] / 1000), time=int(data["t"] / 1000),
open=pair.round_price(data["o"]), open=pair.round_price(float(data["o"])),
high=pair.round_price(data["h"]), high=pair.round_price(float(data["h"])),
low=pair.round_price(data["l"]), low=pair.round_price(float(data["l"])),
close=pair.round_price(data["c"]), close=pair.round_price(float(data["c"])),
volume=pair.round_quantity(data["v"]), volume=pair.round_quantity(float(data["v"])),
pair=pair, pair=pair,
) )

Loading…
Cancel
Save