Skip to content

Commit

Permalink
[Position] rename quantity and fix position size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
techfreaque committed Feb 16, 2023
1 parent c8973c7 commit 5ca5544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octobot/storage/trading_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def _get_multi_exchange_data(exchange_managers, is_backtesting):
values.pop("available", None)
if exchange_manager.is_future:
for position in trading_api.get_positions(exchange_manager):
exchange_end_portfolio[position.get_currency()]["position"] = float(position.quantity)
exchange_end_portfolio[position.get_currency()]["position"] = float(position.single_contract_value * position.size)
for exchange_portfolio, portfolio in zip((exchange_origin_portfolio, exchange_end_portfolio),
(origin_portfolio, end_portfolio)):
for currency, value_dict in exchange_portfolio.items():
Expand Down

0 comments on commit 5ca5544

Please sign in to comment.