瀏覽代碼

交易对

skyfffire 3 月之前
父節點
當前提交
3049ea5de6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      s_erc20_to_mexc.py

+ 2 - 2
s_erc20_to_mexc.py

@@ -122,7 +122,7 @@ class ArbitrageProcess:
 
         # --------------------------------------- 获取交易规则 ---------------------------------------
         exchange_info_params = {
-            "symbols": f'{self.coin}{self.base_coin}'
+            "symbols": self.symbol.replace('_', '')
         }
         exchange_info_rst = mexc.market.get_exchangeInfo(exchange_info_params)
         # 返回值检查
@@ -138,7 +138,7 @@ class ArbitrageProcess:
 
         # 返回的交易对信息核对]
         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)
             msg = f'获取到的交易规则与交易币对无关\n{info_formated}'
             logger.error(msg)