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

Error while creating summary: Error: Trades not found #2518

Closed
xbromy opened this issue Sep 10, 2018 · 31 comments
Closed

Error while creating summary: Error: Trades not found #2518

xbromy opened this issue Sep 10, 2018 · 31 comments

Comments

@xbromy
Copy link

xbromy commented Sep 10, 2018

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ...
[ ] bug report
[ ] question about the decisions made in the repository

Action taken (what you did)
Running live trader on development branch

Expected result (what you hoped would happen)
summary in log

Actual result (unexpected outcome)
2018-09-10 16:53:21 (DEBUG): [ORDER] statusChange: OPEN
2018-09-10 16:53:23 (INFO): [ORDER] partial buy fill, total filled: 39.7
2018-09-10 16:53:23 (DEBUG): [ORDER] statusChange: FILLED
2018-09-10 16:53:25 (ERROR): Error while creating summary: Error: Trades not found
at get (/home/username/gekko/exchange/wrappers/binance.js:366:23)
at checkFn (/home/username/gekko/exchange/exchangeUtils.js:23:16)
at /home/username/gekko/exchange/wrappers/binance.js:130:12
at Request.request [as _callback] (/home/username/gekko/exchange/node_modules/binance/lib/rest.js:100:21)
at Request.self.callback (/home/username/gekko/exchange/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request. (/home/username/gekko/exchange/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/home/username/gekko/exchange/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1081:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
2018-09-10 16:54:56 (DEBUG): Buy - Predicted variation: 0.8433171137867231
2018-09-10 17:03:05 (DEBUG): syncing private data
2018-09-10 17:13:05 (DEBUG): syncing private data

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

@PhunkyBob
Copy link

Same here:

2018-09-10 18:53:09 (DEBUG):    Processing 25 new trades. From 2018-09-10 16:52:49 UTC to 2018-09-10 16:53:09 UTC. (a few seconds)
2018-09-10 18:53:09 (INFO):     Trader Received advice to go long. Buying  XRP
isValidLot 10 true
2018-09-10 18:53:09 (DEBUG):    Creating order to buy 435.57288590471444 XRP
2018-09-10 18:53:15 (DEBUG):    [ORDER] statusChange: SUBMITTED
isValidLot 10 true
2018-09-10 18:53:16 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-10 18:53:19 (INFO):     [ORDER] partial buy fill, total filled: 435.5
2018-09-10 18:53:19 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-10 18:53:20 (ERROR):    Error while creating summary: Error: Trades not found
    at get (/home/gekko/gekko/exchange/wrappers/binance.js:366:23)
    at checkFn (/home/gekko/gekko/exchange/exchangeUtils.js:23:16)
    at /home/gekko/gekko/exchange/wrappers/binance.js:130:12
    at Request.request [as _callback] (/home/gekko/gekko/exchange/node_modules/binance/lib/rest.js:100:21)
    at Request.self.callback (/home/gekko/gekko/exchange/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-10 18:53:29 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-10 18:53:29 (DEBUG):    Processing 87 new trades. From 2018-09-10 16:53:09 UTC to 2018-09-10 16:53:28 UTC. (a few seconds)
2018-09-10 18:53:49 (DEBUG):    Requested XRP/USDT trade data from Binance ...
.
.
.
2018-09-10 19:17:49 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-10 19:17:49 (DEBUG):    Processing 8 new trades. From 2018-09-10 17:17:29 UTC to 2018-09-10 17:17:48 UTC. (a few seconds)
2018-09-10 19:18:09 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-10 19:18:10 (DEBUG):    Processing 7 new trades. From 2018-09-10 17:17:52 UTC to 2018-09-10 17:18:09 UTC. (a few seconds)
2018-09-10 19:18:10 (INFO):     Received advice to sell however Gekko is already in the process to buy
2018-09-10 19:18:10 (INFO):     Canceling buy order first
(node:32031) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
2018-09-10 19:18:29 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-10 19:18:29 (DEBUG):    Processing 10 new trades. From 2018-09-10 17:18:17 UTC to 2018-09-10 17:18:28 UTC. (a few seconds)
2018-09-10 19:18:49 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-10 19:18:49 (DEBUG):    Processing 25 new trades. From 2018-09-10 17:18:29 UTC to 2018-09-10 17:18:48 UTC. (a few seconds)

I'm using 9cfb331

@PhunkyBob
Copy link

2018-09-14 10:56:09 (DEBUG):    Requested EOS/USDT trade data from Binance ...
2018-09-14 10:56:09 (DEBUG):    Processing 124 new trades. From 2018-09-14 08:55:49 UTC to 2018-09-14 08:56:09 UTC. (a few seconds)
2018-09-14 10:56:09 (INFO):     Trader Received advice to go long. Buying  EOS
isValidLot 10 true
2018-09-14 10:56:09 (DEBUG):    Creating order to buy 22.51082142515631 EOS
2018-09-14 10:56:16 (DEBUG):    [ORDER] statusChange: SUBMITTED
isValidLot 10 true
2018-09-14 10:56:16 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-14 10:56:18 (INFO):     [ORDER] partial buy fill, total filled: 22.51
2018-09-14 10:56:18 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-14 10:56:19 (ERROR):    Error while creating summary: Error: Trades not found
    at get (/home/gekko/gekko/exchange/wrappers/binance.js:366:23)
    at checkFn (/home/gekko/gekko/exchange/exchangeUtils.js:23:16)
    at /home/gekko/gekko/exchange/wrappers/binance.js:130:12
    at Request.request [as _callback] (/home/gekko/gekko/exchange/node_modules/binance/lib/rest.js:100:21)
    at Request.self.callback (/home/gekko/gekko/exchange/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-14 10:56:29 (DEBUG):    Requested EOS/USDT trade data from Binance ...
2018-09-14 10:56:29 (DEBUG):    Processing 166 new trades. From 2018-09-14 08:56:09 UTC to 2018-09-14 08:56:29 UTC. (a few seconds)
2018-09-14 10:56:49 (DEBUG):    Requested EOS/USDT trade data from Binance ...

@PhunkyBob
Copy link

And again.

@xbromy, did you find a solution?

@askmike
Copy link
Owner

askmike commented Sep 17, 2018

This is all on binance, it seems. The same error message is also effecting gdax users (happens to me there about once every 200 trades).

This error comes from Gekko not being able to find the trade it just did. Some context:

Gekko trades by doing limit orders, it tells Binance please buy 10 BTC at X and Binance replies we accept you order and you can refer to it by this ID. After Gekko figures out the order is completed and 10 bitcoin is bought Gekko needs to figure out things like execution price (since it might have done multiple limit orders) and fees. However the only way to get this is to ask for all trades you did and match them with the limit orders we requested previously.

This error means that matching didn't work, there are 2 reasons for this:

  • Binance only provides your previous 1000 trades to you, so if you trade a lot (or big size) by the time Gekko gets around to asking about these trades they are not recent enough anymore. So not part of that list
  • Gekko thought the limit order was completed, but in reality it wasn't (as such there are no trades).

I am in the process of creating one big debug branch that everyone who has any problems on binance, gdax or kraken should run.

@askmike
Copy link
Owner

askmike commented Sep 19, 2018

I pushed more logging around this situation: 2271428 please run the latest develop and post more logs. I am running this non stop as well to see if I can reproduce it..

@PhunkyBob
Copy link

I'm now on 2271428

@PhunkyBob
Copy link

And here is the error:

2018-09-19 20:57:49 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 20:57:49 (DEBUG):    Processing 66 new trades. From 2018-09-19 18:57:30 UTC to 2018-09-19 18:57:49 UTC. (a few seconds)
2018-09-19 20:58:09 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 20:58:09 (DEBUG):    Processing 160 new trades. From 2018-09-19 18:57:50 UTC to 2018-09-19 18:58:08 UTC. (a few seconds)
2018-09-19 20:58:09 (INFO):     Trader Received advice to go long. Buying  BCC
isValidLot 10 true
2018-09-19 20:58:09 (DEBUG):    Creating order to buy 0.28961057567235676 BCC
2018-09-19T18:58:15.325Z 'sticky create' 'buy'
2018-09-19 20:58:15 (DEBUG):    [ORDER] statusChange: SUBMITTED
isValidLot 10 true
2018-09-19 20:58:15 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-19 20:58:17 (INFO):     [ORDER] partial buy fill, total filled: 0.28961
2018-09-19 20:58:17 (DEBUG):    [ORDER] statusChange: FILLED
cannot find trades! { order: '50090158',
  list:
   [ 13244501,
     13252488,
     14941858,
     15010756,
     15038672,
     15038672,
     15041342,
     15148049,
     15188398,
     15215562,
     15223491,
     15529638,
     15529834,
     15530336,
     15774885,
     15893154,
     15967704,
     15967704,
     15975351,
     15975351,
     17085928,
     17086203,
     17086203,
     17086203,
	 17088819,
     17088819,
     17088819,
     17183532,
     17183532,
     17198271,
     17479556,
     17648271,
     18082979,
     18082979,
     18082979,
     18086756,
     18304501,
     18334767,
     18399062,
     18403080,
     18571647,
     18571647,
     18584379,
     18584379,
     18810444,
     18880116,
     18886611,
     18951078,
     19229630,
     19234130,
     19367816,
     19384004,
     19384004,
     21409954,
     21469211,
     23172984,
     23172984,
     23172984,
     23183761,
     23197698,
     23221635,
     23221635,
     23221635,
     23246764,
     23246764,
     23256203,
     24188828,
     24209503,
     24319779,
     24319779,
     24323747,
     24323747,
     24428282,
     24444820,
     24444820,
     25691123,
     25758557,
     26060569,
     26060569,
     26060569,
     26108788,
     26108788,
     26108788,
     26942372,
     26952427,
     28909158,
     28956078,
     29855635,
     29861741,
     30298112,
     30309149,
     30367105,
     30619158,
     32173505,
     32206925,
     32206925,
     32229257,
     32229257,
     32813011,
     32813011,
     ... 17 more items ] }
2018-09-19 20:58:19 (ERROR):    Error while creating summary: Error: Trades not found
    at get (/home/gekko/gekko/exchange/wrappers/binance.js:347:23)
    at checkFn (/home/gekko/gekko/exchange/exchangeUtils.js:24:16)
    at /home/gekko/gekko/exchange/wrappers/binance.js:132:12
    at Request.request [as _callback] (/home/gekko/gekko/exchange/node_modules/binance/lib/rest.js:100:21)
    at Request.self.callback (/home/gekko/gekko/exchange/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-19 20:58:29 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 20:58:29 (DEBUG):    Processing 29 new trades. From 2018-09-19 18:58:10 UTC to 2018-09-19 18:58:29 UTC. (a few seconds)
2018-09-19 20:58:49 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 20:58:50 (DEBUG):    Processing 48 new trades. From 2018-09-19 18:58:32 UTC to 2018-09-19 18:58:46 UTC. (a few seconds)
2018-09-19 20:59:09 (DEBUG):    Requested BCC/USDT trade data from Binance ...
.
.
.
2018-09-19 21:13:29 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 21:13:30 (DEBUG):    Processing 35 new trades. From 2018-09-19 19:13:09 UTC to 2018-09-19 19:13:28 UTC. (a few seconds)
2018-09-19 21:13:49 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 21:13:51 (DEBUG):    Processing 52 new trades. From 2018-09-19 19:13:31 UTC to 2018-09-19 19:13:50 UTC. (a few seconds)
2018-09-19 21:14:09 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 21:14:09 (DEBUG):    Processing 47 new trades. From 2018-09-19 19:13:51 UTC to 2018-09-19 19:14:09 UTC. (a few seconds)
2018-09-19 21:14:09 (INFO):     Received advice to sell however Gekko is already in the process to buy
2018-09-19 21:14:09 (INFO):     Canceling buy order first
(node:9857) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
2018-09-19 21:14:29 (DEBUG):    Requested BCC/USDT trade data from Binance ...
2018-09-19 21:14:30 (DEBUG):    Processing 138 new trades. From 2018-09-19 19:14:10 UTC to 2018-09-19 19:14:30 UTC. (a few seconds)
2018-09-19 21:14:49 (DEBUG):    Requested BCC/USDT trade data from Binance ...

@askmike
Copy link
Owner

askmike commented Sep 20, 2018

@PhunkyBob

Thanks for those logs! This is a tough one to fix...

The list in the log is cut off but it's clear that the order Gekko was searching for was not in that list. This most likely means that the order was never filled (even though Gekko thought it was).

Just to make sure: Do you have any other trading things (or multiple gekkos) running on that binance account? This might be caused because someone cancelled an order that Gekko created and as such Gekko thought it was filled.

I pushed another commit that should give us even more debug information: 22fca69 because I am still not sure what the problem is..

@PhunkyBob
Copy link

When Gekko says

2018-09-19 20:58:19 (ERROR): Error while creating summary: Error: Trades not found

the trade was however made and filled in my Binance account (and at the first attempt).

Here is my Binance order log:

https://i.imgur.com/fd5Pi8x.png

The latest order (21:16:16) was made by me (because à saw Gekko failed to make it), all the others were made by Gekko.
We can see that the long advice was made correctly.

@askmike
Copy link
Owner

askmike commented Sep 20, 2018

@PhunkyBob thanks a lot for all the details. Do please run the latest develop as it might show more debug output when the situation is happening.

I'm not sure whether this is a problem with Gekko or binance, as such I asked in their API support chat:

screen shot 2018-09-20 at 15 54 20

@PhunkyBob
Copy link

I'm now on 22fca69

@PhunkyBob
Copy link

2018-09-20 22:31:09 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 22:31:09 (DEBUG):    Processing 187 new trades. From 2018-09-20 20:30:49 UTC to 2018-09-20 20:31:08 UTC. (a few seconds)
2018-09-20 22:31:09 (INFO):     Trader Received advice to go long. Buying  XRP
isValidLot 10 true
2018-09-20 22:31:09 (DEBUG):    Creating order to buy 304.8211011944301 XRP
2018-09-20T20:31:14.852Z 'sticky create' 'buy'
2018-09-20 22:31:14 (DEBUG):    [ORDER] statusChange: SUBMITTED
isValidLot 10 true
2018-09-20 22:31:15 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-20 22:31:17 (INFO):     [ORDER] partial buy fill, total filled: 304.8
2018-09-20 22:31:17 (DEBUG):    [ORDER] statusChange: FILLED
cannot find trades! { order: '21040740',
  list:
   [ 21019478,
     21010462,
     20859904,
     20859904,
     20855636,
     20638354,
     20626447,
     20626447,
     20509106,
     20492314,
     20492314,
     20462192,
     20425584,
     20408332,
     20408269,
     20398710,
     20388622,
     20352261,
     20341643,
     20339775,
     20209144,
     20209144,
     19976305,
     19066903,
     19047973,
     16327174,
     16209927,
     16209927,
     16209927,
     15908193,
     15908083,
     15891130,
     15891130,
     15694017,
     15693493,
     15687248,
     15687248,
     15640172,
     15640172,
     15602650,
     15600338,
     15591280,
     15590273,
     15590235,
     15590235,
     15590089,
     15553296,
     15516879,
     15308756,
     15308756,
     15290039,
     15290039,
     15281705,
     15281081,
     15278861,
     15272568,
     15270400,
     15270400,
     15254821,
     15236591,
     15235188,
     15068068,
     15012292,
     14932112,
     14932112,
     14857005,
     14658271,
     14656647,
     14654033,
     14654033,
     14646295,
     14641657,
     14641630,
     14640644,
     14504037,
     14504037,
     14503304,
     14413157,
     14407172,
     14197569,
     14160562,
     14160479,
     14160479,
     14160479,
     14139236,
     14136087,
     14136087,
     14117288,
     14079516,
     14079516,
     14053783,
     14002131,
     14002131,
     14002131,
     14002131,
     13963651,
     13610498,
     13578328,
     12881046,
     12872316,
     ... 9 more items ] }
couldnt find any trade for order, here is order: { err: null,
  resp:
   { symbol: 'XRPUSDT',
     orderId: 21040740,
     clientOrderId: '2TyFpfxjvK3tQDwVy7Mu90',
     price: '0.40651000',
     origQty: '304.80000000',
     executedQty: '0.00000000',
     cummulativeQuoteQty: '0.00000000',
     status: 'NEW',
     timeInForce: 'GTC',
     type: 'LIMIT',
     side: 'BUY',
     stopPrice: '0.00000000',
     icebergQty: '0.00000000',
     time: 1537475475034,
     updateTime: 1537475475034,
     isWorking: true } }
2018-09-20 22:31:19 (ERROR):    Error while creating summary: Error: Trades not found
    at binance.queryOrder (/home/gekko/gekko/exchange/wrappers/binance.js:356:19)
    at Request.request [as _callback] (/home/gekko/gekko/exchange/node_modules/binance/lib/rest.js:100:21)
    at Request.self.callback (/home/gekko/gekko/exchange/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/home/gekko/gekko/exchange/node_modules/request/request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-20 22:31:29 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 22:31:30 (DEBUG):    Processing 188 new trades. From 2018-09-20 20:31:09 UTC to 2018-09-20 20:31:29 UTC. (a few seconds)
2018-09-20 22:31:49 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 22:31:49 (DEBUG):    Processing 95 new trades. From 2018-09-20 20:31:30 UTC to 2018-09-20 20:31:48 UTC. (a few seconds)
2018-09-20 22:32:09 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 22:32:09 (DEBUG):    Processing 60 new trades. From 2018-09-20 20:31:50 UTC to 2018-09-20 20:32:08 UTC. (a few seconds)
2018-09-20 22:32:29 (DEBUG):    Requested XRP/USDT trade data from Binance ...
.
.
.
2018-09-20 23:30:50 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 23:30:50 (DEBUG):    Processing 51 new trades. From 2018-09-20 21:30:30 UTC to 2018-09-20 21:30:50 UTC. (a few seconds)
2018-09-20 23:31:10 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 23:31:10 (DEBUG):    Processing 58 new trades. From 2018-09-20 21:30:51 UTC to 2018-09-20 21:31:08 UTC. (a few seconds)
2018-09-20 23:31:10 (INFO):     Received advice to sell however Gekko is already in the process to buy
2018-09-20 23:31:10 (INFO):     Canceling buy order first
(node:18409) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
2018-09-20 23:31:30 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 23:31:30 (DEBUG):    Processing 108 new trades. From 2018-09-20 21:31:10 UTC to 2018-09-20 21:31:29 UTC. (a few seconds)
2018-09-20 23:31:50 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 23:31:50 (DEBUG):    Processing 55 new trades. From 2018-09-20 21:31:31 UTC to 2018-09-20 21:31:49 UTC. (a few seconds)
2018-09-20 23:32:10 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-20 23:32:10 (DEBUG):    Processing 111 new trades. From 2018-09-20 21:31:50 UTC to 2018-09-20 21:32:09 UTC. (a few seconds)

Again, the order is however made in Binance.

@rkingy
Copy link
Contributor

rkingy commented Sep 22, 2018

Hi Guys,

I got the same issue last night too... caused me to miss out on a couple of good trades as all future trades get the "ignoring advice, already in process to Buy" which is kinda frustrating..

I'm going to launch my own investigation.. but below is my log output. Hopefully helpful to someone?
I'm running latest Develop branch at commit "[GB] add more debug information on binance trade match fail, see #2518"

2018-09-21 15:42:02 (INFO):        --- BUY --- 0.08391 2018-09-21T15:36:00Z
2018-09-21 15:42:02 (INFO):                 MEH
2018-09-21 15:42:02 (INFO):         Biggest Drop was.. 1.2952469064415517
2018-09-21 15:42:02 (INFO):        bbLongDegs 35.26301172960844
2018-09-21 15:42:02 (INFO):        ma1000Degs 15.692328522818876
2018-09-21 15:42:02 (INFO):                 BBUpper0.0911 BBMiddle0.0879 BBLow0.0846
2018-09-21 15:42:02 (INFO):        Trader Received advice to go long. Buying  ADA
isValidLot 10 true
2018-09-21 15:42:02 (DEBUG):        Creating order to buy 37999.21509270051 ADA
{"status":1,"request":"4168b3c2-777c-40f4-bed9-fc4be3bf5a4c"}
2018-09-21 15:42:05 (INFO):        Send advice via email.
2018-09-21T15:42:07.204Z 'sticky create' 'buy'
2018-09-21 15:42:07 (DEBUG):        [ORDER] statusChange: SUBMITTED
isValidLot 10 true
2018-09-21 15:42:07 (DEBUG):        [ORDER] statusChange: OPEN
2018-09-21 15:42:08 (INFO):        [ORDER] partial buy fill, total filled: 37999.2
2018-09-21 15:42:08 (DEBUG):        [ORDER] statusChange: FILLED
cannot find trades! { order: '25861199',
list:
[ 25822337,
25822322,
25794791,
25794791,
25794763,
25794763,
25794763,
25794763,
25794763,
25636962,
25622818,
25622818,
25622818,
25585628,
25585486,
25585439,
25585439,
25585439,
25585439,
25585439,
25585439,
25501167,
25501167,
25501167,
25501110,
25501110,
25501110,
25428663,
....
....
23802117,
23802117,
23767173,
... 405 more items ] }
couldnt find any trade for order, here is order: { err: null,
resp:
{ symbol: 'ADAUSDT',
orderId: 25861199,
clientOrderId: 'g27VyOPTF8GGatZlfx7D4v',
price: '0.08379000',
origQty: '37999.20000000',
executedQty: '0.00000000',
cummulativeQuoteQty: '0.00000000',
status: 'NEW',
timeInForce: 'GTC',
type: 'LIMIT',
side: 'BUY',
stopPrice: '0.00000000',
icebergQty: '0.00000000',
time: 1537544527269,
updateTime: 1537544527269,
isWorking: true } }
2018-09-21 15:42:11 (ERROR):        Error while creating summary: Error: Trades not found
at binance.queryOrder (/home/richard/bitbucket/gekko-0-6/exchange/wrappers/binance.js:356:19)
at Request.request [as _callback] (/home/richard/bitbucket/gekko-0-6/exchange/node_modules/binance/lib/rest.js:100:21)
at Request.self.callback (/home/richard/bitbucket/gekko-0-6/exchange/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/home/richard/bitbucket/gekko-0-6/exchange/node_modules/request/request.js:1157:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/home/richard/bitbucket/gekko-0-6/exchange/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-21 15:42:22 (DEBUG):        Requested ADA/USDT trade data from Binance ...
2018-09-21 15:42:22 (DEBUG):        Processing 43 new trades. From 2018-09-21 15:42:02 UTC to 2018-09-21 15:42:21 UTC. (a few seconds)


.... a long time later....




2018-09-21 15:48:02 (INFO):        --- SELL --- 0.08205 2018-09-21T15:42:00Z
2018-09-21 15:48:02 (INFO):                 Meh going wrong way
2018-09-21 15:48:02 (DEBUG):                 Sale INFO -2.2669104204753205%
2018-09-21 15:48:02 (DEBUG):                 C0.08205
2018-09-21 15:48:02 (INFO):        Received advice to sell however Gekko is already in the process to buy
2018-09-21 15:48:02 (INFO):        Canceling buy order first
{"status":1,"request":"d5fe8759-9de0-4288-9003-6bef3f0ab040"}



..................





2018-09-21 15:54:02 (INFO):        --- BUY --- 0.08277 2018-09-21T15:48:00Z
2018-09-21 15:54:02 (INFO):                 MEH
2018-09-21 15:54:02 (INFO):         Biggest Drop was.. 0
2018-09-21 15:54:02 (INFO):        bbLongDegs 22.496471500212326
2018-09-21 15:54:02 (INFO):        ma1000Degs 14.369066254838387
2018-09-21 15:54:02 (INFO):                 BBUpper0.0918 BBMiddle0.0873 BBLow0.0828
2018-09-21 15:54:02 (INFO):        ignoring advice: already in the process to buy
{"status":1,"request":"91b560d8-c661-4bf1-b769-33f189825a00"}
2018-09-21 15:54:04 (INFO):        Send advice via email.
2018-09-21 15:54:22 (DEBUG):        Requested ADA/USDT trade data from Binance ...


........................


2018-09-21 16:36:22 (INFO):        --- SELL --- 0.0839 2018-09-21T16:30:00Z
2018-09-21 16:36:22 (INFO):                 End of Big Trend, its now going down!
2018-09-21 16:36:22 (DEBUG):                 Sale INFO 1.3468414779499476%
2018-09-21 16:36:22 (DEBUG):                 C0.0839
2018-09-21 16:36:22 (INFO):        ignoring advice: already cancelling previous buy order
{"status":1,"request":"2ded6a04-ec0b-44c8-b533-510fa105a167"}
2018-09-21 16:36:25 (INFO):        Send advice via email.
2018-09-21 16:36:34 (DEBUG):        syncing private data
2018-09-21 16:36:42 (DEBUG):        Requested ADA/USDT trade data from Binance ...
2018-09-21 16:36:42 (DEBUG):        Processing 4 new trades. From 2018-09-21 16:36:22 UTC to 2018-09-21 16:36:42 UTC. (a few seconds)
2018-09-21 16:37:02 (DEBUG):        Requested ADA/USDT trade data from Binance ...

@rkingy
Copy link
Contributor

rkingy commented Sep 22, 2018

@askmike Perhaps this is a rounding issue?

Creating order to buy 37999.21509270051
...
[ORDER] partial buy fill, total filled: 37999.2

@rkingy
Copy link
Contributor

rkingy commented Sep 22, 2018

Ok been doing some further investigation... (it's probably not a rounding issue..)
For my example the orderId 25861199 definitely exists and was filled quickly without any cancels and retries on the exchange.

I'm not much of a Node.js developer but from what I can see we were trying to check the order exists in a list of order ids but the response from Binance didn't contain this orderID in the array of responses. My guess is that Binance was under load (trade volumes are quite high right now) and the response from binance was cached or hadn't updated yet. (Just a guess.. this is hard to prove!).

Looking at exchange/wrappers/binance.js Lines 404-405

  const handler = cb => this.binance.myTrades(reqData, this.handleResponse('getOrder', cb));
  retry(undefined, handler, get);

We have a retry function, but the checkFn "handler" we pass through doesn't have any checking that the order ID we are wanting actually exists? Can we somehow add this check into the handler? So if the order Id we are looking for doesn't return we retry the request to the exchange X number of times before we just fail?

Also as this causes all future trades to fail. I think we need to email an alert in this situation so we can come and investigate / restart gekko. Gekko shouldn't just continue like nothing is wrong.

@askmike
Copy link
Owner

askmike commented Sep 22, 2018

@PhunkyBob @rkingy I know why the error is happening now:

  1. Gekko creates an order
  2. Gekko checks the order and thinks it's filled
  3. Gekko tried to get fill information

However 2. is wrong in your cases! The extra logs show that the order wasn't filled at all when Gekko tripped. So while it might be that your binance account shows the order was filled, it wasn't when Gekko tried to get fill information yet!

We have a retry function, but the checkFn "handler" we pass through doesn't have any checking that the order ID we are wanting actually exists? Can we somehow add this check into the handler? So if the order Id we are looking for doesn't return we retry the request to the exchange X number of times before we just fail?

So this is how Binance deals with your trading:

  • You create an order saying you want to sell (or buy).
  • Binance gives you back an orderID
  • You can ask Binance "what is the status of my order"? And Binance will give a status update.
  • Gekko keeps asking this (in the checkOrder function in binance.js).
  • As soon as Binance says: the order is now filled Gekko will go ahead and try to get statistics about the order. Gekko wants to know how much fees you paid, and Binance doesn't give this information when you request the order, instead you need to request "trades" (fills) that were part of your order (gekko does this in getOrder). You can only request recent trades and filter out those related to your order.

In other words: Gekko calls getOrder before the order is filled, while it should be after the order is filled. The most likely cause I can imagine is when Gekko asks for an order status, and Binance replies with "I dont know this order" - right now Gekko assumes that means the order was filled, but maybe it means something else.

I just pushed a new commit, that instead of assuming the order was filled when binance says "I dont know this order" will re ask the same information later. Can you test that out?

@rkingy
Copy link
Contributor

rkingy commented Sep 22, 2018

Thanks Mike.! I'll pull that update down and give it a whirl...

@PhunkyBob
Copy link

Thank you @askmike !
Updating 22fca69..d676a6e

I hope one day it would be possible to make market orders (they are filled faster).

@PhunkyBob
Copy link

It's weird.
This night the bot took a trade with amount not even near the expected value.

At 2018-09-22 22:39:13, the close was at 0.57303 and the strategy advised a long.
But the bot created the order at 0.57604.
At 2018-09-23 01:36:16, the close was at 0.57975 and the strategy advised a short.
But the bot created the order at 0.57355.

I expected from 0.57303 to 0.57975 (+1%) I had 0.57604 to 0.57355 (-0.5%).

Usually, when the strategy advised at a price, the order was created at this price. I don't say it's always filled, but at least it's created.
This time it was not even created at the correct price.

2018-09-22 22:38:13 (DEBUG):    Processing 98 new trades. From 2018-09-22 20:37:53 UTC to 2018-09-22 20:38:13 UTC. (a few seconds)
2018-09-22 22:38:33 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-22 22:38:34 (DEBUG):    Processing 40 new trades. From 2018-09-22 20:38:14 UTC to 2018-09-22 20:38:33 UTC. (a few seconds)
2018-09-22 22:38:53 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-22 22:38:54 (DEBUG):    Processing 87 new trades. From 2018-09-22 20:38:34 UTC to 2018-09-22 20:38:53 UTC. (a few seconds)
2018-09-22 22:39:13 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-22 22:39:13 (DEBUG):    Processing 68 new trades. From 2018-09-22 20:38:53 UTC to 2018-09-22 20:39:13 UTC. (a few seconds)
2018-09-22 22:39:13 (DEBUG):    -->long @ 0.57303
2018-09-22 22:39:13 (INFO):     Trader Received advice to go long. Buying  XRP
2018-09-22 22:39:13 (DEBUG):    Creating order to buy 193.32401236671723 XRP
2018-09-22T20:39:18.922Z 'sticky create' 'buy'
2018-09-22 22:39:18 (DEBUG):    [ORDER] statusChange: SUBMITTED
2018-09-22 22:39:19 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-22 22:39:22 (DEBUG):    [ORDER] statusChange: MOVING
2018-09-22 22:39:22 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-22 22:39:24 (DEBUG):    [ORDER] statusChange: MOVING
2018-09-22 22:39:25 (INFO):     [ORDER] partial buy fill, total filled: 193.3
2018-09-22 22:39:25 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-22 22:39:26 (INFO):     [ORDER] summary: { price: 0.57604,
  amount: 193.3,
  date: moment("2018-09-22T22:39:25.007"),
  side: 'buy',
  orders: 1,
  fees: { XRP: 0.1933 },
  feePercent: 0.1 }
2018-09-22 22:39:26 (DEBUG):    syncing private data
2018-09-22 22:39:33 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-22 22:39:33 (DEBUG):    Processing 56 new trades. From 2018-09-22 20:39:13 UTC to 2018-09-22 20:39:32 UTC. (a few seconds)
2018-09-22 22:39:53 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-22 22:39:54 (DEBUG):    Processing 22 new trades. From 2018-09-22 20:39:34 UTC to 2018-09-22 20:39:49 UTC. (a few seconds)
2018-09-22 22:40:13 (DEBUG):    Requested XRP/USDT trade data from Binance ...
.
.
.
2018-09-23 01:34:56 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:34:56 (DEBUG):    Processing 65 new trades. From 2018-09-22 23:34:36 UTC to 2018-09-22 23:34:56 UTC. (a few seconds)
2018-09-23 01:35:16 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:35:16 (DEBUG):    Processing 61 new trades. From 2018-09-22 23:34:56 UTC to 2018-09-22 23:35:16 UTC. (a few seconds)
2018-09-23 01:35:36 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:35:36 (DEBUG):    Processing 110 new trades. From 2018-09-22 23:35:17 UTC to 2018-09-22 23:35:36 UTC. (a few seconds)
2018-09-23 01:35:56 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:35:56 (DEBUG):    Processing 221 new trades. From 2018-09-22 23:35:36 UTC to 2018-09-22 23:35:56 UTC. (a few seconds)
2018-09-23 01:36:16 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:36:16 (DEBUG):    Processing 269 new trades. From 2018-09-22 23:35:56 UTC to 2018-09-22 23:36:16 UTC. (a few seconds)
2018-09-23 01:36:16 (DEBUG):    -->short @ 0.57975
2018-09-23 01:36:16 (INFO):     Trader Received advice to go short. Selling  XRP
2018-09-23 01:36:16 (DEBUG):    Creating order to sell 193.16716 XRP
(node:20767) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
2018-09-22T23:36:22.051Z 'sticky create' 'sell'
2018-09-23 01:36:22 (DEBUG):    [ORDER] statusChange: SUBMITTED
2018-09-23 01:36:22 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-23 01:36:24 (INFO):     [ORDER] partial sell fill, total filled: 193.1
2018-09-23 01:36:24 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-23 01:36:26 (INFO):     [ORDER] summary: { price: 0.57355,
  amount: 193.1,
  date: moment("2018-09-23T01:36:22.661"),
  side: 'sell',
  orders: 1,
  fees: { USDT: 0.11075251 },
  feePercent: 0.10000000000000002 }
2018-09-23 01:36:26 (DEBUG):    syncing private data
2018-09-23 01:36:36 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:36:37 (DEBUG):    Processing 156 new trades. From 2018-09-22 23:36:16 UTC to 2018-09-22 23:36:36 UTC. (a few seconds)
2018-09-23 01:36:56 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:36:56 (DEBUG):    Processing 100 new trades. From 2018-09-22 23:36:37 UTC to 2018-09-22 23:36:55 UTC. (a few seconds)
2018-09-23 01:37:16 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-23 01:37:16 (DEBUG):    Processing 71 new trades. From 2018-09-22 23:36:57 UTC to 2018-09-22 23:37:16 UTC. (a few seconds)
2018-09-23 01:37:36 (DEBUG):    Requested XRP/USDT trade data from Binance ...

@PhunkyBob
Copy link

Since the update, I have another problem:
#2556

@askmike
Copy link
Owner

askmike commented Sep 23, 2018

@PhunkyBob i answered that new issue. Thanks for putting your questions there instead of here so we can keep this on topic.

Regarding that, thanks for the logs. Would you be able to watch them and let me know once you either see the "No trades found" error or a message like Binance doesnt know this order, retrying up to 10 times.. (which is the new updated handling).

@PhunkyBob
Copy link

Would you be able to watch them and let me know once you either see the "No trades found" error or a message like Binance doesnt know this order, retrying up to 10 times.. (which is the new updated handling).

No problem.
Thank you for your work.

@askmike
Copy link
Owner

askmike commented Sep 30, 2018

@PhunkyBob @xbromy @rkingy is anyone still experiencing this on latest develop?

@PhunkyBob
Copy link

On my side: 30 trades without any problem, since.

@xbromy
Copy link
Author

xbromy commented Sep 30, 2018

Yes it's same on my end. Having two instances trading on binance different pairs. No problem so far..

@askmike
Copy link
Owner

askmike commented Sep 30, 2018

@PhunkyBob @xbromy do you guys have logs by any chance? Would you mind searching for "Binance doesnt know this order, retrying up to 10 times.."? I am logging that around the biggest change. If you guys have that in the logs I am confident this is fixed!

[unrelated]

@PhunkyBob to come back on your earlier point:

I hope one day it would be possible to make market orders (they are filled faster).

You are right in that they are instant, but market orders in small markets are super dangerous. I just uploaded a youtube video with examples where I explain the rational: https://youtu.be/r0yc1sonYvo?t=8m20s

@PhunkyBob
Copy link

2018-09-24 08:41:51 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-24 08:41:51 (DEBUG):    Processing 165 new trades. From 2018-09-24 06:41:31 UTC to 2018-09-24 06:41:51 UTC. (a few seconds)
2018-09-24 08:42:11 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-24 08:42:11 (DEBUG):    Processing 229 new trades. From 2018-09-24 06:41:51 UTC to 2018-09-24 06:42:11 UTC. (a few seconds)
2018-09-24 08:42:11 (INFO):     Trader Received advice to go long. Buying  XRP
2018-09-24 08:42:11 (DEBUG):    Creating order to buy 201.35568822043007 XRP
2018-09-24T06:42:17.002Z 'sticky create' 'buy'
2018-09-24 08:42:17 (DEBUG):    [ORDER] statusChange: SUBMITTED
2018-09-24 08:42:17 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-24T06:42:19.040Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-24T06:42:19.040Z 'Error -2013: Order does not exist.'
2018-09-24T06:42:20.306Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-24T06:42:20.306Z 'Error -2013: Order does not exist.'
2018-09-24T06:42:21.775Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-24T06:42:21.775Z 'Error -2013: Order does not exist.'
2018-09-24T06:42:23.484Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-24T06:42:23.484Z 'Error -2013: Order does not exist.'
2018-09-24T06:42:25.994Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-24T06:42:25.994Z 'Error -2013: Order does not exist.'
2018-09-24 08:42:28 (INFO):     [ORDER] partial buy fill, total filled: 201.3
2018-09-24 08:42:28 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-24 08:42:30 (INFO):     [ORDER] summary: { price: 0.55706,
  amount: 201.3,
  date: moment("2018-09-24T08:42:17.182"),
  side: 'buy',
  orders: 1,
  fees: { XRP: 0.2013 },
  feePercent: 0.1 }
2018-09-24 08:42:30 (DEBUG):    syncing private data
2018-09-24 08:42:31 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-24 08:42:31 (DEBUG):    Processing 325 new trades. From 2018-09-24 06:42:11 UTC to 2018-09-24 06:42:31 UTC. (a few seconds)
2018-09-24 08:42:51 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-24 08:42:51 (DEBUG):    Processing 161 new trades. From 2018-09-24 06:42:31 UTC to 2018-09-24 06:42:51 UTC. (a few seconds)
.
.
.
2018-09-25 20:09:44 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-25 20:09:44 (DEBUG):    Processing 65 new trades. From 2018-09-25 18:09:25 UTC to 2018-09-25 18:09:44 UTC. (a few seconds)
2018-09-25 20:10:04 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-25 20:10:04 (DEBUG):    Processing 139 new trades. From 2018-09-25 18:09:44 UTC to 2018-09-25 18:10:04 UTC. (a few seconds)
2018-09-25 20:10:04 (INFO):     Trader Received advice to go long. Buying  XRP
2018-09-25 20:10:04 (DEBUG):    Creating order to buy 222.97317996142976 XRP
2018-09-25T18:10:09.980Z 'sticky create' 'buy'
2018-09-25 20:10:09 (DEBUG):    [ORDER] statusChange: SUBMITTED
2018-09-25 20:10:10 (DEBUG):    [ORDER] statusChange: OPEN
2018-09-25T18:10:12.076Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-25T18:10:12.076Z 'Error -2013: Order does not exist.'
2018-09-25T18:10:13.452Z 'Binance doesnt know this order, retrying up to 10 times..'
2018-09-25T18:10:13.452Z 'Error -2013: Order does not exist.'
2018-09-25 20:10:14 (INFO):     [ORDER] partial buy fill, total filled: 222.9
2018-09-25 20:10:14 (DEBUG):    [ORDER] statusChange: FILLED
2018-09-25 20:10:17 (INFO):     [ORDER] summary: { price: 0.44517799910273664,
  amount: 222.9,
  date: moment("2018-09-25T20:10:10.178"),
  side: 'buy',
  orders: 1,
  fees: { XRP: 0.2229 },
  feePercent: 0.1 }
2018-09-25 20:10:17 (DEBUG):    syncing private data
2018-09-25 20:10:24 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-25 20:10:25 (DEBUG):    Processing 149 new trades. From 2018-09-25 18:10:05 UTC to 2018-09-25 18:10:24 UTC. (a few seconds)
2018-09-25 20:10:44 (DEBUG):    Requested XRP/USDT trade data from Binance ...
2018-09-25 20:10:45 (DEBUG):    Processing 108 new trades. From 2018-09-25 18:10:24 UTC to 2018-09-25 18:10:45 UTC. (a few seconds)
2018-09-25 20:11:04 (DEBUG):    Requested XRP/USDT trade data from Binance ...

@PhunkyBob
Copy link

I hope one day it would be possible to make market orders (they are filled faster).

You are right in that they are instant, but market orders in small markets are super dangerous. I just uploaded a youtube video with examples where I explain the rational: https://youtu.be/r0yc1sonYvo?t=8m20s

I agree with your analysis.
I don't say "it'ld be nice to replace limit orders by market orders", but "it'ld be nice to have the choice between limit order and market orders". It would be a decision made by the owner of the strategy. It's up to him to know the market he is dealing with.

You say the strategy with Gekko should be to predict price movement and target 5/10% profit.
I'm using Gekko on 1 minute ticks and I'm targeting lots of trades with 1% profit. Sometimes it works like a charm ;)

@askmike
Copy link
Owner

askmike commented Sep 30, 2018 via email

@askmike
Copy link
Owner

askmike commented Sep 30, 2018

@PhunkyBob thanks a lot for those logs! It seems the commits have completely fixed this problem. the logs clearly show the new retry mechanism kicking in and catching the order, preventing the "trades not found error".

If anyone still experiences this bug:

  • Make sure you run the latest develop
  • Open a new issue and post debug logs

About the market orders: let's move the discussion to this thread: https://forum.gekko.wizb.it/thread-57699.html

@askmike askmike closed this as completed Sep 30, 2018
@rkingy
Copy link
Contributor

rkingy commented Sep 30, 2018

Yip no further issues from my end. Thanks for the fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants