How to place options order using API using Python

I want to place order of options present in option chain using API using Python
can someone help me with the code…?

For Placing order: Place Order | Upstox Developer API
For option chain: Put/Call Option Chain | Upstox Developer API

I have already fetched option chain using API Python and I fetched the details of the particaular Options of which I have to place order like I have LTP, Strick Price, Call/Put… of that options

There is Concept of Instrument Key, Is there a way to fetch instrument key through python code itself to make whole process automate?

Help me with the code with the latest Upstock Documentations.

Hello @Abhi1
Instrument keys can be found in JSON format here. You may use these instrument keys to place orders.

Additionally, if you are retrieving data from the Put/Call Option Chain | Upstox Developer API, the response object includes the instrument keys for the contracts. These instrument keys can also be used to place orders.

Hi Ketan,
Yeah I found it under reponse of Option Chain, Thanks a lot.