mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
chore: simplify dry-run wallet update
This commit is contained in:
@@ -130,18 +130,12 @@ class Wallets:
|
|||||||
)
|
)
|
||||||
total_stake = current_stake + used_stake
|
total_stake = current_stake + used_stake
|
||||||
else:
|
else:
|
||||||
tot_in_trades = 0
|
|
||||||
for position in open_trades:
|
for position in open_trades:
|
||||||
# size = self._exchange._contracts_to_amount(position.pair, position['contracts'])
|
|
||||||
size = position.amount
|
|
||||||
collateral = position.stake_amount
|
|
||||||
leverage = position.leverage
|
|
||||||
tot_in_trades += collateral
|
|
||||||
_positions[position.pair] = PositionWallet(
|
_positions[position.pair] = PositionWallet(
|
||||||
position.pair,
|
position.pair,
|
||||||
position=size,
|
position=position.amount,
|
||||||
leverage=leverage,
|
leverage=position.leverage,
|
||||||
collateral=collateral,
|
collateral=position.stake_amount,
|
||||||
side=position.trade_direction,
|
side=position.trade_direction,
|
||||||
)
|
)
|
||||||
current_stake = (
|
current_stake = (
|
||||||
|
|||||||
Reference in New Issue
Block a user