Here is my requirements.
There is a webhook connected with certain public address .
> 52.89.214.238
> 34.212.75.30
> 54.218.53.128
> 52.32.178.7
This webhook will be used to post data either in json or text format. (Public webhook info is here https://www.tradingview.com/chart/?solution=43000529348)
Let say i wish to listen to this end point to parse the data further how to do this in python.
from flask import Flask, request, Response, jsonify
url ='https://52.89.214.238:443/callback/' #this is the URL i wish to listen the POST message using Webhook
# POST request for webhook services.
@app.route('/callback', methods=['POST'])
def callback():
temp = []
dictList = []
data = request.get_json(force=True)
if __name__ == "__main__":
try:
app.run(host=url, port=443, debug=False)
except:
print('Error occured, starting again...')
pass
What changes i need to make here to listen to this public address and to parse the data.