Skip to content

Commit e707efb

Browse files
committed
updated docs
1 parent 39197fc commit e707efb

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

README.md

+40-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# The What
1212

1313
Tradingview-webhooks-bot (TVWB) is a small, Python-based framework that allows you to extend or implement your own logic
14-
using data from [Tradingview's webhooks](https://www.tradingview.com/support/solutions/43000529348-about-webhooks/).
14+
using data from [Tradingview's webhooks](https://www.tradingview.com/support/solutions/43000529348-about-webhooks/). TVWB is not a trading library, it's a framework for building your own trading logic.
1515

1616
# The How
1717

@@ -20,8 +20,11 @@ TVWB uses [Flask](https://flask.palletsprojects.com/en/2.2.x/) to handle the web
2020

2121
# Quickstart
2222

23-
* Installation
24-
* Serving the App
23+
If you an experienced Python developer, you can skip the Installation and Serving the app Sections.
24+
They cover installing with pip and serving a flask app.
25+
26+
* [Installation](https://github.com/robswc/tradingview-webhooks-bot/wiki/Installation)
27+
* [Serving the App](https://github.com/robswc/tradingview-webhooks-bot/wiki/Hosting)
2528

2629
**Ensure you're in the `src` directory.**
2730

@@ -67,4 +70,37 @@ class NewAction(Action):
6770

6871
```bash
6972
python3 tvwb.py start
70-
```
73+
```
74+
75+
### Sending a webhook
76+
77+
Navigate to `http://localhost:5000`. Ensure you see the `WebhookReceived` Event. Click "details" to expand the event box.
78+
Find the "Key" field and note the value. This is the key you will use to send a webhook to the app. Copy the JSON data below,
79+
replacing "YOUR_KEY_HERE" with the key you copied.
80+
81+
```json
82+
{
83+
"key": "YOUR_KEY_HERE",
84+
"message": "I'm a webhook!"
85+
}
86+
```
87+
88+
The `key` field is required, as it both authenticates the webhook and tells the app which event to fire. Besides that, you can
89+
send any data you want. The data will be available to your action via the `validate_data()` method. (see above, editing action)
90+
91+
On tradingview, create a new webhook with the above JSON data and send it to `http://ipaddr:5000/webhook`. You should see the data from the webhook printed to the console.
92+
93+
### FAQs
94+
95+
#### So how do I actually trade?
96+
97+
To actually submit trades, you will have to use a library like [ccxt](https://github.com/ccxt/ccxt) for crypto currency. For other brokers, usually there are
98+
SDKs or APIs available. The general workflow would look something like: webhook signal -> tvwb (use ccxt here) -> broker. Your trade submission would take place within the `run` method of a custom action.
99+
100+
#### The tvwb.py shell
101+
102+
You can use the `tvwb.py shell` command to open a python shell with the app context. This allows you to interact with the app without having to enter `python3 tvwb.py` every time.
103+
104+
#### How do I get more help?
105+
106+
At the moment, the wiki is under construction. However, you may still find some good info on there. For additional assistance you can DM me on [Twitter](https://twitter.com/robswc) or join the [Discord](https://discord.gg/wrjuSaZCFh). I will try my best to get back to you!

0 commit comments

Comments
 (0)