|
@@ -131,15 +131,15 @@ class ArbitrageProcess:
|
|
|
# 所有前置信息获取都没有问题的话就等待开机信号
|
|
# 所有前置信息获取都没有问题的话就等待开机信号
|
|
|
self.current_state = self.STATE_IDLE
|
|
self.current_state = self.STATE_IDLE
|
|
|
|
|
|
|
|
- # --------------------------------------- 获取交易规则 ---------------------------------------
|
|
|
|
|
exchange_info_params = {
|
|
exchange_info_params = {
|
|
|
- "symbols": self.symbol
|
|
|
|
|
|
|
+ "symbols": self.symbol.replace('_', '')
|
|
|
}
|
|
}
|
|
|
exchange_info_rst = mexc.market.get_exchangeInfo(exchange_info_params)
|
|
exchange_info_rst = mexc.market.get_exchangeInfo(exchange_info_params)
|
|
|
# 返回值检查
|
|
# 返回值检查
|
|
|
if 'symbols' not in exchange_info_rst or len(exchange_info_rst['symbols']) != 1:
|
|
if 'symbols' not in exchange_info_rst or len(exchange_info_rst['symbols']) != 1:
|
|
|
|
|
+ params_formated = pformat(exchange_info_params, indent=2)
|
|
|
info_formated = pformat(exchange_info_rst, indent=2)
|
|
info_formated = pformat(exchange_info_rst, indent=2)
|
|
|
- msg = f'获取交易规则时出现错误\n{info_formated}'
|
|
|
|
|
|
|
+ msg = f'获取交易规则时出现错误\n{exchange_info_params}\n{info_formated}'
|
|
|
logger.error(msg)
|
|
logger.error(msg)
|
|
|
add_state_flow_entry(self.process_item, self.current_state, msg, "fail")
|
|
add_state_flow_entry(self.process_item, self.current_state, msg, "fail")
|
|
|
|
|
|
|
@@ -148,7 +148,7 @@ class ArbitrageProcess:
|
|
|
|
|
|
|
|
# 返回的交易对信息核对]
|
|
# 返回的交易对信息核对]
|
|
|
exchange_info = exchange_info_rst['symbols'][0]
|
|
exchange_info = exchange_info_rst['symbols'][0]
|
|
|
- if exchange_info['symbol'].upper() != self.symbol:
|
|
|
|
|
|
|
+ if exchange_info['symbol'].upper() != self.symbol.replace('_', ''):
|
|
|
info_formated = pformat(exchange_info, indent=2)
|
|
info_formated = pformat(exchange_info, indent=2)
|
|
|
msg = f'获取到的交易规则与交易币对无关\n{info_formated}'
|
|
msg = f'获取到的交易规则与交易币对无关\n{info_formated}'
|
|
|
logger.error(msg)
|
|
logger.error(msg)
|