title: How do I receive Tradingview alert Webhooks in Python
body: <p>I'm trying to have alerts sent via webhook (TradingView's new feature) to a python program, and use them to make trades with Alpaca.  </p>
  
  <p>I tried using ngrok plus this script I found on Github:</p>
  
  <p><a href="https://github.com/Robswc/tradingview-webhooks-bot" rel="nofollow noreferrer">https://github.com/Robswc/tradingview-webhooks-bot</a></p>
  
  <p>After changing the port to 80 (no other port seems to work, I think this is on TradingView's end) I finally got something to come through:</p>
  
  <pre><code>127.0.0.1 - - [25/Dec/2019 21:26:45] code 400, message Bad request version ('À\x14À')
  127.0.0.1 - - [25/Dec/2019 21:26:45] " Ì  ÈÁÄJÂ$/g{$¹¦HºÏE(·úå[:Ü´J÷ D+µ6ÑfYxºûáÙØkc`¸Ø­°ÜAzÜ  À/À0À+À,Ì¨Ì©ÀÀ   ÀÀ" HTTPStatus.BAD_REQUEST -
  127.0.0.1 - - [25/Dec/2019 21:26:51] code 400, message Bad request version ('À\x14À')
  127.0.0.1 - - [25/Dec/2019 21:26:51] " Ì  ÈÃE¿¾GÐª6áe&gt;ÃÝnI6MÚ3YÖ·¦7Ñ ïþG{äÉýCVÙA$ºÕ0ÒBô2õ+px¶  À/À0À+À,Ì¨Ì©ÀÀ   ÀÀ[0m" HTTPStatus.BAD_REQUEST -
  127.0.0.1 - - [25/Dec/2019 21:27:47] code 400, message Bad request version ('À\x14À')
  4s"H  À/À0À+À,Ì¨Ì©ÀÀ    ÀÀ" HTTPStatus.BAD_REQUEST -
  127.0.0.1 - - [25/Dec/2019 21:27:52] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00Ì\x01\x00\x00È\x03\x03\x92¯;H\x9c\x91ÁD7³\x04Êµù¶Óf\x9bzúÊä')
  127.0.0.1 - - [25/Dec/2019 21:27:52] " Ì  È¯;HÁD7³Êµù¶ÓfzúÊä Åïn@g" HTTPStatus.BAD_REQUEST -
  127.0.0.1 - - [25/Dec/2019 21:27:58] code 400, message Bad request version ('À\x14À')
  127.0.0.1 - - [25/Dec/2019 21:27:58] " Ì  ÈèÊh&gt;Rd-«RN?Æ©Àh¯`á-õ¿  Å±E`²ÈìþW\y¼DÅî¿=9ÒüX  À/À0À+À,Ì¨Ì©ÀÀ ÀÀ" HTTPStatus.BAD_REQUEST -
  127.0.0.1 - - [25/Dec/2019 21:28:03] code 400, message Bad request version ('À\x14À')
  127.0.0.1 - - [25/Dec/2019 21:28:03] " Ì  È¸êó^é:÷gPç©àóÛq}/p¬&lt;ÉN ö3Ð&lt;½w,øÒpa0&amp;`¬[tý( »ÎV   À/À0À+À,Ì¨Ì©ÀÀ  ÀÀ" HTTPStatus.BAD_REQUEST -
  </code></pre>
  
  <p>Anyone have any idea how to get this working?  I'm just trying to send some json to the webhook on my local machine, then I can use Alpaca functions to make trades with it.  Thanks in advance for any advice you can provide, and please let me know any information that can help further solve this, and I will gladly add it.  </p>