Place this code in your folder as filename.html this is the one interface which will take your Basket Orders.
<form action ="http://localhost/kite/kitegui.py" method ="get">
transaction_type:<input type ="text" name ="transaction_type">
<input type ="submit" value ="Submit">
</form>
Need to follow the video tutorial then exactly create the folder and place this python code in www folder of wamp server as filename.py :
#!C:/Python36/python.exe
import cgi,cgitb
form=cgi.FieldStorage()
transaction_type=form.getvalue('transaction_type')
print('Content-type:text\html\n\n')
print('''<button id='custom-button'>TRADE THE BASKET</button>
<script src='https://kite.trade/publisher.js?v=1'></script>
<script>
KiteConnect.ready(function(){
var kite = new KiteConnect('r5a308ywreuekt3m')
kite.add({
'exchange':'NSE',
'tradingsymbol':'INFY',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'ZEEL',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'YESBANK',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'RELIANCE',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'SBIN',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'TATAMOTORS',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'TATASTEEL',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'TCS',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'SUNPHARMA',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'NTPC',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.add({
'exchange':'NSE',
'tradingsymbol':'WIPRO',
'transaction_type' :'%s',
'quantity' : 100,
'order_type' :'MARKET',
'product' : 'MIS'
});
kite.link('#custom-button');
});</script>''' %(transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type,transaction_type))