Did you also try something like this?
usdtBalance = Client.get_asset_balance(asset='USDT').get('free')
#use param quoteOrderQty instead of param quantity when buying
order_buy = Client.order_market_buy(symbol='BTCUSDT', quoteOrderQty=usdtBalance)
##Some time later##
btcBalance = Client.get_asset_balance(asset='BTC').get('free')
#use param quantity instead of param quoteOrderQty when selling
order_sell = Client.order_market_sell(symbol='BTCUSDT', quantity=btcBalance)
Based on your comment, it seems that Client.order_market_buy(symbol='BTCUSDT', quoteOrderQty=usdtBalance) worked for buying, but Client.order_market_sell(symbol='BTCUSDT', quantity=btcBalance) did NOT for selling.
I tend to think it's because the information you stored in btcBalance was prior to the purchase you made right after initializing btcBalance, it would make sense since that way you would have stored 0.00 or just "Dust" which is a very low amount of the base asset that can't be used for trading on Binance but instead for just converting to BNB.
In this guide, there's an example using the Testnet Binance Vision, although it illustrates very well how to set a Market Sell Order with Python Binance package:
from binance.exceptions import BinanceAPIException
api_key = '<testnet api_key>'
api_secret = '<testnet api_secret>'
async def main():
quantity = '0.000001'
client = await AsyncClient.create(api_key=api_key, api_secret=api_secret, testnet=True)
try:
market_res = await client.order_market_sell(symbol='BTCUSDT', quantity=quantity)
except BinanceAPIException as e:
print(e)
else:
print(json.dumps(market_res, indent=2))
await client.close_connection()
It even says that if the value stored in quantity is not greater than the MIN_NOTIONAL value, you will get the following error:
APIError(code=-1013): Filter failure: MIN_NOTIONAL
I recommend you to check it out, it may help you better when dealing with this topic.