DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.24k stars 2.04k forks source link

Bitstamp trade does not work #917

Open shprink opened 6 years ago

shprink commented 6 years ago

System information

MacOS, on Docker with a brand new clone of this project

Describe the problem

trade command does not seem to work on bitstamp. API key/secret are ok but it stay stuck at this:

1970-01-01 00:00:01  0.00000000 ETH-EUR  0 0.00000100 ETH  5.98 EUR   +0.00%    NaN%
c.selector = 'bitstamp.ETH-EUR'

Source code / logs

$ docker-compose exec server zenbot trade
Pusher : You should always specify a cluster when connecting. See: https://pusher.com/docs/javascript_quick_start
Pusher : You should always specify a cluster when connecting. See: https://pusher.com/docs/javascript_quick_start
fetching pre-roll data:
api running on 172.17.0.2:20021/trades
Pusher : You should always specify a cluster when connecting. See: https://pusher.com/docs/javascript_quick_start
Pusher : You should always specify a cluster when connecting. See: https://pusher.com/docs/javascript_quick_start
cannot backfill bitstamp.ETH-EUR: exchange does not offer historical data
               DATE            PRICE     DIFF            VOL         RSI                         ACTIONS                      BAL                PROFIT
---------------------------- STARTING LIVE TRADING ----------------------------
Press  l  to list available commands.
1970-01-01 00:00:01  0.00000000 ETH-EUR  0  0.00000100 ETH  5.98 EUR   +0.00%    NaN%
tiagosiebler commented 6 years ago

Did you set the client_id value too? Are you sure it matches the customer ID in your account? https://github.com/carlos8f/zenbot/blob/master/docs/exchanges/bitstamp.md

I saw this happen when I put the wrong number in client_id in the conf.js.

shprink commented 6 years ago

Yep 5.98 EUR is the real amount in my account

tiagosiebler commented 6 years ago

Turns out I've seen this exact thing this evening, only on fresh launch. I think it's because bitstamp can't backfill data (since their API doesn't provide historic trades). If I leave it for a period, or kill and relaunch, it seems to appear again.

shprink commented 6 years ago

how long should I let it alive? I tried like an hour, but nothing happened

tiagosiebler commented 6 years ago

I just killed and relaunched zenbot and the connection worked. Still having this issue? What period are you using?

ckeriguy commented 6 years ago

I am having the same issue, bitstamp trade and bitstamp sim do not perform any actions. I tested with the following which failed bitstamp.BTC-EUR while the same trade/sim commands using for example gdax.BTC-EUR works normally. The connection appears to be correct with bitstamp API because I receive the correct balance values. My DB has now several days of logs, and killing the process doesnt seem to change anything, it sill cannot make a real trade or even a sim trade.

Anyone has an idea?

chehcore commented 6 years ago

I seem to have the a similar problem as ckeriguy. I've also ran paper trade with selector provided as a parameter and left it running over night, but no trades.

I'm running dema on bitstamp.ETH-USD 5m candles EMA short = 3 EMA long = 6

The difference is, I don't even get the right balance from the exchange. I did provide key, secret and client_id to conf.jh, though.

Help anyone?

vea45 commented 6 years ago

My Zenbot also can't perform any operation on the account... Event the trade movements aren't updated on the screen but those are saved on the database.

vithonch commented 6 years ago

the same issue