Tradingview Alert Connector
  • Overview
  • What is Tradingview Strategy
  • Setup
    • Run on local PC
    • Run on cloud service
    • Test Tradingview strategy alert
    • Set Tradingview strategy alert
    • How to get dYdX v3 Credentials
    • GMX Setup
    • dYdX v4 Setup
    • Bluefin Setup
    • Add Sentry.io monitoring
    • FAQ
  • Additional Usage
    • Execute order from non-strategy alert
    • Run DCA bot
Powered by GitBook
On this page
  • Prerequisites of this guide
  • Steps
  1. Setup

Run on local PC

This guide shows steps to run the tool on your local.

PreviousWhat is Tradingview StrategyNextRun on cloud service

Last updated 11 months ago

*You can skip this part and go to Run on cloud service if you don't need to test on your local PC.

Prerequisites of this guide

  • Node.js v16.13.x~

  • yarn v1.22.17~

Steps

  1. Install source code.

git clone https://github.com/junta/tradingview-alert-connector.git
cd tradingview-alert-connector

2. Get your Keys

a. For dYdX v3,

b. For Perpetual Protocol or GMX,

(creating a new and dedicated account is strongly recommended)

c. For dYdX v4,

3. Rename ".env.sample" file to ".env"

4. Open .env in an editor and fill each variable

Environment Variables

Key
Value
Required

ETH_ADDRESS

Your Ethereum Address

Yes for dYdX

STARK_PUBLIC_KEY

STARK_KEY_PAIRS > publicKey value got in step2

Yes for dYdX

STARK_PRIVATE_KEY

STARK_KEY_PAIRS > privateKey value got in step2

Yes for dYdX

API_KEY

API_KEY_PAIRS > "key" value got in step2

Yes for dYdX

API_PASSPHRASE

API_KEY_PAIRS > passphrase value got in step2

Yes for dYdX

API_SECRET

API_KEY_PAIRS > secret value got in step2

Yes for dYdX

PERPETUAL_PRIVATE_KEY

Your Private Key of Ethereum Address

Yes for Perpetual Protocol

GMX_PRIVATE_KEY

Your Private Key of Ethereum Address

Yes for GMX

GMX_LEVERAGE

Number. Put 2 for 2x Leverage

Yes for GMX

DYDX_V4_MNEMONIC

Your mnemonic(seed) phrase

Yes for dYdX v4

BLUEFIN_MNEMONIC

Your mnemonic(seed) phrase of SUI chain compatible wallet

Yes for Bluefin

TRADINGVIEW_PASSPHRASE

Unique password to enhance your security. Optional but recommended to be set.

No

SENTRY_DNS

No

5. Install ngrok, sign up, and add authtoken with the following guide

We use ngrok to get public URL and tunnel to your localhost to receive webhook from Tradingview

6. Run the connector web server

Option1: Run on docker container(recommended)

Install docker desktop(if not installed yet)

Build and start docker container

// run for mainnet
docker-compose up -d

Open a new terminal window and start ngrok

yarn ngrok:docker

Option2: Run without docker

Open Terminal, then

  • Install dependencies.

npm install --force
  • Start the web server

yarn start
  • Open a new terminal window and start ngrok

yarn ngrok

  1. check your console running ngrok. outputs should be as follows.

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

your sentry.io URL. If you want to add monitoring by Sentry.io, please follow .

8. Open your browser and access

9. Go to page and check if you can receive alert from Tradingview

Get STARK_KEY and API_KEY values with this guide
Export your account's private key
Export your secret phrase
http://localhost:3000/accounts
Test Tradingview strategy alert
this guide
ngrok - download
Docker Desktop - DockerDocker
Logo
Logo