- Underlying Account — for stock trading accounts
- Derivative Account — for derivative trading accounts
B1. Authentication — Underlying
Logs in with a stock (underlying) trading account and returns the credentials required for subsequent authenticated API requests.Endpoint
POST /auth/gen-secret-key/underlying
Sandbox URL
Parameters
Example Request
Example Response
Response Fields
Note: Theaccess_tokenandrefresh_tokenshould be included according to the authentication requirements of subsequent API endpoints.
Warning: Sandbox behavior — The Sandbox accepts the demo username and password issued during onboarding. If you do not have Sandbox credentials, contact PHS OpenAPI Support.
Sandbox Token Behavior
The Sandbox uses fixed authentication credentials for this login flow. The Sandbox returns the same fixed values for:access_tokenrefresh_tokenotp_token
x-otp-token header when submitting underlying order requests in the Sandbox.
Note: Use the token values exactly as returned by the Sandbox. Do not expect the authentication tokens to change between login requests.
