Python Webhook Data Parser over HTTPSConnection End Points
₹600-1500 INR
Käynnissä
Julkaistu lähes 4 vuotta sitten
₹600-1500 INR
Maksettu toimituksen yhteydessä
1. Server will post the Data in Tex or Jason format this must be captured using endpoints(Webhook)
2. Capture only the new POST as and when it was triggerred from server
3. Parse the data and store this as key value that is derived from Jason.
4. At any time the already read data should not be read again .Only in realtime as soon as new post occurs the data must be read.
Refer this page for the Data:
[login to view URL]
headers:
host: [login to view URL]
Accept-Encoding: gzip
Content-Type: application/json; charset=utf-8
User-Agent: Go-http-client/1.1
Content-Length: 96
Connection: keep-alive
Body the data part
{
"alertno":2,
"instrument": "BTC-PERPETUAL",
"side": "sell",
"quantity": 1500,
"close":9368.5
}
The URL is same till this [login to view URL]
only the last part varying everytime the data is send from server like this
[login to view URL]
Some of the code i tried
import [login to view URL]
import json
import pprint
conn = [login to view URL]('[login to view URL]')
[login to view URL]("GET", "/")
response = [login to view URL]()
print("Status: {} and reason: {}".format([login to view URL], [login to view URL]))
headers = [login to view URL]()
pp = [login to view URL](indent=4)
[login to view URL]("Headers: {}".format(headers))
#conn = [login to view URL]('[login to view URL]')
data1 = [login to view URL]()
print(data1)
note : Data must be read and only when a request is posted ,at any cost old data from endpoint should not be read.
2. After successfull read of this data POST OK message so that server get acknowledgement.