feat: logs real rate and gas
This commit is contained in:
@@ -36,16 +36,17 @@ class CreateOrderCommand:
|
||||
|
||||
rate_raw = await self._remote_cache.hget('tradex:rub:rate','value')
|
||||
gas_raw = await self._remote_cache.hget('gwei:eth:last','normal_rub')
|
||||
self._logger.info(f'Actual market values: rate={rate_raw}, gas={gas_raw}')
|
||||
|
||||
if rate_raw is None:
|
||||
self._logger.error('Exchange rate unavailable')
|
||||
rate_raw = '2.00'
|
||||
#raise ApplicationException(status_code=503, message='Exchange rate unavailable')
|
||||
|
||||
if gas_raw is None:
|
||||
self._logger.error('Exchange gas unavailable')
|
||||
|
||||
rate_raw = '2.00'
|
||||
gas_raw = '1.00'
|
||||
#raise ApplicationException(status_code=503, message='Exchange gas unavailable')
|
||||
self._logger.info(f'Mocked market values: rate={rate_raw}, gas={gas_raw}')
|
||||
|
||||
actual_gas_fee = Decimal(gas_raw).quantize(Decimal('0.00'), rounding=ROUND_UP)
|
||||
actual_usdt_exchange_rate = Decimal(rate_raw).quantize(Decimal('0.00'), rounding=ROUND_UP)
|
||||
|
||||
Reference in New Issue
Block a user