Aug-28-2020, 01:23 AM
(This post was last modified: Aug-28-2020, 01:23 AM by onicode5476.)
hey, new to python and trying to get the data from my webhook response, tried a bunch of methods all not changing the result.
127.0.0.1 - - [28/Aug/2020 02:08:26] "POST / HTTP/1.1" 200 -
it is a POST code 200 with this data i can see on the ngrok page but no dice on the webhook.
also no errors from the server.py file
key:"1234,
TICKER: BTCUSDT,
EXCHANGE: BINANCE,
OPEN: 11353.764322832612
CLOSE: 11341.56
also the only "HELLO" prints that appear are
HELLO1
HELLO2
HELLO6
from actions import send_order, parse_webhook
from auth import get_token
from flask import Flask, request, abort
import json
# Create Flask object called app.
app = Flask(__name__)
print("HELLO1")
# Create root to easily let us know its on/working.
@app.route('/', methods=['GET', 'POST'])
def root():
return 'online'
print("HELLO2")
def webhook():
print("HELLO3")
if request.method == 'POST':
print("HELLO4")
print(request.json)
return '', 200
else:
abort(400)
print("HELLO5")
if __name__ == '__main__':
print("HELLO6")
app.run(host='0.0.0.0', port=80)
print("HELLO7")when my ngrok server gets a request this is the only thing that appears in the console. 127.0.0.1 - - [28/Aug/2020 02:08:26] "POST / HTTP/1.1" 200 -
it is a POST code 200 with this data i can see on the ngrok page but no dice on the webhook.
also no errors from the server.py file
key:"1234,
TICKER: BTCUSDT,
EXCHANGE: BINANCE,
OPEN: 11353.764322832612
CLOSE: 11341.56
also the only "HELLO" prints that appear are
HELLO1
HELLO2
HELLO6
