Skip to content

Commit 5ca5544

Browse files
committed
[Position] rename quantity and fix position size calculation
1 parent c8973c7 commit 5ca5544

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
@@ -179,7 +179,7 @@ async def _get_multi_exchange_data(exchange_managers, is_backtesting):
179179
values.pop("available", None)
180180
if exchange_manager.is_future:
181181
for position in trading_api.get_positions(exchange_manager):
182-
exchange_end_portfolio[position.get_currency()]["position"] = float(position.quantity)
182+
exchange_end_portfolio[position.get_currency()]["position"] = float(position.single_contract_value * position.size)
183183
for exchange_portfolio, portfolio in zip((exchange_origin_portfolio, exchange_end_portfolio),
184184
(origin_portfolio, end_portfolio)):
185185
for currency, value_dict in exchange_portfolio.items():

0 commit comments

Comments
 (0)