It looks like you're new here. If you want to get involved, click one of these buttons!
[{'average_price': 180.45,
'cancelled_quantity': 0,
'disclosed_quantity': 0,
'exchange': 'NSE',
'exchange_order_id': '1200000000865127',
'exchange_timestamp': datetime.datetime(2020, 1, 24, 9, 31, 23),
'exchange_update_timestamp': '2020-01-24 09:31:23',
'filled_quantity': 6,
'guid': 'ffshfshdf',
'instrument_token': 1723649,
'market_protection': 0,
'meta': {},
'order_id': '200124000435472',
'order_timestamp': datetime.datetime(2020, 1, 24, 9, 31, 23),
'order_type': 'MARKET',
'parent_order_id': None,
'pending_quantity': 0,
'placed_by': 'dfgsdf',
'price': 0,
'product': 'CO',
'quantity': 6,
'status': 'COMPLETE',
'status_message': None,
'status_message_raw': None,
'tag': None,
'tradingsymbol': 'JINDALSTEL',
'transaction_type': 'BUY',
'trigger_price': 178.9,
'validity': 'DAY',
'variety': 'co'},
now i like to sell this jindalstel when target reached , how to code that in python
if (latest_price >= squareoff_price_long):
kite.exit_order(variety=variety_check, order_id=parent_order_id)
print(stock_name, "order is exited")
where latest_price is the ltp i'm geting from kite.ltp and squareoff_price_long is the price where i want to square off and variety_check is "CO". Since i have used this step in my code and i was successfully excuted from the cover order, so for final check i need to know weather i'm doing right or wrong