Skip to content

Sign In

Authenticates a user account and returns profile fields plus the session JWT in __token.

POST

https://{some_domain}/sign/in

Authorization

No bearer token is required for this endpoint.

Request

Sign-in verifies an existing password and does not apply the current new-password policy. Authentication attempts are rate-limited across HTTP and TCP; see Security Controls.

Content-Type: application/json

Body Parameters

Field Type Required Validation Description
login int Yes >= 0 Account login ID
password string Yes length 6..512 bytes; existing credentials are checked as stored Account password

Request Example

{
  "login": 100001,
  "password": "your-strong-password"
}

Response

__token is an Ed25519 JWT issued by the licensed server, valid for the configured session_ttl_hours (24 hours by default). Eligible Data Lake requests use this same token. Token expiry requires a new sign-in. See the session token profile.

Success (200)

{
  "id": 100001,
  "login": 100001,
  "regdate": 1700000000,
  "leverage": 100,
  "email": "[email protected]",
  "avatar": "",
  "name": "John Doe",
  "phone": "+1234567890",
  "address": "Wall Street 1",
  "city": "New York",
  "state": "NY",
  "country": "US",
  "zipcode": "10001",
  "group": "standard",
  "currency": "USD",
  "money_digits": 2,
  "__token": "<Ed25519 session JWT>"
}

Response Parameters

Field Type Description
money_digits integer Fractional precision for account-currency monetary values, joined from the account group.
__token string Ed25519 session token used by the trading server and returned in the HTTP Authorization response header.

The server returns __token in the Authorization response header. It does not set a session cookie; cookie storage, if used, is client-side behavior. See session token profile for its claims, verification requirements, and session binding.

Error Responses

HTTP error Description
400 INVALID_DATA Validation failed (login/password format)
400 INVALID_MARGIN_LEVEL Margin info could not be calculated
402 USER_DISABLED User exists but is disabled
403 USER_NOT_FOUND_OR_INCORRECT User not found or password is incorrect
403 BRAND_NOT_AVAILABLE User brand is not admitted by the negotiated license policy
404 GROUP_NOT_FOUND Account group is missing or invalid
503 LICENSE_NOT_ACTIVE A v2 license runtime lease is required before issuing a new session token
503 SESSION_TOKEN_UNAVAILABLE The lease is active, but signing, authorization resolution, or SessionGuard cache/queue admission failed. A successful response does not wait for SQLite commit.

Error Example

{
  "error": "INVALID_DATA",
  "message": "password must be at least 6 characters"
}

When sign-in is denied by license brand admission, the direct error body contains only the error code:

{
  "error": "BRAND_NOT_AVAILABLE"
}

Notes

  • Endpoint is internally handled by command AuthUser.
  • The authenticated identity is signed by STCore as the Ed25519 __token; eligible Data Lake requests use this same token.
  • Only the primary JWT is returned in the HTTP Authorization response header; the server does not set a session cookie.
  • A server-side master-password bypass may exist depending on deployment configuration.
  • With runtime protocol v2, sign-in returns HTTP 503 with error: "LICENSE_NOT_ACTIVE" when the lease is unavailable. It returns SESSION_TOKEN_UNAVAILABLE when the lease is active but signing, fresh authorization resolution, or SessionGuard cache/queue admission fails. A successful response does not wait for SQLite commit.