@sagargami777 Javascript example::

// Reference:: https://smartapi.angelbroking.com/docs/WebSocket2 let ExchangeType = { nse_cm: 1, nse_fo: 2, bse_cm: 3, bse_fo: 4, mcx_fo: 5, ncx_fo: 7, cde_fo: 13 } // Reference: https://smartapi.angelbroking.com/docs/Orders#place let ExchangeMap = { BSE: 'bse_cm', NSE: 'nse_cm', NFO: 'nse_fo', MCX: 'mcx_fo', BFO: 'bse_fo', CDS: 'cde_fo' } let exch_seg = 'NSE' console.log(ExchangeType[ExchangeMap[exch_seg]])