# pip install python-binance from binance.client import Client client = Client(api_key, api_secret) DUST = 0.001 # BTC account = client.get_account() prices = client.get_all_tickers() prices = {p['symbol']: float(p['price']) for p in prices} balances = {b['asset']: float(b['free']) for b in account['balances']} for ticker, amount in balances.items(): try: price = prices['{0}BTC'.format(ticker)] except KeyError: continue value = amount*price if value <= DUST and value > 0: try: order = client.order_market_sell(symbol='{0}BTC'.format(ticker), quantity=round(amount, 4)) print("Selling {0} of {1} = {2} BTC".format(round(amount, 4), ticker, value)) print(order) except Exception as e: print(e)