01-16-2019, 07:21 PM
In case of kraken the rejected error are not the result of hitting the API call rate limit, the kraken docu is not clear, but your assumption was correct. I forced to hit the limit by removing the orderbook movement delays:
2019-01-16 17:51:31 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:32 (DEBUG): [ORDER] statusChange: MOVING
2019-01-16T16:51:34.483Z 'Order:Rate limit exceeded'
2019-01-16T16:51:38.955Z 'Order:Rate limit exceeded'
2019-01-16 17:51:43 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:44 (DEBUG): [ORDER] statusChange: MOVING
2019-01-16T16:51:45.952Z 'Order:Rate limit exceeded'
2019-01-16T16:51:49.825Z 'Order:Rate limit exceeded'
2019-01-16 17:51:49 (DEBUG): Requested ETH/EUR trade data from Kraken ...
2019-01-16 17:51:50 (DEBUG): Processing 1 new trades. From 2019-01-16 16:51:41 UTC to 2019-01-16 16:51:41 UTC. (a few seconds). Last price: 106.61
2019-01-16 17:51:53 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:54 (INFO): [ORDER] partial sell fill, total filled: 0.09909065
2019-01-16 17:51:54 (DEBUG): [ORDER] statusChange: FILLED
2019-01-16 17:51:55 (INFO): [ORDER] summary: { price: 106.65000000000002,
amount: 0.09909065,
date: moment("2019-01-16T17:51:53.970"),
side: 'sell',
orders: 1,
feePercent: 0.16 }
It is hitting the rate limit but gets finally executed later on without throwing any rejected error.
It is hard to test here, but the silent exit in any case of a rejection error leaves the possible trouble of missing a proper sell. So I added a little retry loop to force a new createOrder in case of a rejection, 3 attempts with one minute delay in between. Maybe you can test with your coinbase pro if it needs further tweaks or is able to solve your sell problem? Just commited into my repo. I remember you had a prob with my telegram bot also to use the portfolio function. I am working on a heavily improved telegram bot version, not ready yet to release, but I have backported and commited the portfolio fix - it happend while gekko is in history warmup state.
2019-01-16 17:51:31 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:32 (DEBUG): [ORDER] statusChange: MOVING
2019-01-16T16:51:34.483Z 'Order:Rate limit exceeded'
2019-01-16T16:51:38.955Z 'Order:Rate limit exceeded'
2019-01-16 17:51:43 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:44 (DEBUG): [ORDER] statusChange: MOVING
2019-01-16T16:51:45.952Z 'Order:Rate limit exceeded'
2019-01-16T16:51:49.825Z 'Order:Rate limit exceeded'
2019-01-16 17:51:49 (DEBUG): Requested ETH/EUR trade data from Kraken ...
2019-01-16 17:51:50 (DEBUG): Processing 1 new trades. From 2019-01-16 16:51:41 UTC to 2019-01-16 16:51:41 UTC. (a few seconds). Last price: 106.61
2019-01-16 17:51:53 (DEBUG): [ORDER] statusChange: OPEN
2019-01-16 17:51:54 (INFO): [ORDER] partial sell fill, total filled: 0.09909065
2019-01-16 17:51:54 (DEBUG): [ORDER] statusChange: FILLED
2019-01-16 17:51:55 (INFO): [ORDER] summary: { price: 106.65000000000002,
amount: 0.09909065,
date: moment("2019-01-16T17:51:53.970"),
side: 'sell',
orders: 1,
feePercent: 0.16 }
It is hitting the rate limit but gets finally executed later on without throwing any rejected error.
It is hard to test here, but the silent exit in any case of a rejection error leaves the possible trouble of missing a proper sell. So I added a little retry loop to force a new createOrder in case of a rejection, 3 attempts with one minute delay in between. Maybe you can test with your coinbase pro if it needs further tweaks or is able to solve your sell problem? Just commited into my repo. I remember you had a prob with my telegram bot also to use the portfolio function. I am working on a heavily improved telegram bot version, not ready yet to release, but I have backported and commited the portfolio fix - it happend while gekko is in history warmup state.