Skip to content

Commit

Permalink
Fixed expire when loading from the database
Browse files Browse the repository at this point in the history
  • Loading branch information
evgrmn committed Oct 19, 2024
1 parent 8f8c894 commit c81e5dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,10 @@ def set_symbol(instrument: Instrument, data: dict) -> None:
instrument.minOrderQty = data["MINORDERQTY"]
instrument.qtyStep = data["QTYSTEP"]
instrument.precision = data["PRECISION"]
instrument.expire = time_converter(time=data["EXPIRE"])
if data["EXPIRE"] == "Perpetual":
instrument.expire = data["EXPIRE"]
else:
instrument.expire = time_converter(time=data["EXPIRE"])
instrument.baseCoin = data["BASECOIN"]
instrument.quoteCoin = data["QUOTECOIN"]
instrument.valueOfOneContract = data["VALUEOFONECONTRACT"]

0 comments on commit c81e5dc

Please sign in to comment.