Spaces:
Running
Running
File size: 2,023 Bytes
da0ce7b | 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #!/usr/bin/env python3
"""
π§ QUICK TEST - Verify all systems working
"""
from aureon_baton_link import link_system as _baton_link; _baton_link(__name__)
import os
import sys
print("Testing imports and system readiness...\n")
# Test 1: Binance
try:
from binance.client import Client
print("β
python-binance installed")
except ImportError:
print("β python-binance NOT installed")
sys.exit(1)
# Test 2: Krakenex
try:
import krakenex
print("β
krakenex installed")
except ImportError:
print("β krakenex NOT installed")
sys.exit(1)
# Test 3: Load env
try:
from dotenv import load_dotenv
load_dotenv()
print("β
python-dotenv installed")
except ImportError:
print("β python-dotenv NOT installed")
sys.exit(1)
# Test 4: Check API keys
binance_key = os.getenv('BINANCE_API_KEY')
if binance_key:
print(f"β
BINANCE_API_KEY configured")
else:
print("β BINANCE_API_KEY missing from .env")
sys.exit(1)
# Test 5: Try Binance connection
try:
binance_secret = os.getenv('BINANCE_API_SECRET')
client = Client(binance_key, binance_secret)
account = client.get_account()
print("β
Binance connection successful")
# Show balances
balances = account['balances']
usdt = next((b for b in balances if b['asset'] == 'USDT'), None)
usdc = next((b for b in balances if b['asset'] == 'USDC'), None)
if usdt or usdc:
if usdt:
free = float(usdt['free'])
print(f" π° USDT: ${free:.2f} available")
if usdc:
free = float(usdc['free'])
print(f" π° USDC: ${free:.2f} available")
else:
print(" β οΈ No USDT/USDC balance found")
except Exception as e:
print(f"β Binance connection failed: {e}")
sys.exit(1)
print("\n" + "="*50)
print("β
ALL SYSTEMS OPERATIONAL")
print("="*50)
print("\nReady to run: python3 aureon_unified_ecosystem.py\n")
|