Skip to content

Commit 481f8cd

Browse files
authored
Merge pull request #4 from Robswc/easysetup
Pipenv Easy Setup
2 parents dac5fe4 + ba07a37 commit 481f8cd

File tree

3 files changed

+357
-1
lines changed

3 files changed

+357
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,27 @@
1010

1111
# Tradingview-webhooks-bot
1212

13-
tradingview-webhooks-bot is a trading bot, written in python that allows users to place trades with tradingview's webhook alerts.
13+
tradingview-webhooks-bot is a trading bot, written in python that allows users to place trades with tradingview's webhook alerts.
14+
15+
---
16+
17+
## Quickstart Using Pipenv
18+
19+
Pipenv is a tool that helps users set virtual environments and install dependencies with ease. There are many benefits to creating a virtual environment, especially for those that haev other projects running on the same server.
20+
21+
### Install pipenv and initiate virtual environment
22+
23+
1. Install pipenv `sudo apt install pipenv`
24+
2. Once pipenv is installed, I recommend that you [get familiar with it](https://github.com/pypa/pipenv).
25+
3. Navigate to the folder where you cloned the repo. You should see `Pipfile` and `Pipfile.lock` files.
26+
4. Run command `pipenv install`
27+
5. The dependencies required to get started should now be installed. Check by running command `pipenv graph` - You should see flask and ccxt.
28+
6. If you want to install any other dependencies, or if you get an error that you're missing a depedency, simply use command `pipenv install <dependency>`
29+
7. Starting the virtual environment: `pipenv shell`
30+
8. Starting the flask app: `python webhook-bot.py`
31+
32+
There you go! Nice and simple Python version and virtualenv management.
33+
34+
### Using ngrok for webook data retrieval
35+
36+
Many people are having difficulties with their server properly receiving webhook data from TradingView. The easiest way to get started quickly without ripping your hair out from trying to figure out what's wrong, [ngrok](https://ngrok.com/) can be used to receive the signals. Create a free account, unless you want your server to go down every 8 hours. Navigate to the downloads page, and select your download to match your machine. For example, I am on Ubuntu: `wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip`

tradingview-webhooks-bot/Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
8+
[packages]
9+
flask = ">1.1"
10+
ccxt = ">1.18"
11+
12+
[requires]
13+
python_version = "3.7"

0 commit comments

Comments
 (0)