- Underlying Account — for stock trading
- Derivative Account — for derivative (futures) trading
Which API Groups Require Authentication?
Note: You can call Section A — Market Data / Priceboard APIs without logging in. All APIs in Sections C–F require a valid authentication token from Section B.
Authentication Workflow
Follow these steps before calling authenticated APIs.1. Login
Call the appropriate login endpoint from Section B: Underlying Accountusername and password in the request.
2. Get Authentication Tokens
The login response returns the credentials required for subsequent API requests. The two main values are:access_token for API authentication and the otp_token for order-related requests.
3. Authenticate GET Requests
For every GET request in Sections C–F, include theaccess_token in the Authorization header.
4. Authenticate Order Requests
For every POST, PUT, or DELETE order request in Sections C and D, include the following headers:Authorization header authenticates the account, while x-otp-token is used for order authentication.
Authentication by Request Type
Sandbox OTP
In the Sandbox, you do not need a real OTP device or SMS. Each login flow has a fixed Sandbox OTP token documented on its corresponding authentication page:- B1 — Underlying Authentication → use the fixed underlying OTP token
- B2 — Derivative Authentication → use the fixed derivative OTP token
Note: For Sandbox order testing, always use the fixed x-otp-token provided on the corresponding Section B authentication page.
Sandbox vs Production
Warning: Never use Sandbox credentials or Sandbox OTP values for Production requests. Production requires valid Production credentials and the appropriate real OTP.
