DeviaVir / zenbot

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

Feedback scripts #37

Closed grigio closed 7 years ago

grigio commented 8 years ago

Sorry @carlos8f , I read the docs about the "new scripts organization" but i'm more confused now..

I run with an empty db: sh reducer.sh and in another terminal sh run-xxbt-zusd.sh (just changed the currencies ids inside)

// watch these exchanges
c.watch_exchanges = [
  //"bitfinex",
  //"gdax",
  "kraken",
  //"poloniex"
08/23/2016 04:57:17 PM CEST [      kraken]    m24430349    1000 trades. 06/13/2016 02:29:21 PM CEST  BUY       488.105 at       688.814 XXBT/ZUSD
08/23/2016 04:57:19 PM CEST [      trader] Begin simulation for kraken.XXBT-ZUSD. --Zen <-- WHY?
08/23/2016 04:57:19 PM CEST [      trader] RSI:62 trend: undefined -> null
08/23/2016 04:57:19 PM CEST [      trader] skipping historical tick zb:m24532736
carlos8f commented 8 years ago

"begin simulation" is a new message I added to default_logic.js which means that there's no GDAX key or authenticated client running:

if (get('command') !== 'run' || !c.gdax_key) { ... trigger "begin simulation" message

You'll get this even with the run command, which is a little confusing, but it just means that no real trades will go through and zenbot is acting like a trade advisor only. In 3.5.8 (just published) I changed this message to "No trader API key provided. Starting in advisor mode for {selector}"

"skipping historical tick" is a bug that just got fixed with the latest update.

It's seems that the gdax functions are loaded even if I have enabled only the kraken exchange (ex-plugin) in config.js

That's true, plugins are all loaded now, and utils.get_products is what controls which exchanges to map (via c.watch_exchanges). Some bugs might result and I'll try to fix them as they come up.

Is possible to run/include all the mandatory scripts in a single terminal?

Yes,

./zenbot launch map reduce run server --config config_btc_usd.js

In 3.5.8 I re-added run.sh which just does the above command. Updated readme with single-pair and multi-pair examples.

grigio commented 8 years ago

Thanks for the clarification :)

I know there are still some differences from exchange to exchange (ex. currencies naming), but is possible to make default_logic.js gdax-indipendent?

at least something like this:

// var client = null // no real exchange API mode
var client = new GdaxConnector( {secret: 'wertyui2345678'} )
//var client = new KrakenConnector( {secret: 'bla1234567'} )

if (get('command') !== 'run' || !client {
...

instead of checking multiple times c.gdax_key in the logic

Another topic, is possible to specify the zenbot secret in the config or via arguments? (instead of regenerate it at every restart)

carlos8f commented 8 years ago

is possible to make default_logic.js gdax-indipendent?

yes I'm going to work on that next!

Another topic, is possible to specify the zenbot secret in the config or via arguments? (instead of regenerate it at every restart)

I will add support for that.

carlos8f commented 7 years ago

Zenbot 4 is out, so I'm cleaning up 3.x issues. Please use and test 4, thanks!