def botdata(): port = int(request.args["bot"]) sock = TcpSock("127.0.0.1", port) info = json.loads(sock.get("info")) charts = json.loads(sock.get("amcharts")) trades = json.loads(sock.get("trades")) return jsonify({"info": info, "charts": charts, "trades": trades})
def bottrades(): port = int(request.args["bot"]) sock = TcpSock("127.0.0.1", port) response = json.loads(sock.get("trades")) return jsonify(response)