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

Poloniex cancelfix crashes #2386

Closed
askmike opened this issue Jul 30, 2018 · 0 comments
Closed

Poloniex cancelfix crashes #2386

askmike opened this issue Jul 30, 2018 · 0 comments

Comments

@askmike
Copy link
Owner

askmike commented Jul 30, 2018

I have been battling a very strange and hard to come by error on poloniex:

  • Gekko Broker cancels an order
  • Poloniex responds with a timeout error, meaning that the cancel might have been processed, or it might not have been.
  • Gekko fetches recent orders to see if the order is still open.
  • if still open: it wasn't processed, trigger a retry.
  • if it's NOT: it was cancelled, great! Gekko Broker now expects to know whether there were partial fills up until the cancel got processed. use getOrder to figure this out.

This latest NOT step only happens rarely (roughly once every 1,036,800 cancel calls on the market I am trading with my current server) so debugging is hard. But it just happened with:

2018-07-29T05:19:23.984Z '[CANCELFIX] process cancel response'
[CANCELFIX] rechecking fill
timers.js:379
    throw new ERR_INVALID_CALLBACK();
    ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at setTimeout (timers.js:379:11)
    at getOpenOrders (/root/gb/wrappers/poloniex.js:134:15)
    at checkFn (/root/gb/exchangeUtils.js:23:16)
    at /root/gb/node_modules/lodash/lodash.js:10050:25
    at /root/gb/wrappers/poloniex.js:173:12
    at Request._callback (/root/gb/node_modules/poloniex.js/lib/poloniex.js:80:7)
    at Request.self.callback (/root/gb/node_modules/poloniex.js/node_modules/request/request.js:122:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (/root/gb/node_modules/poloniex.js/node_modules/request/request.js:888:14)
    at Request.emit (events.js:187:15)
askmike added a commit that referenced this issue Aug 5, 2018
askmike added a commit that referenced this issue Aug 10, 2018
* [docs] install indicator libs without updating package.json

* add tulip example strat configs, see #2341

* uppercase default macd strat

* temp revert bfx dep to main repo (fixes importer)

* binance set default fee as percentage

* rename bitx to luno (#2352)

* v0.6 support for bitx (aka Luno)

* v0.6 support for bitx (aka Luno)

* remove log

* move dependency to gb

* rename bitx to luno

* rename bitx to luno

* make sure we pass amount as positive value

* make sure we overlap when importing trades

* rm 500 as retryable error, see #2354

* only try to set fee when live trading, see #2358

* make gekko pic path relative

* make select arrow path relative

* Fix method name for stratNotification event

* make sure we parse both TS (backtest) & moment strings (live)

* make sure GB throws errors

* only render warmup warning when there is required history

* v0.6.4

* fix plugin event wire warning

* check portfolio data before calculating report (#2369)

* Changed several log messages from debug to warn (#2374)

Changed "Not creating order" message and "exchange did not provide fee info" from debug to warn messages so users can see these issues even when debug is set to false.

* make sure we pass on exchange error (#2379)

* fix backtest result exporter in standalone mode (#2382)

* make sure to pass order id in cancel edge flow, fix #2386 (#2387)

* Emit trade and trade errors via Telegram (#2385)

* Emit trade and trade errors via Telegram

* Added semi-colons

Added missing semi-colons in processTradeCompleted and processTradeErrored methods.

* Register methods only if set to true in config

* catch undefined CPU cores on ARM (#2391)

* export portfolio values as part of stratCandles (#2402)

* rm space in backtest export file location

* [GB/Binance] retry on 403 (#2404)

* completely disable broken limit order for now, fix #2398

* rewire cancelfix cb, see #2386

* remove slack dependency that is triggering warnings (#2408)

* move slack plugin dep out of main repo

* remove twitter & pushbullet plugin dependencies from main repo (#2409)

* move slack dependency out of main repo

* rm slack dep from main repo

* also remove pushbullet & twitter deps from main repo

* use forked bittrex dep with updated dependencies (#2410)

* use bittrex fork with updated deps

* [GB] introduce optimizedConnection flag in binance

* [GB] catch strange networking error

* update binance market files, see #2406

* [GB] point to supported_exchanges doc

* [GB] add example usage, fix #2414

* assume CF maintainance to be recoverable, fix #2407

* use npm version of of forked bittrex dep

* catch gb init errors

* [sqlite] wait for 10 seconds on busy

* throw errors, not strings

* [GB] update bfx & cf markets

* Update Luno (#2417)

* v0.6 support for bitx (aka Luno)

* v0.6 support for bitx (aka Luno)

* remove log

* move dependency to gb

* rename bitx to luno

* rename bitx to luno

* temp fix simultaneous advice error

* - re-add logging
- Retry insufficient balance due to server update delay
- Enhanced getPorfolio
- getOrder now return fees

* update

* update

* update

* revert 4b5d09f

* v.0.6.5
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

1 participant