Reference / @getenginex/sdk / ResponsibleGamblingApi
ResponsibleGamblingApi
Responsible gambling: deposit, loss and session time limits, self-exclusion and reality check. All methods require login. Limit changes only take effect after 24 h (a gateway rule). Compliance errors (SELF_EXCLUDED, COOLING_OFF, ...) sometimes arrive as HTTP 500: always decide by error.code.
Methods
getLimits()
getLimits(
params?,options?):Promise<ResponsibleGamblingLimits>
The logged-in player's limits and current usage.
Parameters
params?
options?
Returns
Promise<ResponsibleGamblingLimits>
Example
const { deposit, selfExclusion } = await enginex.responsibleGambling.getLimits()
if (deposit.daily.limit !== null) showUsage(deposit.daily.used, deposit.daily.limit)Throws
UNAUTHENTICATED without a session; VALIDATION_ERROR with validation: 'strict' if the gateway sends a date that is not a date, and also in 'warn' with a money value outside the format.
getRealityCheck()
getRealityCheck(
params?,options?):Promise<RealityCheck>
Data for the reality check notice: session limit, the day's deposit and loss limit. The gateway does not track the session time (it returns the limits as an approximation): the app measures the time.
Parameters
params?
options?
Returns
Promise<RealityCheck>
Example
const { sessionTimeLimitMinutes } = await enginex.responsibleGambling.getRealityCheck()Throws
UNAUTHENTICATED without a session; VALIDATION_ERROR in strict with an unexpected format, and also in 'warn' with a money value outside the format.
selfExclude()
selfExclude(
input,options?):Promise<SelfExclusionResult>
Self-exclusion of the logged-in player. A serious action and, in practice, irreversible for the player: ask for explicit confirmation before calling. A duration outside the list, missing or of another type rejects before any request.
Parameters
input
options?
Returns
Promise<SelfExclusionResult>
Example
if (await confirmDialog('This will block your account for 30 days. Continue?')) {
await enginex.responsibleGambling.selfExclude({ duration: '30d' })
}Throws
CONFIGURATION_ERROR (without a request) for an invalid duration; UNAUTHENTICATED without a session; SELF_EXCLUDED, COOLING_OFF, ACCOUNT_BLOCKED and others from the compliance service by code (some as HTTP 500).
setLimits()
setLimits(
input,options?):Promise<SetLimitsResult>
Sets limits. Only the fields present are sent; null removes the limit (sends 0, inferred). The gateway applies the change in 24 h (the response is updatedAt, not the new limits): reread with ResponsibleGamblingApi.getLimits afterwards.
Parameters
input
options?
Returns
Promise<SetLimitsResult>
Example
await enginex.responsibleGambling.setLimits({ dailyDeposit: 50_000, weeklyDeposit: null })Throws
CONFIGURATION_ERROR (without a request) if the input is not an object, carries no field, or a value is not a safe integer ≥ 0 (nor null); UNAUTHENTICATED without a session; compliance service errors passed through by code (some as HTTP 500).