File size: 2,330 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
#!/usr/bin/env python3
"""Quick check of Binance liquid balances"""

from aureon_baton_link import link_system as _baton_link; _baton_link(__name__)
import os
from dotenv import load_dotenv
from binance.client import Client

load_dotenv()

try:
    client = Client(
        os.getenv('BINANCE_API_KEY'),
        os.getenv('BINANCE_API_SECRET')
    )
    
    print("=== BINANCE SPOT WALLET BALANCES ===\n")
    
    account = client.get_account()
    liquid_stablecoins = ['USDT', 'USDC', 'BUSD', 'FDUSD', 'TUSD', 'USDD']
    staked_coins = ['LDUSDC', 'LDUSDT', 'LDBNB', 'LDETH']
    
    total_liquid = 0
    total_staked = 0
    
    for balance in account['balances']:
        asset = balance['asset']
        free = float(balance['free'])
        locked = float(balance['locked'])
        total = free + locked
        
        if total > 0.01:
            if asset in liquid_stablecoins:
                print(f"βœ… {asset}: {total:.2f} (FREE: {free:.2f}, LOCKED: {locked:.2f})")
                total_liquid += total
            elif asset in staked_coins:
                print(f"πŸ”’ {asset}: {total:.2f} (STAKED - Not tradable)")
                total_staked += total
            else:
                print(f"   {asset}: {total:.8f}")
    
    print(f"\n{'='*50}")
    print(f"LIQUID STABLECOINS TOTAL: ${total_liquid:.2f}")
    print(f"STAKED ASSETS TOTAL: ${total_staked:.2f}")
    print(f"{'='*50}\n")
    
    if total_liquid >= 10:
        print("βœ… YOU HAVE ENOUGH LIQUID FUNDS TO TRADE!")
        print(f"   Ready to deploy with ${total_liquid:.2f}")
        exit(0)
    elif total_staked > 0:
        print("❌ PROBLEM: You have staked assets but not enough liquid funds")
        print(f"   Staked: ${total_staked:.2f}")
        print(f"   Liquid: ${total_liquid:.2f}")
        print("\nπŸ“‹ ACTION NEEDED:")
        print("   1. Go to Binance β†’ Earn β†’ Simple Earn")
        print("   2. Find your staked LDUSDC")
        print("   3. Click 'Redeem' to unstake")
        print("   4. Wait 1-2 minutes for settlement")
        exit(1)
    else:
        print("❌ NO FUNDS FOUND")
        print("   Please deposit USDT or USDC to your Spot Wallet")
        exit(1)
        
except Exception as e:
    print(f"❌ ERROR: {e}")
    exit(2)