File size: 782 Bytes
5116a2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Automated IP update script for Bybit
HF_SPACE='nexusbert-scalperbot.hf.space'
BYBIT_API_KEY='your_api_key_here'  # From .env
BYBIT_SECRET='your_secret_here'    # From .env

# Get current HF Space IP
CURRENT_IP=$(ping -c 1 $HF_SPACE 2>/dev/null | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1)

if [ -z "$CURRENT_IP" ]; then
    echo "ERROR: Could not get HF Space IP"
    exit 1
fi

echo "Current HF Space IP: $CURRENT_IP"

# Note: Bybit doesn't have API for updating IP whitelist
# You need to manually update in Bybit dashboard
echo "📋 Manually update Bybit API key with IP: $CURRENT_IP"
echo "🔗 https://www.bybit.com/app/user/api-management"

# Optional: Store for comparison
echo "$CURRENT_IP" > current_hf_ip.txt
echo "✅ IP saved to current_hf_ip.txt"