Run on cloud service

This guide shows steps to run the tool on a cloud service for mainnet with docker.

This tool can be hosted on any cloud platform which supports Node.js or Docker.

One caveat is that platforms using ephemeral filesystem(ex. Heroku and Digital Ocean App) are not suitable because this tool stores JSON data and export CSV files.

In this guide, we host on Render.com which is not expensive and friendly for non-developer. With Render.com, We can setup our server without touching Terminal and Editor

  1. Sign up or Sign in at https://render.com/

  2. Select "New Web Service"

3. Input https://github.com/junta/tradingview-alert-connector to search field and press Enter

You can use forked repository from the original source code if you want.

4. Setup web service as follows

If you set up for dYdX, please select one of the regions except for Oregon(US West) at the region field, because dYdX has location restrictions for United States.

  • In terms of plans, we need at least Starter plan($7/month) so that we can add Disk. (Enter payment information if it is not yet)

  • Click "Advanced" accordion and click "Add Secret File" and input as follows

Filename: .env

File Contents: paste environment variables that you created in this guide but values must be replaced with mainnet ones.

Copy and paste the below code and fill in your values.

Environment Variables

Required Variables

  • dydx v3

ETH_ADDRESS=
STARK_PUBLIC_KEY=
STARK_PRIVATE_KEY=
API_KEY=
API_PASSPHRASE=
API_SECRET=
  • dYdX v4

DYDX_V4_MNEMONIC=

  • Perpetual Protocol

PERPETUAL_PRIVATE_KEY=
  • GMX v2

GMX_PRIVATE_KEY=
GMX_LEVERAGE=

Optional Variables(common for all exchanges)

TRADINGVIEW_PASSPHRASE=
SENTRY_DNS=

  • Click "Add Disk" and input as follows

Name: any string you want

Mount Path: /app/data

Size: 1GB is enough

At the Auto deploy field, if we set it to yes, render.com automatically deploys changes to your service when I or someone push to this Github repository. I recommend setting them to No because it’s safer and we can also deploy manually

  • Leave other fields as default and click "Create Web Service"

5. Automatically start deployment and wait until it's done

6. After deployment is done, click your endpoint URL

If you see a status message of your set up on your browser, the server is running properly.

Use this endpoint as Webhook URL when you set strategy alert on Tradingiview.

7. Go to this guide to set strategy alerts on Tradingview

In addition, we highly recommend setting up two-factor authentication on Render.com

Running on other Docker hosting services

Dockerfile and docker-compose.yml are included in the source code.

So just start up by

docker-compose build
docker-compose up -d

Last updated