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

Endless retry in cancelOrder Binance exchange action #1120

Closed
Haehnchen opened this issue Jan 13, 2018 · 1 comment · Fixed by #1122
Closed

Endless retry in cancelOrder Binance exchange action #1120

Haehnchen opened this issue Jan 13, 2018 · 1 comment · Fixed by #1122
Labels

Comments

@Haehnchen
Copy link
Contributor

Simular to #1096 cancelOrder is in endless retry mode. We have missing error code extraction from response

    cancelOrder: function (opts, cb) {
      var func_args = [].slice.call(arguments)
      var client = authedClient()
      client.cancelOrder(opts.order_id, joinProduct(opts.product_id)).then(function (body) {
        if (body && (body.message === 'Order already done' || body.message === 'order not found')) return cb()
        cb(null)
      },function(err){
        if (err) return retry('cancelOrder', func_args, err)
        cb()
      })
    },

Binance API is down! unable to call cancelOrder, retrying in 20s
{ Error: binance {"code":-2011,"msg":"UNKNOWN_ORDER"}
at binance.handleErrors (/root/zenbot/node_modules/ccxt/js/binance.js:805:27)
at response.text.then.text (/root/zenbot/node_modules/ccxt/js/base/Exchange.js:443:18)
at
at process._tickCallback (internal/process/next_tick.js:188:7) constructor: [Function: OrderNotFound] }
[ { order_id: 'xxx', product_id: 'xxx-xxx' } ]

@Haehnchen Haehnchen changed the title Endless retry in cancelOrder Binance exchange Endless retry in cancelOrder Binance exchange action Jan 13, 2018
@DeviaVir DeviaVir added the bug label Jan 13, 2018
Haehnchen added a commit to Haehnchen/zenbot that referenced this issue Jan 13, 2018
DeviaVir pushed a commit that referenced this issue Jan 14, 2018
@didasy
Copy link

didasy commented Jan 22, 2018

I still got this error on unstable branch.

Binance API is down! unable to call cancelOrder, retrying in 20s
{ Error: binance {"code":-2011,"msg":"UNKNOWN_ORDER"}
    at binance.handleErrors (/home/dida/zenbot-master/node_modules/ccxt/js/binance.js:847:27)
    at response.text.then.text (/home/dida/zenbot-master/node_modules/ccxt/js/base/Exchange.js:452:18)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) constructor: [Function: OrderNotFound] }
[ { order_id: '5925930', product_id: 'VEN-ETH' } ]

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

Successfully merging a pull request may close this issue.

3 participants