|
@@ -2115,9 +2115,19 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
self.last_deposit_withdrawal_check = current_time
|
|
|
return
|
|
|
|
|
|
+ # Set up user parameter for Hyperliquid API calls
|
|
|
+ params = {}
|
|
|
+ if Config.HYPERLIQUID_PRIVATE_KEY:
|
|
|
+ wallet_address = Config.HYPERLIQUID_PRIVATE_KEY
|
|
|
+ params['user'] = f"0x{wallet_address}" if not wallet_address.startswith('0x') else wallet_address
|
|
|
+ else:
|
|
|
+ logger.warning("⚠️ No private key configured for deposit/withdrawal checking")
|
|
|
+ self.last_deposit_withdrawal_check = current_time
|
|
|
+ return
|
|
|
+
|
|
|
# Check for deposits
|
|
|
try:
|
|
|
- deposits = self.client.sync_client.fetch_deposits(code='USDC', since=since_timestamp)
|
|
|
+ deposits = self.client.sync_client.fetch_deposits(code='USDC', since=since_timestamp, params=params)
|
|
|
if deposits:
|
|
|
for deposit in deposits:
|
|
|
amount = float(deposit.get('amount', 0))
|
|
@@ -2136,7 +2146,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
|
|
|
# Check for withdrawals
|
|
|
try:
|
|
|
- withdrawals = self.client.sync_client.fetch_withdrawals(code='USDC', since=since_timestamp)
|
|
|
+ withdrawals = self.client.sync_client.fetch_withdrawals(code='USDC', since=since_timestamp, params=params)
|
|
|
if withdrawals:
|
|
|
for withdrawal in withdrawals:
|
|
|
amount = float(withdrawal.get('amount', 0))
|