scalperBot / update_whitelist.sh
nexusbert's picture
Upload 47 files
5116a2e verified
raw
history blame contribute delete
782 Bytes
#!/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"