Closed charlyroot closed 6 years ago
hello charlyroot, i had the same issue. after i canceled my manual created Open Orders in binance with the symbols i had set in traderBot file coin.js the error disappeared. my output of "npm test" shows the same as yours.
Hi mistersms,
there is my coin.js :
const coins = [
{
symbol:'ZECBTC',
quantity:0,
stop_loss:0,
mode:'profit',
profit:1.3,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
},
{
symbol:'XRPBTC',
quantity:0,
stop_loss:0,
mode:'profit',
profit:1.3,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
},
{
symbol:'XMRBTC',
quantity:0,
stop_loss:0,
mode:'profit',
profit:1.3,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
}
]
module.exports = coins;
after one night, the script doesn't make any order...
is working for u?
Hi charlyroot, I've only been testing this bot for a few days and in this timeperiod this bot never sell or buy anything. previously i have tested a while with the bot yasinkuyu/binance-trader and had the same problem that the bot never sold or bought a coin in profit mode. in range mode the bot sold and bought coins, so it was not a problem with binance api or keys. my first test machine was a debian 9.4 with node 8.11.2 and npm 5.6.0 now i will test the bot on an older machine with debian 8.10 and same node and npm version, maby the results are better. i am not a programmer or linux guru, so i have to test around with my poor linux skills ;)
this are my settings: { symbol:'ETHBTC', quantity:0.5, stop_loss:0, mode:'profit', profit:1.0, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:1, prints: 1, }, { symbol:'EOSBTC', quantity:1, stop_loss:0, mode:'profit', profit:1.0, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:1, prints: 1, }
i have allways set quantity.
05-25 09:32:19 | PPT/ETH | Limit | Sell | 0.023290 | 0.023290 | 0.47 | 0.47 | 0.010947 | -- | Filled |
---|---|---|---|---|---|---|---|---|---|---|
05-25 09:29:33 | PPT/ETH | Limit | Buy | 0.023177 | 0.023177 | 0.47 | 0.47 | 0.010894 | -- | Filled |
Only 1 buy/sell this night
thx for ur coin.js mistersms, I do not think the quantity is blocking since it is automatically put.
But what is the "range" mode ?
dreKion is it in this mode that the trader has sold / bought this morning?
it looks like that dreKion is using the range mode, where you can set static sell and buy limits. dreKion, can you post your coin.js?
i found out that my installed file trader.js was an older one as the one who was fixed in issue #2 now i have changed trader.js to the fixed one and started a new run... maybe that was the problem i will keep you update...
was that the problem?
hi BatmanPDX, the newest file trader.js did not resolve my issue, my bot doesnt sell or buy anything. but error code 400 disappeared. the second error i have is error message "Error action Error: Invalid get_ticker" in log, but therefore i opened issue #7 i have no idea, why my bot isnt selling or buying anything.
i am running pi-hole as internal dns server and in this log, i can only see dns requests to www.binance.com, no requests to stream.binance.com or api.binance.com. should the bot connect to stream.binance.com or api.binance.com for any buy or sell actions?
const coins = [ { symbol:'BCNETH', quantity:1000, stop_loss:0, mode:'profit', profit:0.8, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'XLMETH', quantity:1000, stop_loss:0, mode:'profit', profit:0.7, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'ZECETH', quantity:0, stop_loss:0, mode:'profit', profit:0.8, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'EOSETH', quantity:0, stop_loss:0, mode:'profit', profit:0.8, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'XVGETH', quantity:0, stop_loss:0, mode:'profit', profit:1.0, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:180.0, prints: 1, }, { symbol:'PPTETH', quantity:0, stop_loss:0, mode:'profit', profit:0.8, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, } ]
module.exports = coins;
This is mi coins.js
having the same issue
const coins = [
{
symbol:'KMDBTC',
quantity:0,
stop_loss:0,
mode:'profit',
profit:1.0,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
},
{
symbol:'BNBBTC',
quantity:0,
stop_loss:0,
mode:'profit',
profit:1.0,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
}
]
module.exports = coins;
#########################edit#############################
const coins = [
{
symbol:'EOSBTC',
amount:0.0012,
stop_loss:0,
mode:'profit',
profit:0.7,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
},
{
symbol:'KMDBTC',
amount:0.0012,
stop_loss:0,
mode:'profit',
profit:0.7,
increasing:0.00000001,
decreasing:0.00000001,
loop:0,
wait_time:0.7,
prints: 1,
}
]
module.exports = coins;
anybody already solved this error?
Are you running your shell in admin mode?
yes i am.. but still the same error occurred..did you guys adjusted your "binance_rest.js"?
i add more logs, please execute and copy the result, thanks
i have adjusted binance_rest.js and test/orders.test.js >>> question: is this logging know only active in test mode?
No, the logs are the same in test mode and production mode. New logs prints msg on 400 error
hi, i put logs upon calling the openorders and this is the result.... openorders
async openOrders(params = {}){
this.signedMethod() // secret and api key required for this method
const url = "api/v3/openOrders"
let query = this.makeQuery(url, params);
print('URL LOG: %s',url);
print('PARAMS LOG: %s',params);
print('QUERY LOG: %s',query);
const resp = await this.request.get(query);
return resp.data;
}
is the query variable correct?
still the same error 400 :
Buy error: Error: Request failed with status code 400
no additionnal log sorry
@tmalinao you have old version, In the latest version openorders is not available @charlyroot now i added logs to all calls, please check again.
thanks
@ignaciop000 Thank you bro.. last night i run the bot for the whole night the new version. there is a buy transaction in the dashboard but when i check itself from the binance history nothing is there.. i check my shell i found out that code 400 for the buy also. anyway i will get the updated one and let you know for the result again.
hello, i have run the bot the whole night too. the bot is buying and is canceling the order at the same time: in the binance app you can see the canceled orders, if filter is set to view the canceled orders: this is my coin.js at the moment:
const coins = [ { symbol:'ETHBTC', quantity:0, stop_loss:0, mode:'profit', profit:0.9, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'EOSBTC', quantity:0, stop_loss:0, mode:'profit', profit:0.9, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, }, { symbol:'XVGBTC', quantity:0, stop_loss:0, mode:'profit', profit:1.5, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:180.0, prints: 1, }, { symbol:'PPTBTC', quantity:0, stop_loss:0, mode:'profit', profit:0.9, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, } ]
module.exports = coins;
i will add know the debug string in my coin.js .....
since the enabled debug in coin.js i had 3 failed buy orders:
Symbol: PPTBTC Profit: 0.22 Expected Profit: 0.90 ASK: 0.00176960 BID: 0.00176490 Commission: 0.00050000 profitSelling 0.00178167 Symbol: PPTBTC Profit: 1.05 Expected Profit: 0.90 ASK: 0.00178440 BID: 0.00176490 Commission: 0.00050000 profitSelling 0.00178167 PPTBTC : Buy order created id:19629477, quantity:0.67000000, buyPrice:0.00176500, Take profit aprox :0.00178167 Profit loss, called order, 19629477 Buy order fail (Not filled) Cancel order... Symbol: PPTBTC Profit: 0.74 Expected Profit: 0.90 ASK: 0.00178440 BID: 0.00177050 Commission: 0.00050000 profitSelling 0.00178732 Symbol: PPTBTC Profit: 0.66 Expected Profit: 0.90 ASK: 0.00178440 BID: 0.00177190 Commission: 0.00050000 profitSelling 0.00178873 -snip- Symbol: PPTBTC Profit: 0.28 Expected Profit: 0.90 ASK: 0.00176720 BID: 0.00176140 Commission: 0.00050000 profitSelling 0.00177813 Symbol: PPTBTC Profit: 0.95 Expected Profit: 0.90 ASK: 0.00180000 BID: 0.00178220 Commission: 0.00050000 profitSelling 0.00179913 PPTBTC : Buy order created id:19631323, quantity:0.67000000, buyPrice:0.00178230, Take profit aprox :0.00179913 Profit loss, called order, 19631323 Buy order fail (Not filled) Cancel order... Symbol: PPTBTC Profit: 0.56 Expected Profit: 0.90 ASK: 0.00179530 BID: 0.00178450 Commission: 0.00050000 profitSelling 0.00180145 Symbol: PPTBTC Profit: 0.25 Expected Profit: 0.90 ASK: 0.00179270 BID: 0.00178740 Commission: 0.00050000 profitSelling 0.00180438 -snip- Symbol: PPTBTC Profit: 0.22 Expected Profit: 0.90 ASK: 0.00177810 BID: 0.00177340 Commission: 0.00050000 profitSelling 0.00179025 Symbol: PPTBTC Profit: 1.17 Expected Profit: 0.90 ASK: 0.00179500 BID: 0.00177340 Commission: 0.00050000 profitSelling 0.00179025 PPTBTC : Buy order created id:19634517, quantity:0.67000000, buyPrice:0.00177350, Take profit aprox :0.00179025 Profit loss, called order, 19634517 Buy order fail (Not filled) Cancel order... Symbol: PPTBTC Profit: 0.24 Expected Profit: 0.90 ASK: 0.00178750 BID: 0.00178240 Commission: 0.00050000 profitSelling 0.00179933 Symbol: PPTBTC Profit: 0.41 Expected Profit: 0.90 ASK: 0.00178750 BID: 0.00177940 Commission: 0.00050000 profitSelling 0.00179630 -snip-
does anybody know the reasen for "buy order fail (Not filled)" ?
now i tried to test with set a stop_loss of 10% for PPTBTC:
{ symbol:'PPTBTC', quantity:0, stop_loss:10, mode:'profit', profit:1.0, increasing:0.00000001, decreasing:0.00000001, loop:0, wait_time:0.7, prints: 1, debug: true, }
after starting the bot there is still a Stop-Loss Amount of 0 shown:
should not the 10% stop-loss be seen there?
in the webgui there is also no stop-loss of 10% visible:
any ideas?
data:
{ code: -2010,
msg: 'Account has insufficient balance for requested action.' } } }
Error Message: Account has insufficient balance for requested action.
Buy error: Error: Request failed with status code 400
thx all is working on other order 👍
Just for information, if u trade BTC, the lowest order is 0.001. So if u trade on Ex: 3 crypto (BNBBTC, ETHBTC, ZECBTC) in ur coin.js, be sure to have 3x0.001= 0.003 BTC on ur wallet.
to avoid error 400 : 'Account has insufficient balance for requested action.' 🤣
you mean to say if i have only 0.001 then only i can put 1 pair in my coins.js to avoid status code400 in buying?
yes because if the bot create an order of 1150 BCN for 0.001 BTC for example, is possible the bot want to buy another crypto (ETH for example) before the BCN are received and re-sell.
so -> 'Account has insufficient balance for requested action.'
still i am getting status code 400
hello guys any update on this?
@tmalinao please, share the logs with the detail of 400 error
hi @ignaciop000 ,
This is the error i got. msg: 'Timestamp for this request is outside of the recvWindow.' } } } Error Message: Timestamp for this request is outside of the recvWindow. Buy error: Error: Request failed with status code 400 but my time and date is sync. i tried to search with the same case and follow the steps what they did but still i received the error. Thanks.
@mistersms did you manage to fix stop_loss issue? I'm also having same issue, looking for a fix.
@goodthebest no, i did not manage to fix stop_loss issue. i am testing around with this bot about 3-4 weeks and i have the problem that the bot never bought a symbol correctly. sometimes i get error 400, but most of the time i get this error:
Symbol: PPTBTC Profit: 0.95 Expected Profit: 0.80 ASK: 0.00149990 BID: 0.00148500 Commission: 0.00050000 profitSelling 0.00149762 PPTBTC : Buy order created id:20520435, quantity:2.00000000, buyPrice:0.00148510, Take profit aprox :0.00149762 Profit loss, called order, 20520435 Buy order fail (Not filled) Cancel order... Symbol: PPTBTC Profit: 0.77 Expected Profit: 0.80 ASK: 0.00149990 BID: 0.00148770 Commission: 0.00050000 profitSelling 0.00150035
it looks like the bot is buying and selling at the same time, but stop_loss is set to 0.
do you have normal orders for buying and selling?
@ignaciop000 attached you can find my logs to status code 400 traderbot-error-statuscode400.txt
when i open my browser on http://localhost:3001:
npm test: