I'm submitting a ...
[x] bug report
[ ] question about the decisions made in the repository
Action taken
Selling or buying via live trading on Binance.
Expected result
Order going through without error.
Actual result
Order going through with the following error:
2019-04-20T05:15:13.624Z 'sticky create' 'sell'
2019-04-20T05:15:37.318Z 'Error -2011: Unknown order sent.'
2019-04-20T05:15:37.318Z '[sticky order] FATAL ERROR' 'Error -2011: Unknown order sent.'
2019-04-20T05:15:37.319Z Error: Error -2011: Unknown order sent.
at /home/USER/gekko/exchange/wrappers/binance.js:101:15
at Request.request [as _callback] (/home/USER/gekko/exchange/node_modules/binance/lib/rest.js:90:25)
at Request.self.callback (/home/USER/gekko/exchange/node_modules/request/request.js:185:22)
at Request.emit (events.js:189:13)
at Request.<anonymous> (/home/USER/gekko/exchange/node_modules/request/request.js:1157:10)
at Request.emit (events.js:189:13)
at IncomingMessage.<anonymous> (/home/USER/gekko/exchange/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
2019-04-20T05:15:37.329Z 'error move'
(similar error gets thrown with buy orders).
The actual order does go through and I can see in my Binance account that the order was successful. It does not always happen, but once it happens, all the orders placed after get the same error.
The annoying part is that the web UI gets screwed up by this because it does not register these trades. As a result, once an order gets this error, that order and all the following orders will not be displayed in the UI and there'll be no profit report.
Other information
This happens quite frequently and is not just a bug on one machine. Both my Mac and Linux (Raspberry Pi, running Raspbian) systems are getting these errors. This seems to be happening across all markets
I was incorrect about that all orders after the first order with an error, also show errors. It appears that that is not always the case.
This issue has already been created #2745
i am having the same issue . so how can we fix this ?
Having the same issues. Please @askmike, can you help us?
I too get this error. Several times per day. and ALWAYS when it tries to "move" a trade to a new price limit after the market has changed.
It is caught and the system continues to try to trade, however it appears that the trader continues to believe it is either fully or not exposed, so the next trade would always be a Buy if the erroneous one was a Buy - and it does not seem to be able to correct itself so it will never Sell the erroneous Buy.
EDIT- this seems to happen when Gekko tries to move to a new buy or sell position after placing the first Buy or Sell. It's like something errors out with the timing, like Binance has not finished processing the trade or there's a difference somewhere in their data so Gekko tries to move a trade which cannot be found.
This is either related or the same as #2745
Below is an example output of my error:
2019-05-26 12:18:40 (DEBUG): Creating order to buy 4027.6794996453896 BCPT
2019-05-26 12:18:46 (DEBUG): [ORDER] statusChange: SUBMITTED
2019-05-26 12:18:46 (DEBUG): [ORDER] statusChange: OPEN
2019-05-26 12:18:58 (DEBUG): [ORDER] statusChange: MOVING
2019-05-26 12:18:58 (DEBUG): [ORDER] statusChange: ERROR
2019-05-26 12:18:58 (ERROR): [ORDER] Gekko received error from GB: Error -2011: Unknown order sent.
2019-05-26 12:18:58 (DEBUG): Error: Error -2011: Unknown order sent.
at /home/mack/gekko/exchange/wrappers/binance.js:101:15
at Request._callback (/home/mack/gekko/exchange/node_modules/binance/lib/rest.js:90:25)
at Request.self.callback (/home/mack/gekko/exchange/node_modules/request/request.js:185:22)
_at Request.emit (events.js:200:13)_
at Request.
_at Request.emit (events.js:200:13)_
at IncomingMessage.
_at Object.onceWrapper (events.js:288:20)_
_at IncomingMessage.emit (events.js:205:15)_
_at endReadableNT (_stream_readable.js:1137:12)_
_at processTicksAndRejections (internal/process/task_queues.js:84:9)_
2019-05-26 12:19:40 (DEBUG): Buy - Predicted variation: 0.5817719001242396
This is another example, this time from the terminal running the node rather from the output .log
<-- POST /api/getCandles
--> POST /api/getCandles 200 239ms 13.41kb
2019-05-26T21:36:16.251Z Error -2011: Unknown order sent.
2019-05-26T21:36:16.252Z [sticky order] FATAL ERROR Error -2011: Unknown order sent.
2019-05-26T21:36:16.252Z Error: Error -2011: Unknown order sent.
at /home/l/gekko/exchange/wrappers/binance.js:101:15
at Request._callback (/home/l/gekko/exchange/node_modules/binance/lib/rest.js:90:25)
at Request.self.callback (/home/l/gekko/exchange/node_modules/request/request.js:185:22)
at Request.emit (events.js:200:13)
at Request.
at Request.emit (events.js:200:13)
at IncomingMessage.
at Object.onceWrapper (events.js:288:20)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1137:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
2019-05-26T21:36:16.256Z error move
<-- POST /api/getCandles
--> POST /api/getCandles 200 241ms 13.52kb
Yes, I got the same issue on Binance! ;-(
2019-05-29T13:51:50.040Z 'sticky create' 'buy'
2019-05-29T13:51:52.306Z 'Error -2011: Unknown order sent.'
2019-05-29T13:51:52.306Z '[sticky order] FATAL ERROR' 'Error -2011: Unknown order sent.'
2019-05-29T13:51:52.306Z Error: Error -2011: Unknown order sent.
2019-05-29T13:51:52.307Z 'error move'
Same error and its annoying since it only happens in live trade after 15 tries in live i am posting this error.
Hey Community
I am a novice and do not understand the error very well, however..
Do you think it is possible that there is a problem with System time and Binance time?

I am having the same issue on stable branch.
Do you use the stable version?
Has anyone tested the "develop" branch?
I have tried multiple release all3kcis. They all seem to make the same error.
Unfortunately it is difficult and perhaps costly to test this error live since currency can shift value (not in your favour) and paper trading does not give the same result.
So.. we need help from askmike asap :)
I get the same error every day but the bot actually retries and makes the trade, the only bug here is the log output which doesn't get produced of the real trade.
Have you checked to see if you have actually made the trade or not?
Has the bot crashed or restarted afterwards?
Hi Arash.
Yes, in my situation, the problem is as follows:
Trade A is placed at price X
The cost of the currency changes
Trade A is cancelled
Trade B is placed at price Y * Error unknown order
Gekko does not know if Trade B is filled or even exists.
Gekko tries to continue to buy or sell (whatever it was doing before) but cannot since there is no currency due to trade B being filled.
Also:
" the only bug here is the log output which doesn't get produced of the real trade."
What does this mean? The logs are produced for live and paper trading. Look for "tradebot" logs in /Gekko/Logs/
I have tried multiple release all3kcis. They all seem to make the same error.
Unfortunately it is difficult and perhaps costly to test this error live since currency can shift value (not in your favour) and paper trading does not give the same result.So.. we need help from askmike asap :)
multiple release ? But develop is not released :), Have you tested develop branch ?
The error only occurs during the "tradebot" and not during the "paperTrader".
Because it is a communication error between bot and Binance API.
Yes I am using deleop release.
I understand it's a Comms issue
On Tue, 11 Jun 2019, 09:19 All3kcis <[email protected] wrote:
I have tried multiple release all3kcis. They all seem to make the same
error.
Unfortunately it is difficult and perhaps costly to test this error live
since currency can shift value (not in your favour) and paper trading does
not give the same result.So.. we need help from askmike asap :)
multiple release ? But develop is not released :), Have you tested develop
branch ?The error only occurs during the "tradebot" and not during the
"paperTrader".
Because it is a communication error between bot and Binance API.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2762?email_source=notifications&email_token=ALUDZDBVW5BK5GC7MKRQD4LPZ5NZJA5CNFSM4HHJU2VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXMKRYA#issuecomment-500738272,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALUDZDEXOKFXH3BQ6Z4JULTPZ5NZJANCNFSM4HHJU2VA
.
hi Igmack,
"Gekko does not know if Trade B is filled or even exists.
Gekko tries to continue to buy or sell (whatever it was doing before) but cannot since there is no currency due to trade B being filled."
I did this and am pleased with the result sofar, In your strategy introduce a new variable(preset to false) called 'adviced' and set it to true when your strategy issues an advice and check for its value before issuing all advices, also set 2 other variables named 'bought' and 'sold' and trigger them in their respevtive advices, this way gekko knows that it has prevously done something or not regardless of the
actual online trade's result, bare in mind that this is risky and you need to monitor your portfolio.
"What does this mean? The logs are produced for live and paper trading. Look for "tradebot" logs in /Gekko/Logs/"
if you do what i just said,you won't actually get the log of the real trade(only the first one that caused an error) you have to then check manually to see if you have actually done what you wanted to do
One other thing, set your update period to be 1h max, because this determines the retry cooldown.
Hello Arash
Sounds perfect!!! I am using a neuralnet strategy, not really sure where to implement this but ill play around - can you please share your solution ?
don't risk real mony on anything that you're still not confident with, remember that you can run a live paper trader while still learning.
" can you please share your solution ?"
what do you mean, like if i can post my strategy or not? then no, but i just told you what to do, learn to code, it always pays out ;)
Dude, if people are in here with the unknown order error, I'm pretty
confident they have already read the documentation, felt comfortable enough
to trade live and had a look at the .js
On Wed, 12 Jun 2019, 01:30 Arash Javanmardi <[email protected] wrote:
don't risk real mony on anything that you're still not confident with,
remember that you can run a live paper trader while still learning." can you please share your solution ?"
what do you mean, like if i can post my strategy or not? then no, but i
just told you what to do, learn to code, it always pays out ;)—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2762?email_source=notifications&email_token=ALUDZDGHTSF6DMBADSNXLUTP2A7TBA5CNFSM4HHJU2VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXO4QNQ#issuecomment-501073974,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALUDZDF3BEQNT5C2T7F2OGDP2A7TBANCNFSM4HHJU2VA
.
Also, not posting code fix to issue on open source project in development?
That's pretty cruel.
At least tell askmike if you don't want help the community
On Wed, 12 Jun 2019, 01:30 Arash Javanmardi <[email protected] wrote:
don't risk real mony on anything that you're still not confident with,
remember that you can run a live paper trader while still learning." can you please share your solution ?"
what do you mean, like if i can post my strategy or not? then no, but i
just told you what to do, learn to code, it always pays out ;)—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2762?email_source=notifications&email_token=ALUDZDGHTSF6DMBADSNXLUTP2A7TBA5CNFSM4HHJU2VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXO4QNQ#issuecomment-501073974,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALUDZDF3BEQNT5C2T7F2OGDP2A7TBANCNFSM4HHJU2VA
.
The error code "Error -2011" means "CANCEL_REJECTED" according to this page.
"Unknown order sent." = The order (by either orderId, clOrdId, origClOrdId) could not be found
It actually looks like a timing problem, gekko wants to move the order but at the same time it is already filled on Binance.
I will take a look at the code this weekend to see if it is possible to have the order considered completed upon receipt of this error.
I have a good new for you ;)
Tested modifications seem to work.
I let the bot run to confirm that it works well.
For the most impatient see changes on the PR #2792
If you want to test changes, juste add "Error -2011", see exchange/wrappers/binance.js modifications
AMAZING
@all3kcis Can you confirm now that your fix works? I'm looking forward to know!
It works. It works perfectly. I have been using it since it was shared.
@camel113 Yes, it works perfectly for me too.
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.
Most helpful comment
I have a good new for you ;)
Tested modifications seem to work.
I let the bot run to confirm that it works well.
For the most impatient see changes on the PR #2792
If you want to test changes, juste add "Error -2011", see exchange/wrappers/binance.js modifications