|
@@ -2109,9 +2109,15 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
new_deposits = 0
|
|
|
new_withdrawals = 0
|
|
|
|
|
|
+ # Check if sync_client is available
|
|
|
+ if not hasattr(self.client, 'sync_client') or not self.client.sync_client:
|
|
|
+ logger.warning("⚠️ CCXT sync_client not available for deposit/withdrawal checking")
|
|
|
+ self.last_deposit_withdrawal_check = current_time
|
|
|
+ return
|
|
|
+
|
|
|
# Check for deposits
|
|
|
try:
|
|
|
- deposits = self.client.client.fetch_deposits(code='USDC', since=since_timestamp)
|
|
|
+ deposits = self.client.sync_client.fetch_deposits(code='USDC', since=since_timestamp)
|
|
|
if deposits:
|
|
|
for deposit in deposits:
|
|
|
amount = float(deposit.get('amount', 0))
|
|
@@ -2130,7 +2136,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
|
|
|
# Check for withdrawals
|
|
|
try:
|
|
|
- withdrawals = self.client.client.fetch_withdrawals(code='USDC', since=since_timestamp)
|
|
|
+ withdrawals = self.client.sync_client.fetch_withdrawals(code='USDC', since=since_timestamp)
|
|
|
if withdrawals:
|
|
|
for withdrawal in withdrawals:
|
|
|
amount = float(withdrawal.get('amount', 0))
|