[Fix] typo

This commit is contained in:
vn.py 2019-11-01 15:39:10 +08:00
parent 08de86dede
commit e1eedc063b
3 changed files with 6 additions and 2 deletions

View File

@ -136,7 +136,7 @@ class SpreadData:
self.active_leg: LegData = None
self.passive_legs: List[LegData] = []
self.min_volume = 0.1
self.min_volume = 0.001
# For calculating spread price
self.price_multipliers: Dict[str, int] = price_multipliers

View File

@ -228,7 +228,7 @@ class SpreadAlgoWidget(QtWidgets.QFrame):
)
self.offset_combo = QtWidgets.QComboBox()
self.offset_combo.addItem(
self.offset_combo.addItems(
[Offset.NONE.value, Offset.OPEN.value, Offset.CLOSE.value]
)

View File

@ -744,6 +744,10 @@ class BitmexWebsocketApi(WebsocketClient):
gateway_name=self.gateway_name,
)
# avgEntryPrice may be None instead of 0 sometimes
if position.price is None:
position.price = 0
self.gateway.on_position(position)
def on_account(self, d):