From 88316d2f93e50ed74673c1165ef71b5fced83420 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Tue, 1 Nov 2022 14:39:07 -0400 Subject: [PATCH] Fix breakage (part 1) --- src/cryptocom/exchange/structs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cryptocom/exchange/structs.py b/src/cryptocom/exchange/structs.py index db702d7..26f74c9 100644 --- a/src/cryptocom/exchange/structs.py +++ b/src/cryptocom/exchange/structs.py @@ -141,11 +141,11 @@ class Candle: def from_api(cls, pair: Pair, data: Dict): return cls( time=int(data["t"] / 1000), - open=pair.round_price(data["o"]), - high=pair.round_price(data["h"]), - low=pair.round_price(data["l"]), - close=pair.round_price(data["c"]), - volume=pair.round_quantity(data["v"]), + open=pair.round_price(float(data["o"])), + high=pair.round_price(float(data["h"])), + low=pair.round_price(float(data["l"])), + close=pair.round_price(float(data["c"])), + volume=pair.round_quantity(float(data["v"])), pair=pair, )