It looks like you're new here. If you want to get involved, click one of these buttons!
# python code
from kiteconnect import KiteConnect
kite_connect = KiteConnect(api_key="your_api_key")
kite_connect.set_access_token(access_token="your_access_token")
# create a unique tag for each order that you send to the broker via API
tag = "xyz_123"
order_id = kite_connect.place_order(
variety=kite_connect.VARIETY_REGULAR,
exchange='MCX',
tradingsymbol="CRUDEOIL24SEPFUT",
transaction_type='BUY',
quantity=1,
product='NRML',
order_type=kite_connect.ORDER_TYPE_LIMIT,
price=5600,
tag=tag
)
if not order_id:
order_id_list = [i for i in kite_connect.orders() if i['tag']==tag]
if len(order_id_list)>0:
order_id = order_id_list[0]['order_id']
# if the order_id is still None and there is no error produced in your place_order API call, you must check the broker terminal immediately to see if any order is placed.
Make sure to remove app and client specific tokens while sharing logs here.