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

Add most of missing npm packages #315

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

bugron
Copy link
Contributor

@bugron bugron commented Jun 8, 2016

okcoincn is required in exchanges\okcoin.js but doesn't even exist in npm registry.
npm couldn't install node-xmpp, it recommends to use node-xmpp-client / node-xmpp-server / node-xmpp-component instead.
talib package failed to install because of my not supported OS (Windows, obviously).

@askmike
Copy link
Owner

askmike commented Jun 8, 2016

As for exchanges:

  • mtgox-apiv2 - I only want to leave the code there for historical purposes (maybe I should comment it out completely?). Mt. Gox was the biggest exchange but has been bankrupt / down since 2014. So loading the API wrapper doesn't do anything.
  • mexbt: see #288
  • okcoin: I just found this code in one of the forks and it looks like it was usable. I have configured Gekko so that as soon as someone tries to enable okcoin (which isn't documented anyway) Gekko will log this message. I also couldn't find the right npm dependency straight away, but as soon as we do we can test this existing code.

bitx & btcchina indeed need to be added.

As for plugins:

Gekko uses a custom way of handling dependencies for plugins. Plugins are very easy to add and leightweight, however their dependencies might not be (for example talib or redis on windows). Therefor Gekko uses a custom way of checking for the existence of these dependencies. The idea of plugins is that they can be enabled/disabled easily and core does not depend on any. If you are missing dependencies for a plugin that you have enabled in the config Gekko will tell you like so:

2016-06-08 09:20:57 (INFO): Gekko v0.2.0 started
2016-06-08 09:20:57 (INFO): I'm gonna make you rich, Bud Fox. 


2016-06-08 09:20:57 (INFO): Setting up Gekko in realtime mode
2016-06-08 09:20:57 (INFO): 
2016-06-08 09:20:57 (INFO): Setting up:
2016-06-08 09:20:57 (INFO):    SQLite Datastore
2016-06-08 09:20:57 (INFO):    Store candles, trades and advices in a SQLite database

 The plugin sqliteWriter expects the module sqlite3 to be installed. However it is not, install it by running: 

  npm install sqlite3@3.1.3 

@bugron
Copy link
Contributor Author

bugron commented Jun 8, 2016

i didn't know about that custom handler, nice. btcchina actually was there, npm just sorted the list.
Amended this commit, removed mexbt and mtgox-apiv2.
And I think it's safe to remove all outdated code entirely because it's going to be in git history anyways.

@askmike
Copy link
Owner

askmike commented Jun 8, 2016

i didn't know about that custom handler, nice.

Thanks, so to be clear that means I rather not put all plugin dependencies (irc, mailjs, math-js, redis, etc.) in package.json. When running npm install in the gekko directory I rather have it only install dependencies for:

  • Gekko core
  • Plugins that are enabled on default (sqlite, etc)

@bugron
Copy link
Contributor Author

bugron commented Jun 8, 2016

OK, honestly that custom handler is unusual for me (great idea, though), I prefer to install all deps at once to be able to use them whenever I want.
Amended one more time, only adds bitx.

@askmike
Copy link
Owner

askmike commented Jun 8, 2016

You really don't want all dependencies for all possible Gekko plugins: If you are unable to install one of them correctly (like #288) afraid what went wrong where and what the implications are. I also want Gekko to have windows support (without requiring Visual Studio), but plugins like redis and TA-lib definitely need to be possible for everyone else.

The proper way to do this is to require plugins to be created as sub projects (on npm as gekko-talib-trader or on github). But that raises the bar for adding/configuring/downloading a plugin. Right now it's just a simple script in the plugins folder (that followes this API).

@askmike askmike merged commit c2ac5c9 into askmike:0.2 Jun 8, 2016
@bugron bugron deleted the fix/add-missing-packages branch June 8, 2016 20:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants