Note: for support questions, please join our Discord server
I'm submitting a ...
[x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Action taken (what you did)
Running live bot on Binance
Expected result (what you hoped would happen)
It would recognize the amount was too small
Actual result (unexpected outcome)
MIN_NOTIONAL ERROR during each run
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
I run the bot i live mode on Binance, and between 5 minutes and 5 hours (5 hours 21 mins is my record) i get an error along the lines of :
(addOrder) returned an irrecoverable error: undefined
2018-01-15 09:12:28 (DEBUG): [binance.js] entering "setOrder" callback after api call, err: [binance.js] undefined data: {"code":-1013,"msg":"Filter failure: MIN_NOTIONAL
Each time is is trying to buy a tiny fraction worth of some coin (in this case ETH / STRAT). Ive looked throu older issues, and cant seem to find anything that would fix the problem for sure, but was wondering if there has been any progress made on this one. Loving he bot, its very clever, just hoping to fix the crashing issues.
I've seen this issue several time. I though that #1550 might solve it but it didnt work. You can see what happens in the following ss that I took it just now:

Yes, I've tried several changed including #1550, but I lack the programming prowess to figure this one out. Anyone have a clue on where to at least start?
Data returned by their product API doesn't match the trading rules they've published. It would seem that the trading rules is correct, so either there is a mistake and something not understood correctly or there is an inconsistency in their published data. Other markets all look correct though, so I am not sure. Manually modify the ETH/EDO data in #1550, set amount to 1 and order to 0.2 and it should work.
@mronus @coltac Looks like Binance recently update the min order values for currencies. I updated the script and republished the market data. Please try that and let me know if it works (still in #1550)
Okay, ill give it a whirl, will report back
I am still getting the [MIN_NOTIONAL] error while trading on binance.
Debug output please.
Okay, i figured out that i just had to manually set the amount to trade in binance.js to solve the MIN_NOTIONAL error (I think i have fixed that, i thought i had changed it, and did a npm install binance and broke my fix) The other error is :
/home/colt/Desktop/gekko-develop/node_modules/binance/lib/rest.js:78
if (response.statusCode === 400 && payload.code === -1021 &&
^
TypeError: Cannot read property 'statusCode' of undefined
at Request.e [as _callback] (/home/colt/Desktop/gekko-develop/node_modules/binance/lib/rest.js:78:33)
at self.callback (/home/colt/Desktop/gekko-develop/node_modules/binance/node_modules/request/request.js:186:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at ClientRequest.
at ClientRequest.g (events.js:292:16)
at emitNone (events.js:86:13)
at ClientRequest.emit (events.js:185:7)
at TLSSocket.emitTimeout (_http_client.js:630:10)
at TLSSocket.g (events.js:292:16)
RECEIVED ERROR IN GEKKO 845961444327695
Child process has died.
Im running ubuntu 17.10. Is this a time sync problem?
Ive been running crash free on Binance / newest dev release. I think it might be working. You guys are clever SOB's
I still have that crash, using the latest code in dev branch. The Market watcher stopped due to that error.
```/usr/src/app/node_modules/binance/lib/rest.js:78
if (response.statusCode === 400 && payload.code === -1021 &&
^
TypeError: Cannot read property 'statusCode' of undefined
at Request.request [as _callback] (/usr/src/app/node_modules/binance/lib/rest.js:78:34)
at self.callback (/usr/src/app/node_modules/request/request.js:186:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (/usr/src/app/node_modules/request/request.js:878:8)
at emitOne (events.js:121:20)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
```
to Reproduce the issue, start a watcher, and remove the network access for few minutes.
@EmmanuelVinas Update your binance module please
npm uninstall binance
npm install binance
Remember to run npm install after every pull from git as the modules can be updated at any time.
I deploy it using docker compose build, docker compose -up -d. So I guess binance should be up to date.
This is a bug in the binance module in any case. It’ll need to be fixed by that project. Please open an issue here https://github.com/aarongarvey/binance
I checked, there is already an issue opened : https://github.com/aarongarvey/binance/issues/26
OK thanks. I'll monitor it for changes, once a fix is provided I'll bump our npm versions.
What I am seeing might not be related to the upstream library.
For example, on the USDT/ETH market on binance, the minimum amount of ETH you can sell isn't based on an amount of the asset (ETH), it is based on the total value (which is a factor of the current price.
As of today that amount is $20, so that means the minimum needs to be calculated as (current market price * amount to sell) > 20.
Looking at the portfolioManager code, it doesn't account for situations like this.
EDIT: nevermind, I see that Binance uses the getLotSize method, which does what I just said it should do, the market json file is just not up to date or correct.
I got the following error message in my log.
2018-01-28 00:54:25 (DEBUG): [binance.js] entering "setBalance" callback after api call, err: null, data: [object Object]
2018-01-28 00:54:25 (INFO): Attempting to SELL 21.739 XLM at binance price: 0.00005384
2018-01-28 00:54:25 (DEBUG): [binance.js] (addOrder) SELL 21 XLM @0.00005384 BTC
2018-01-28 00:54:26 (ERROR): [binance.js] (addOrder) returned an irrecoverable error: undefined
2018-01-28 00:54:26 (DEBUG): [binance.js] entering "setOrder" callback after api call, err: [binance.js] undefined data: {"code":-1013,"msg":"Filter failure: MIN_NOTIONAL"}
It's because my main order only partially sold, and then Gekko tried to sell the remaining.. and got this error.. If I try to sell 21XLM/BTC in Binance I get this error in their interface.. "Total must be at least 0.002 BTC"
So in the binance-markets.json file you will want to edit the "order" value of the pair you want to trade in to match that 0.002 value
Ok, I've updated this in exchanges/binance.js
Now looks like
{
pair: ['BTC', 'XLM'],
minimalOrder: { amount: 0.002, unit: 'asset' },
precision: 0.00000001,
},
According to https://support.binance.com/hc/en-us/articles/115000594711-Trading-Rule all BTC pairs should be 0.002 now.. so maybe this file needs a bit of a update?
@werkkrew @rkingy A fix was made for this in the develop branch a few days ago. The amount should already be 0.002, FYI.
@cmroche Thanks, yes I discovered this.. have switched to Dev branch.. no issues so far.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.
@cmroche facing the same issue binance {“code”:-1013,“msg”:“Filter failure: MIN_NOTIONAL”}
, during createOrder() for ETH/BTC symbol.
just want to know, if i pass amount 0.002 or more than that then only it will work?
i'm passing 0.001. as they considers minimum amount for trading is 0.001
https://support.binance.com/hc/en-us/articles/115000594711-Trading-Rule
I you are trading amounts close to minimal, sometimes the btc value itself changes and they become under the minimum. Raising the amount solves the problem