-- Prerequisites
-- Installation
npm install -g gulp
npm install
to install all dependent npm libraries.gulp deploy
to compile the source code.
This will compile the code to dist
folder in your project root directory.gulp deploy-client
.
Similarly if you change only server code you can run gulp deploy-server
commands.
The command gulp deploy
compiles both server and client code.-- Deployment and Configuration
C:\algo-trade\
config
folder from the project path (Ex: D:\sdoosa-algo-trade-app\src\config
) to C:\algo-trade\
folder.C:\algo-trade\config\
. C:\algo-trade\config\
which are used by the algo app.
They are users.json
, config.json
, strategies.json
and holidays.json
users.json
file to configure your username and password to login to the app.
Note: These are just for app login not broker login credentials.config.json
and configure the port number on which you would like to run the algo trade app.
Default port used is 8080
. You need to set enableSSL
to true
when you deploy the app on public domain. Because brokers
do not accept your public domain with just http
. They expect your server to support https
. So when you deploy on cloud
the redirect URL you configure starts with https
instead of http
. Brokers support http
only with localhost
if you are
running the app on your local machine instead of cloud.enableSSL
to true
the app expects the server.key
and server.cert
files to be present in the folder C:\algo-trade\ssl-cert\
.
Please do search on google how to generate self certified SSL certificate and key and then create the above files
server.cert
and server.key
and put the in the mentioned folder.
You can skip this step if you are running the app on your machine locally. This is needed only when you deploy the app on cloud.strategies.json
file and configure the parameters for execution of strategy as per the provided details in this file.
Each strategy that you are going to develop should have an entry in this file. holidays.json
if necessary.
Ideally this should be updated once in a year by getting all trading holidays list from your broker.-- Starting Server
D:\sdoosa-algo-trade-app\
)gulp server
to start the appapp started and listening on port 8080/8443
without any errors.http://localhost:8080
in new tab/window.users.json
in above section)Login to {broker name}
to sign in to your broker.
This will redirect you to broker authentication page. Login with with your client credentials of the corresponding broker
and accept T&C if any then you will be redirected to algo trade app page.Start Algo..
button to start the algo on your app.