Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

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

Open
Lisuhan opened this issue May 28, 2018 · 5 comments
Open

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

Lisuhan opened this issue May 28, 2018 · 5 comments

Comments

@Lisuhan
Copy link

Lisuhan commented May 28, 2018

订单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
Copy link
Owner

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

@Lisuhan
Copy link
Author

Lisuhan commented May 30, 2018

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

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

@317482454
Copy link

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

@zlq4863947
Copy link
Owner

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

@zlq4863947
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants