@saisaigraph
Okay. So for placing order, you need to ensure exchange_segment as MCX (dhan.MCX for python) and product type can be dhan.INTRA or dhan.MARGIN, depending on order you want to place.
For fetching prices, you can again refer to Security ID master, which will have the security ID for all instruments.
Hi for placing order, Im providing exchange_segment as dhan.MCX ( python) and also tried adding MCX_COMM. but both not working, error keeps saying "invalid security id. Its the same security id fetched from the open crude oil position via api and it says this. PLz, what else is reuqired or wrong for a placing a commodity sell order? the same api works for selling NFO etc but not for commodity.
error below:
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Invalid SecurityId’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Invalid SecurityId’}