robswc / tradingview-webhooks-bot

a framework 🏗 for trading with tradingview webhooks!
http://tvwb.robswc.me
GNU General Public License v3.0
603 stars 182 forks source link

how can I test it with curl? #10

Closed JDJoe closed 4 years ago

JDJoe commented 4 years ago

I followed the instructions from https://github.com/Robswc/tradingview-webhooks-bot/issues/8 Made the changes to the script and started it. Runs OK, seems to listen port 5000 How can I test it from a outside to make sure it actually works OK. (I am not a developer so... ;)

robswc commented 4 years ago

hey, Have you set up the tradingview alerts? That should be the best way to test :)

JDJoe commented 4 years ago

It seems my "problem" is actually with my VPS I was planning to use. I started the script as instructed but it's not accessible form outside.

It sound like I have to make it work with Apache: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

JDJoe commented 4 years ago

curl -H "Content-Type: application/json" -X POST -d '{"type": "limit", "side": "buy", "amount": "1000", "symbol": "XBTUSD", "price": "30", "key": "youneedyourkeyhere"}' http://127.0.0.1:5000/webhook

Of course, you change the URL to what ever you have there.

robswc commented 4 years ago

awesome, thanks for providing the solution for future users!