Create your Own KiteConnect Dashboard with the help of Flask Framework.

Flask is a micro web framework written in python to achieve this type of framework you can proceed with the the help of this code and can achiveve just need to follow the exact steps in videos.

After above videos if you missed something this is the way it should be processed which you can follow from the image

For Logging the web page and getting access token look like this

import json
from flask import Flask, request
from kiteconnect import KiteConnect

# Base settings
PORT = 5010
HOST = ""

# Kite Connect App settings. Go to
# to create an app if you don't have one.
kite_api_key = "your_api_key"
kite_api_secret = "your_access_token"

# Create a redirect url
redirect_url = "http://{host}:{port}/login".format(host=HOST, port=PORT)

# Login url
login_url = "{api_key}".format(

# Kite connect console url
console_url = "{api_key}".format(

# App
app = Flask(__name__)

index_template = """
Make sure your app with api_key - {api_key} has set redirect to {redirect_url}.
login_template = """ <h2 style="color: green;"> Success</h2> <div> Access token: <b>{access_token}</b></div> <h4> User login data</h4> <pre>{user_data}</pre> <a href="" target="_blank"><h4> Fetch user holdings</h4> </a> <a href="" target="_blank"><h4> Fetch user orders</h4> </a> <a href="" target="_blank"><h4> Checks Kite Connect docs for other calls.</h4> </a>""" @app.route("/") def index(): return index_template.format(api_key=kite_api_key, redirect_url=redirect_url, console_url=console_url, login_url=login_url) @app.route("/login") def login(): request_token = request.args.get("request_token") if not request_token: return """ <span style="color: red;">Error while generating request token.</span><a href=""> Try again.</a><a href="">""" kite = KiteConnect(api_key=kite_api_key) data = kite.request_access_token(request_token, secret=kite_api_secret) holdings_url = ("" "?api_key={api_key}&access_token={access_token}").format( api_key=kite_api_key, access_token=data["access_token"]) orders_url = ("" "?api_key={api_key}&access_token={access_token}").format( api_key=kite_api_key, access_token=data["access_token"]) return login_template.format(access_token=data["access_token"], user_data=json.dumps(data, indent=4, sort_keys=True), holdings_url=holdings_url, orders_url=orders_url) if __name__ == "__main__": print("Starting server: http://{host}:{port}".format(host=HOST, port=PORT)), port=PORT, debug=True)
View Code in GitHub Follow Below: