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

TypeError: body.map is not a function #184

Closed
charlesastwood opened this issue May 23, 2017 · 6 comments
Closed

TypeError: body.map is not a function #184

charlesastwood opened this issue May 23, 2017 · 6 comments
Labels

Comments

@charlesastwood
Copy link

Running latest v4 from master.

Getting the following on Poloniex post sell:

TypeError: body.map is not a function
at /var/bot/zenbot/extensions/poloniex/exchange.js:77:27
at Request._callback (/var/bot/zenbot/node_modules/poloniex.js/lib/poloniex.js:79:7)
at Request.self.callback (/var/bot/zenbot/node_modules/poloniex.js/node_modules/request/request.js:122:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request. (/var/bot/zenbot/node_modules/poloniex.js/node_modules/request/request.js:888:14) at emitOne (events.js:82:20) at Request.emit (events.js:169:7) at IncomingMessage. (/var/bot/zenbot/node_modules/poloniex.js/node_modules/request/request.js:839:12) at emitNone (events.js:72:20)

Also getting the same error trying to back fill although this was working a few days ago

@charlesastwood charlesastwood changed the title Bot 4 on Poloniex TypeError: body.map is not a function May 23, 2017
@talvasconcelos
Copy link
Contributor

Have you solved this? i got the same error for backfill

@GhostPunk
Copy link

I got the same.

@carlos8f
Copy link
Contributor

I can't reproduce, but since this is in getTrades() public api, it might be that you're reaching the dreaded 6-api calls per second ban. Added a console debug and retry in v4.0.4, so it will no longer crash, and we can see what kind of response caused the error.

@GhostPunk
Copy link

The problem was that USDT-BTC is not a valid pair it seems like, BTC-USDT is. However USDT-BTC is in the list-selectors output.

:~/zenbot$ zenbot backfill poloniex.USDT-BTC --days 14
getTrades odd result:
{ error: 'Invalid currency pair.' }

@DeviaVir
Copy link
Owner

DeviaVir commented Jun 3, 2017

@GhostPunk USDT-BTC is not a selector:

$ ./zenbot.sh list-selectors | grep poloniex | grep USD | grep BTC
  poloniex.BTC-USDT   (Bitcoin/Tether USD)

@DeviaVir DeviaVir added the bug label Jun 3, 2017
@DeviaVir
Copy link
Owner

Closing due to inactivity, and I haven't seen this pop up anymore since.

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

No branches or pull requests

5 participants