Use price estimates to decide between market and limit orders:
Copy
estimate = response.json()if not estimate['sufficient_liquidity']: print("Not enough liquidity. Use limit order instead.")elif estimate['estimated_price'] > 1.50: print("Price too high. Wait or use limit order.")else: print(f"Good price. Proceed with market order at ~${estimate['estimated_price']}/hr")