Skip to content

Commit 7ce93fb

Browse files
committed
[Position] rename quantity and fix position size calculation
1 parent a90375c commit 7ce93fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

octobot/storage/trading_metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def _get_multi_exchange_data(exchange_managers, is_backtesting):
175175
values.pop("available", None)
176176
if exchange_manager.is_future:
177177
for position in trading_api.get_positions(exchange_manager):
178-
exchange_end_portfolio[position.get_currency()]["position"] = float(position.quantity)
178+
exchange_end_portfolio[position.get_currency()]["position"] = float(position.single_contract_value * position.size)
179179
for exchange_portfolio, portfolio in zip((exchange_origin_portfolio, exchange_end_portfolio),
180180
(origin_portfolio, end_portfolio)):
181181
for currency, value_dict in exchange_portfolio.items():

0 commit comments

Comments
 (0)