Authorization

To access private API, clients must use JWT tokens for authentication. Tokens must be included in the Authorization header as follows: Authorization: Bearer {token}

Token Expiration

Clients should check the key exp in the JWT token payload, which contains a timestamp indicating the token's expiration time. Tokens are valid until this time.

Obtaining JWT Tokens

JWT token generates by API Key and API Secret. The API Key pair can be generated in user profile, by link https://alp.com/en/profile/api To generate it, make a POST request to the following endpoint: https://alp.com/api/v3/auth with body

{
  "api_key": "<Your API Key>",
  "api_secret": "<Your API Secret>"
}

Response (JWT token string)

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Authentication Errors

HTTP StatusErrorDescription
401INVALID_SECRETAPI secret is incorrect
401AUTH_ERRORGeneral authentication failure
403API_KEY_DELETEDAPI key has been deleted
403ACCOUNT_INACTIVEAccount is inactive or suspended
403DEPARTMENT_MISMATCHAPI key does not belong to the target department
403IP_NOT_ALLOWEDRequest IP is not in the API key whitelist
404API_KEY_NOT_FOUNDAPI key does not exist

POST/DELETE Method Signature (X-SIGN Header)

For POST and DELETE requests to trading endpoints, clients must include a request signature in the X-SIGN header. Calculate this signature as the HMAC SHA-256 hash of the request body using the api_secret obtained earlier.