Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

MIN_NOTIONAL error on binance.ETC-BNB #1793

Closed
rountrey opened this issue Dec 10, 2018 · 3 comments
Closed

MIN_NOTIONAL error on binance.ETC-BNB #1793

rountrey opened this issue Dec 10, 2018 · 3 comments
Labels

Comments

@rountrey
Copy link

System information

  • Have I written custom code (as opposed to using zenbot vanilla): no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu 18.04
  • Zenbot version (commit ref, or version): 4.1.0
  • Zenbot branch: unstable (downloaded Dec 8, 2018)
  • NodeJS version: 8.14.0
  • Python version (when using a python script): 3.5.2
  • Exact command to reproduce (include everything): ./zenbot.sh trade binance.ETC-BNB --strategy trix --buy_pct=99 --sell_pct=99 --period=3m --min_periods=240 --max_sell_loss_pct 20 --max_buy_loss_pct 20 --timeperiod=9 --conf configs/conf-binance2.js --up_trend_threshold=0 --down_trend_threshold=0 --overbought_rsi_periods=14 --overbought_rsi=75 --order_type taker
  • Did I make any changes to conf-sample.js?: no

Describe the problem

I'm having this error on Binance:

An error occurred { Error: binance {"code":-1013,"msg":"Filter failure: MIN_NOTIONAL"}
at binance.handleErrors (/home/user/zenbot/node_modules/ccxt/js/binance.js:1185:31)
at response.text.then (/home/user/zenbot/node_modules/ccxt/js/base/Exchange.js:648:18)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7) constructor: [Function: InvalidOrder] }

I have checked through the issues pages on github and could not find a working fix. I have updated zenbot-stable, updated ccxt, then I went to zenbot-unstable with an updated ccxt (updating ccxt was one of the recommended fixes). As a last ditch effort, I purged everything and started clean. Dumped the database, deleted zenbot, uninstalled mongodb and nodejs, removed all config files. Then I reinstalled mongodb, nodejs, zenbot-unstable, updated ccxt, and I am still getting the same errors.

Sims work fine, paper works fine, live trading works until it wants to trade and it throws up that error. I started trading 2 ETC with BNB, they have similar values at this time (2 ETC = ~1.7 BNB), so it isn't a minimum trade issue. Plus, the buy_pct and sell_pct is set at 99.

Although I am using a custom strategy, this also happens on rsi -- my go-to live trading test strategy.

Any help would be nice.

@BAKFR
Copy link
Contributor

BAKFR commented Dec 10, 2018

It is a minimum trade issue, just not a regular one.

"Filter failure: MIN_NOTIONAL" means Zenbot tried to create an order with a notional value (= price * quantity) below the minimum.
Zenbot does not support the notional value concept (it try to use a higher min_quantity to compensate). I'll try to work on it, but I can't promise anything.

Also, I think Binance has done some slight modification of their API a few days ago. It may explain why your the first to hit on this bug.

@rountrey
Copy link
Author

Well, another reason why I didn't think it was a minimum trade was that I can buy and sell just fine on binance website. I even tested small values to trade and it said that the minimum for that pair was 1. Should I throw in a little more ETC to see if that would work (all I have left is 0.25)?

BAKFR pushed a commit to BAKFR/zenbot that referenced this issue Dec 10, 2018
Changes with the previous version:
- Binance filters are selected by type rather than by index. It fixes DeviaVir#1794
- No more useless removal of trailing zeros of 'increment' and 'asset_increment'
- Binance notional filter is set in `product.min_total` rather than roughly modifying `product.min_size`.
  It fixes DeviaVir#1793
@BAKFR
Copy link
Contributor

BAKFR commented Dec 10, 2018

@rountrey I've fixed it. Wait until the pull request is merged (or clone my branch if you're pressed)
With this, orders too small will get ignored instead of triggering an error.

It will not resolve your problem since orders will not pass. I would advise you to use more than what's you have put if you don't want to keep running into this kind of troubles.
0.25 ETC worth less than 1$, which is IMO the bare minimum to put an order.

YarnSeemannsgarn pushed a commit to YarnSeemannsgarn/zenbot that referenced this issue Apr 15, 2020
* Engine: Split code about check of minimal order size into a function

The function avoid code duplication and is more easily readable.

Small behavior change: the new function accept products with both `min_size` and `min_total`.
Previously, only the first one available was checked.

* Binance: rewrite update-products to fix bugs

Changes with the previous version:
- Binance filters are selected by type rather than by index. It fixes DeviaVir#1794
- No more useless removal of trailing zeros of 'increment' and 'asset_increment'
- Binance notional filter is set in `product.min_total` rather than roughly modifying `product.min_size`.
  It fixes DeviaVir#1793
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants