cash works again!
This commit is contained in:
@ -194,23 +194,16 @@ class MEXCInterface(ExchangeInterface):
|
||||
return result
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(f"Error getting ticker from {endpoint} for {symbol}: {str(e)}")
|
||||
logger.error(f"❌ CRITICAL: Failed to get ticker for {symbol}: {e}")
|
||||
logger.error("❌ NO DUMMY DATA FALLBACK - Real market data required")
|
||||
# Return None instead of dummy data - let calling code handle the failure
|
||||
return None
|
||||
|
||||
# If we get here, all endpoints failed
|
||||
logger.error(f"All ticker endpoints failed for {symbol}")
|
||||
|
||||
# Return dummy data as last resort for testing
|
||||
dummy_price = 50000.0 if 'BTC' in symbol else 2000.0 # Dummy price for BTC or others
|
||||
logger.warning(f"Returning dummy ticker data for {symbol} with price {dummy_price}")
|
||||
return {
|
||||
'symbol': symbol,
|
||||
'bid': dummy_price * 0.999,
|
||||
'ask': dummy_price * 1.001,
|
||||
'last': dummy_price,
|
||||
'volume': 100.0,
|
||||
'timestamp': int(time.time() * 1000),
|
||||
'is_dummy': True
|
||||
}
|
||||
# Return None instead of dummy data - let calling code handle the failure
|
||||
return None
|
||||
|
||||
def place_order(self, symbol: str, side: str, order_type: str,
|
||||
quantity: float, price: float = None) -> Dict[str, Any]:
|
||||
|
Reference in New Issue
Block a user