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

Not all exchanges are available when hosting on heroku #2389

Closed
pasha-shestakov opened this issue Jul 31, 2018 · 12 comments
Closed

Not all exchanges are available when hosting on heroku #2389

pasha-shestakov opened this issue Jul 31, 2018 · 12 comments

Comments

@pasha-shestakov
Copy link

pasha-shestakov commented Jul 31, 2018

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ...
[x] bug report
[ ] question about the decisions made in the repository

Action taken (what you did)
Running gekko on heroku server, without ssl certs or reverse proxy setup.

Expected result (what you hoped would happen)
I expected it to work the same as localhost

Actual result (unexpected outcome)
The only exchanges that are available are: poloniex, kraken, coinfalcon, bitx, and Debug Exchange simulator.
Additionally, i get an error related to websocket, "Websocket is closed before the connection is established".

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

My config.js is an exact copy of the sample config, and my UIconfig.js is as follows.
Liver heroku app here: https://gekkoappapollo.herokuapp.com/#/home

`
const CONFIG = {
headless: true,
api: {
host: '0.0.0.0',
port:
typeof process !== 'undefined' &&
process !== undefined &&
process.env.PORT
? process.env.PORT
: 8080,
timeout: 120000, // 2 minutes
},
ui: {
ssl: true,
host: 'gekkoappapollo.herokuapp.com',
port: '443',
path: '/',
},
adapter: 'sqlite',
};

if (typeof window === 'undefined') module.exports = CONFIG;
else window.CONFIG = CONFIG;
`

@askmike
Copy link
Owner

askmike commented Jul 31, 2018

Unfortunately that is the case in the current version. We went through a big update and it requires rewritten exchange wrapper files. See here: https://gekko.wizb.it/docs/introduction/supported_exchanges.html

You can run an older version of Gekko (pre 0.6) to have all of them, not really recommended though.

Closing this as it's not a bug. But I am wondering: what exchange did you want to use?

@askmike askmike closed this as completed Jul 31, 2018
@pasha-shestakov
Copy link
Author

@askmike I am not so sure this is the case. For example binance, gdax, bitfinex should all be supported, but none of those appear on the UI, or at api/exchanges.

@askmike
Copy link
Owner

askmike commented Aug 1, 2018

Ah you are right. Can you try reinstalling gekko broker dependencies? And if there is any error post it there?

@askmike askmike reopened this Aug 1, 2018
@askmike
Copy link
Owner

askmike commented Aug 1, 2018

Also, please post the output of node gekko --version.

@pasha-shestakov
Copy link
Author

Hi mike, thanks for reopening. This is the output of the npm install in exchange dir:

audited 457 packages in 1.831s found 11 vulnerabilities (9 moderate, 2 high) run npm audit fixto fix them, ornpm audit for details

and node gekko --version:

Gekko version: v0.6.3
Nodejs version: v10.7.0

@askmike
Copy link
Owner

askmike commented Aug 1, 2018 via email

@pasha-shestakov
Copy link
Author

It runs with no errors, but it is watching poloniex. I believe this was default from the original repo, but i can change it/ make sure its original.

@pasha-shestakov
Copy link
Author

I changed config.watch to binance, and this is the output:

`2018-08-01 05:00:01 (INFO): Setting up Gekko in realtime mode
2018-08-01 05:00:01 (INFO):
2018-08-01 05:00:01 (INFO): Setting up:
2018-08-01 05:00:01 (INFO): Candle writer
2018-08-01 05:00:01 (INFO): Store candles in a database
2018-08-01 05:00:01 (INFO):

2018-08-01 05:00:01 (INFO): Setting up:
2018-08-01 05:00:01 (INFO): Trading Advisor
2018-08-01 05:00:01 (INFO): Calculate trading advice
2018-08-01 05:00:02 (INFO): Using the strategy: MACD

Gekko encountered an error and can't continue

Error:

Cannot find module './private-key'

Meta debug info:

Gekko version: v0.6.3
Nodejs version: v10.7.0
`

@askmike
Copy link
Owner

askmike commented Aug 1, 2018 via email

@pasha-shestakov
Copy link
Author

@askmike Looks like i have resolved the issue, thanks to your help. For whatever reason, installing node modules with npm didn't work correctly on heroku, so my solution to this was install the node modules locally, and push them to heroku. I removed <node_modules> from the .gitignore, but not <private-*.js/toml> which explains the error that the sample config revealed. Thanks again.

@Jaquedeveloper
Copy link

@pasha-shestakov how did you managed to host the app with the ui at Heroku? I can only have the app there running without the ui and have no access to the API... I am working on writing another UI, so I don't really need access to this UI but I need to have access to the API data and seems like I can't without the UI. What did you do to make it work? Thanks in advance and congrats, I am doing research for a while and some devs here tried and seems that you are the only one who succeeded with it... I've tried to combine info from here, #758 and #338. No success, though...

@pasha-shestakov
Copy link
Author

@Jaquedeveloper Hi, I don't remember the specifics as this was quite awhile ago. Getting it working on Heroku was standard, other than dealing the npm dependencies yourself. If you don't need the UI, you can use the gekko server api?

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

No branches or pull requests

3 participants