Q1. What is an access token, and whatβs new about it?
The access token now comes from the Neo app/web β Invest β TradeAPI β API Dashboard (not via /oauth2/token
). Send it as a plain string (no Bearer
). Resetting it immediately invalidates all sessions.
Q2. What happens if I reset the token?
All active sessions break instantly. Re-login (TOTP β MPIN validate) to obtain new session token (Auth
) and session sid (sid
).
Q3. Demystify tokens: access token, view token, session token (trade token), view sid, session sid, neo-fin-key
/login/1.0/tradeApiLogin
(TOTP step)./login/1.0/tradeApiValidate
(MPIN step). Use these as Auth
and sid
headers for all post-login APIs.neotradeapi
(static) except in Quotes/Scripmaster, where it is not required.Q4. What are the login endpoints (fixed)?
https://mis.kotaksecurities.com/login/1.0/tradeApiLogin
https://mis.kotaksecurities.com/login/1.0/tradeApiValidate
β returns baseUrl
, session token (header Auth
) and session sid (header sid
).Q5. Is baseUrl
static or dynamic?
Itβs stable for the day and even after that rarely changes. Always capture it after MPIN validate and use it for that session.
Q6. Which APIs need baseUrl
?
All post-login APIs: Orders, Reports, Portfolio, Limits, Margins, Quotes, Scripmaster. (Only login endpoints are fixed.)
Q7. Show me how to replace {{baseUrl}}
with a real example.