Skip to content

Commit

Permalink
allow fractional assets
Browse files Browse the repository at this point in the history
  • Loading branch information
camelpac committed Jun 19, 2021
1 parent da9d548 commit 1714732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alpaca_backtrader_api/alpacabroker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def update_positions(self):

for name, data in iteritems(self.cerebro.datasbyname):
if name in broker_positions_symbols:
size = int(broker_positions_mapped_by_symbol[name].qty)
size = float(broker_positions_mapped_by_symbol[name].qty)
positions[data] = Position(
size,
float(broker_positions_mapped_by_symbol[
Expand Down

0 comments on commit 1714732

Please sign in to comment.