This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os,time,threading as th,datetime as dt,requests as rq,pytz,pandas as pd,pandas_ta_classic as ta,upstox_client as uc | |
| from flask import Flask,request as req,jsonify,redirect,session | |
| from functools import wraps | |
| AK,AS="137d58dd-52f4-4856-a0b9-3b177e3b0274","pe5hsplmgq" | |
| TM,PIN,SK=False,"261295","super_secret_trading_key_123" | |
| LEV,WM,IGW=5,2000.0,False | |
| trk,pos,hist,inst={},{},[],{} | |
| TF,LF,IST="upstox_token.txt","trading.log",pytz.timezone('Asia/Kolkata') | |
| app=Flask(__name__);app.secret_key=SK;api,hapi=None,None | |
| def login_required(f): |