Square off position
-
"You have not authorised this transaction via EDIS. Please tap reorder to try again" show this error when i square off my order.
code: -
try:
orderparams = {
"variety": "NORMAL",
"tradingsymbol": holdings['data'][0]['tradingsymbol'],
"symboltoken": holdings['data'][0]['symboltoken'],
"transactiontype": 'SELL',
"exchange": "NSE",
"ordertype": "MARKET",
"producttype": 'DELIVERY',
"duration": "DAY",
"price": 0,
"triggerprice": 0,
"quantity": holdings['data'][0]['quantity']
}logger.info(f'{orderparams}') orderId=smartApi.placeOrder(orderparams)
except Exception as e :
logger.info(f"Order placement failed: {traceback.print_exc()}")
logger.info('MESSAGE :: ', e)logger.info(f"The order CLOSED is: {orderId}")
print('\n')please short out error...
-
@Tan you can solve this in 2 ways:
- Either give POA authorization from the Angel one App / web
or - Use EDIS API - https://smartapi.angelone.in/docs/Edis from the SmartAPIs
- Either give POA authorization from the Angel one App / web