Professional Documents
Culture Documents
Doskey Vim
Doskey Vim
if (is_time_between(time(15,59), time(15,60))):
print("Valid time for Entry")
else:
print("Invalid time for Entry")
Instrument Qty. Avg. cost LTP Cur. val P&L Net chg. Day chg.
tradingsymbol 'quantity', 'average_price', 'last_price', 'pnl',
'day_change', 'day_change_percentage'
hld = kite.holdings()
df = pd.DataFrame(hld)
df[['tradingsymbol','pnl']]
pos = kite.positions()
day_pos = pos.get('day')
day_pos_net = pos.get('net')
day_pos_df = pd.DataFrame(day_pos)
day_pos_df[['tradingsymbol','quantity','last_price','unrealised','realised']]
pd.DataFrame(kite.positions().get('day'))
[['tradingsymbol','quantity','last_price','unrealised','realised']]
>>> day_pos_df.columns
Index(['tradingsymbol', 'exchange', 'instrument_token', 'product', 'quantity',
'overnight_quantity', 'multiplier', 'average_price', 'close_price',
'last_price', 'value', 'pnl', 'm2m', 'unrealised', 'realised',
'buy_quantity', 'buy_price', 'buy_value', 'buy_m2m', 'sell_quantity',
'sell_price', 'sell_value', 'sell_m2m', 'day_buy_quantity',
'day_buy_price', 'day_buy_value', 'day_sell_quantity', 'day_sell_price',
'day_sell_value'],
dtype='object')
od = kite.orders() -- return list
od_df = pd.DataFrame(od)
>>> od_df.columns
Index(['placed_by', 'order_id', 'exchange_order_id', 'parent_order_id',
'status', 'status_message', 'status_message_raw', 'order_timestamp',
'exchange_update_timestamp', 'exchange_timestamp', 'variety',
'modified', 'exchange', 'tradingsymbol', 'instrument_token',
'order_type', 'transaction_type', 'validity', 'validity_ttl', 'product',
'quantity', 'disclosed_quantity', 'price', 'trigger_price',
'average_price', 'filled_quantity', 'pending_quantity',
'cancelled_quantity', 'market_protection', 'meta', 'tag', 'tags',
'guid'],
dtype='object')
od_df[['tradingsymbol', 'status','quantity','pending_quantity']]
order =
kite.place_order(variety=kite.VARIETY_AMO,exchange=kite.EXCHANGE_NSE,tradingsymbol=
"ACC",transaction_type=kite.TRANSACTION_TYPE_BUY,quantity=1,product=kite.PRODUCT_MI
S,order_type=kite.ORDER_TYPE_MARKET,price=None,
validity=None,
disclosed_quantity=None,
trigger_price=None,
squareoff=None,
stoploss=None,
trailing_stoploss=None,
tag="TradeViaPython")
Authorization: enctoken
5b9y9woGUZCFP0evQ1l9PEgutZp3OuPqfp3iw+H/FD8UyDJgkgtty+2GXzJO8xNAocrmUZKibh0YTEiKjNE
qafjGeo2Cy7/xMAKgTxPn7dwTi/2DXW+DBg==
kite.set_access_token("5b9y9woGUZCFP0evQ1l9PEgutZp3OuPqfp3iw+H/
FD8UyDJgkgtty+2GXzJO8xNAocrmUZKibh0YTEiKjNEqafjGeo2Cy7/xMAKgTxPn7dwTi/2DXW+DBg==")
730-425-6525
659
df = pd.DataFrame(columns=['strike',''cost_price',''stop_loss_price,'status'])
df.loc[0] = ['NIFTY2292217650CE','100','130','broken']
df.loc[1] = ['NIFTY2292217650CE','100','130','open']
df.loc[2] = ['NIFTY2292217650CE','100','130','open']
df.loc[3] = ['NIFTY2292217650CE','100','130','open']
mycolumns = ['A', 'B']
df = pd.DataFrame(columns=mycolumns)
df = pd.DataFrame(columns=['strike','cost_price','stop_loss_price','status'])
df.loc[0]=[]
df.loc[1]=[2,4]
df.loc[0]=[1,4]
NIFTY22SEP17500PE
NIFTY2292217650PE