zlq4863947 / triangular-arbitrage

数字货币-三角套利机器人
GNU General Public License v3.0
625 stars 230 forks source link

第一步交易订单A出错 #30

Open Lisuhan opened 6 years ago

Lisuhan commented 6 years ago

订单A出错: binance {"code":-2010,"msg":"Account has insufficient balance for requested action." 订单A出错: binance {"code":-1013,"msg":"QTY is over the symbol's maximum QTY."}

一直出这两个错误

async orderA() { try { } catch { logger.error(订单A出错: ${errMsg}); } }

zlq4863947 commented 6 years ago

嗯 程序最小交易量算错了,有时间在维护这个

Lisuhan commented 6 years ago

嗯 今天我也看了发现代码几个错误。

  1. 获取最佳交易量 getBaseAmountByBC( ) 里面只比对了b2a c2a 两个的大小,应该还需要比对 a 本身。
  2. const thanAmount = b2aAmount.isGreaterThan(c2aAmount) ? b2aAmount : c2aAmount; 这个需要加入 a 并且 应该取最小的量,现在取得最大的。
  3. 获取最小的交易数量算法有问题
  4. Rate.convertAmount的计算数量 不能通过 buy 和 sell 去决定吧,需要看要换算的单位在交易对中的分子分母位置吧
317482454 commented 6 years ago

@zlq4863947 无法加入你的群,付费版本现在可以购买嘛?

zlq4863947 commented 5 years ago

@317482454 可以购买,加群要付费 5元钱,mac电脑不支持付费入群,你用手机qq加群就可以了

zlq4863947 commented 5 years ago

@Lisuhan 是的 开源版只做例子共享,我现在主要精力在维护付费版