chore: make start_cap in wallets private
This commit is contained in:
@@ -41,7 +41,7 @@ class Wallets:
|
|||||||
self._exchange = exchange
|
self._exchange = exchange
|
||||||
self._wallets: dict[str, Wallet] = {}
|
self._wallets: dict[str, Wallet] = {}
|
||||||
self._positions: dict[str, PositionWallet] = {}
|
self._positions: dict[str, PositionWallet] = {}
|
||||||
self.start_cap = config["dry_run_wallet"]
|
self._start_cap = config["dry_run_wallet"]
|
||||||
self._last_wallet_refresh: datetime | None = None
|
self._last_wallet_refresh: datetime | None = None
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ class Wallets:
|
|||||||
|
|
||||||
_wallets[curr] = Wallet(curr, trade.amount - pending, pending, trade.amount)
|
_wallets[curr] = Wallet(curr, trade.amount - pending, pending, trade.amount)
|
||||||
|
|
||||||
current_stake = self.start_cap + tot_profit - tot_in_trades
|
current_stake = self._start_cap + tot_profit - tot_in_trades
|
||||||
total_stake = current_stake + used_stake
|
total_stake = current_stake + used_stake
|
||||||
else:
|
else:
|
||||||
tot_in_trades = 0
|
tot_in_trades = 0
|
||||||
@@ -129,7 +129,7 @@ class Wallets:
|
|||||||
collateral=collateral,
|
collateral=collateral,
|
||||||
side=position.trade_direction,
|
side=position.trade_direction,
|
||||||
)
|
)
|
||||||
current_stake = self.start_cap + tot_profit - tot_in_trades
|
current_stake = self._start_cap + tot_profit - tot_in_trades
|
||||||
used_stake = tot_in_trades
|
used_stake = tot_in_trades
|
||||||
total_stake = current_stake + tot_in_trades
|
total_stake = current_stake + tot_in_trades
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user