@Moderator_2 can u plz check this issue as well
https://smartapi.angelbroking.com/topic/4145/not-receiving-the-postback-calls
@trader_noob One of the things I hate with smart API is that there is no instant support. have to wait days to get an issue resolved.
@Moderator_2 The document is outdated. when i passed the refresh_token and make it post API, it worked.
def get_profile(angel_one_details, jwtToken):
url = "https://apiconnect.angelbroking.com/rest/secure/angelbroking/user/v1/getProfile"
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-UserType': 'USER',
'X-SourceID': 'WEB',
'X-PrivateKey': angel_one_details['api_key'],
'X-ClientLocalIP': "127.0.0.1",
'X-ClientPublicIP': "106.193.147.98",
'X-MACAddress': ':'.join(re.findall('..', '%012x' % uuid.getnode())),
'Authorization': "Bearer {}".format(jwtToken)
}
r = requests.get(url, headers)
print(r.json())
Im getting the below response
{'success': False, 'message': 'Invalid Token', 'errorCode': 'AG8001', 'data': ''}
By when can you provide the historical data of nifty and bank nifty?
My limit order has been executed before the trigger price. Am i sending anything wrong in the request.
{
"variety": "NORMAL",
"tradingsymbol": "NIFTY12JAN2318000CE",
"symboltoken": "49705",
"transactiontype": "BUY",
"exchange": "NFO",
"ordertype": "LIMIT",
"producttype": "INTRADAY",
"price": "127.0",
"duration": "DAY",
"quantity": "50"
}
It got executed at price 121.4
This is the order ID. : 230109000193355
Hi Admin.. It would be great that you provide exit by order ID and exit all APIs. that would be of great help for us
For what all order status do we receive the postback call? Its not mentioned in the document.
'NoneType' object is not subscriptable
Sometimes getting the error like this while placing orders. But on trying with same payload, its getting successful in the 3rd or 4th attempt.. My order execution is getting delayed bcoz of this.
{
"variety": "NORMAL",
"tradingsymbol": "ADANIPORTS-EQ",
"symboltoken": "15083",
"transactiontype": "SELL",
"exchange": "NSE",
"ordertype": "MARKET",
"producttype": "INTRADAY",
"duration": "DAY",
"quantity": 1
}