Hello Team,
I have developed spring boot application, which incorporate smartapi jar (smartapi-java-1.0.0.jar), but unfortunately when I am trying to place dummy order I am getting null pointer exception i.e. it is complaining user is null, the reason seems to be the session which is getting generated is null, could you please suggest me what has went wrong here as it is very hard to identify without proper error response if request is bad.
FYI I am using predefined method from class SmartConnect.generateSession(String clientCode, String password)
Sample Request :
{
"variety": "NORMAL",
"tradingsymbol": "SBIN-EQ",
"symboltoken": "3045",
"exchange": "NSE",
"transactiontype": "BUY",
"ordertype": "LIMIT",
"producttype": "DELIVERY",
"duration": "DAY",
"price": "100",
"squareoff": "1",
"stoploss": "0",
"quantity": "1"
}
Please see below error attached (Highlighted part shows library usage ) :
I am not fully sure if it is related to migration account for that I have also filled up google form
https://docs.google.com/forms/d/e/1FAIpQLSdgpCiDhSBa_bsKsec002e9unbeQkipOLFAKW7DzPvmiowsaw/viewform
Thanks in advance !
Hargun Singh