bt-ccxt-store icon indicating copy to clipboard operation
bt-ccxt-store copied to clipboard

Binance Problem

Open Chetchaiyan opened this issue 5 years ago • 3 comments

Dear Sir,

I found problem when trying to trade on binance. Here is the following detail.

Error when try to trade buy / sell / order_target the error I found is ccxt.base.errors.ExchangeError: binance {"code":-1104,"msg":"Not all sent parameters were read; read '8' parameter(s) but was sent '9'."}

I look into the code and found out that ccxtbroker._submit add 'created' to params which course this problem. I comment that line out and it's work.

ccxt_order['trades'] is none in ccxtbroker.next binance return ccxt_order with 'trades' key but none value in it which course error Line 199. I check for not null in line 198 and it's work again

Sorry for not issue pull requests, I don't know how to do it. I will try to learn and may be send you a pull requests later.

Best Regards, Chet Chetchaiyan

Chetchaiyan avatar May 09 '20 01:05 Chetchaiyan

The second issue looks like it was recently introduced. Should be a simple fix to check for the key.

The first issue needs more thought as that is needed for backtesting.

Dave-Vallance avatar May 09 '20 08:05 Dave-Vallance

Dear Sir,

I found problem when trying to trade on binance. Here is the following detail.

Error when try to trade buy / sell / order_target the error I found is ccxt.base.errors.ExchangeError: binance {"code":-1104,"msg":"Not all sent parameters were read; read '8' parameter(s) but was sent '9'."}

I look into the code and found out that ccxtbroker._submit add 'created' to params which course this problem. I comment that line out and it's work.

ccxt_order['trades'] is none in ccxtbroker.next binance return ccxt_order with 'trades' key but none value in it which course error Line 199. I check for not null in line 198 and it's work again

Sorry for not issue pull requests, I don't know how to do it. I will try to learn and may be send you a pull requests later.

Best Regards, Chet Chetchaiyan

I have the same problem for living trade on binance. but it don’t work by trying your idea. can you show me the modified code,thanks!

lsps2009 avatar May 11 '20 09:05 lsps2009

I have the same issues.

In bt-ccxt-store/ccxtbt/ccxtbroker.py, comment out : params['created'] = created in def _submit() for the first issue.

In the same file, in the method def next(self), change the following line: if 'trades' in ccxt_order: to if 'trades' in ccxt_order and ccxt_order['trades']!=None:

By doing the above two operations, I got the code working. While waiting for the official fix, this should be sufficient.

JzINSA avatar May 28 '20 05:05 JzINSA