Buying ATM CE/PE based on webhook data

Hi Dhan team, am trying to automate a simple strategy which goes like

custom indictor has 4 conditional triggers

BUY CE, SELL CE(SL/TP)
BUY PE, SELL PE(SL/TP)

Where TV calls an webhook in aws lambda function through which am trying to place ATM buy order and exit with following SL/TP trigger.

can anyone help with sample code to place ATM order and exit SL/TP alert triggers.

Thanks

You don’t need aws lambda. you can directly call dhan webhook. Go to orders → webhooks to see the json format that our custom indicator should give as an alert.