Menu

Errors and limits

Errors and limits

One answer shape, fixed error codes, clear limits.

Answer shape

Every answer from our API has one shape. Your answers to our calls use the same shape without traceId, because the trace id is ours.

FieldTypeWhat it is
okbooleanOne check tells you if it worked, for every call.
resultobjectThe answer itself.
error.codestringAct on this fixed list, never on text.
error.messagestringA person reading logs sees what went wrong.
traceIdstringOne search finds every call and retry that one action caused.
Every answer
{ "ok": true,
  "result": { … },
  "traceId": "tr-01JC…" }

{ "ok": false,
  "error": { "code": "session_closed", "message": "This session is closed." },
  "traceId": "tr-01JC…" }

Error codes

Each code has one fixed next step.

CodeWhenYour next step
unknown_keyNo API key with this Key-Id in this system, or it was deleted. A Sandbox API key on Live, or the other way.Use the right API key.
ip_not_allowedThe call came from an address not on the API key’s list.Add the address to the API key in the back office.
bad_signatureThe signature does not match, or the API key’s public key is not the one used.Fix the key or the signing. The back office lists the last refused calls and why.
environment_not_foundNo environment with this name in this system.Check the name, or create it.
not_allowedThe API key may not use this environment, or this operation.Create an API key with that access in the back office.
request_too_oldSent-At is more than 5 minutes from our clock.Fix the server clock. A retry with a new send time works.
invalid_requestA field is missing or wrong, for example a firstSentAt more than 5 minutes in the future. message names the field.Fix the call. Sending it again unchanged fails again.
request_expiredfirstSentAt is older than 7 days. Nothing is done.A bug or a stuck job on your side. Look up the result with session.get or round.get.
duplicate_mismatchA requestId we have seen comes with a different body.A bug on your side: each new change needs a new id.
game_not_foundNo game with this gameId for your account.Pull games.list again.
game_disabledThe game is turned off in the back office.Hide the game. A player with an open Mines round can still start it.
bet_settings_invalidmin is above max, default is outside them, or a value is 0 or less.Fix the bet settings.
currency_not_supportedThe currency is not set up for your account.Set it up in the back office, or use another currency.
session_not_foundNo session with this sessionId in this environment.Check the id and the Environment header.
session_closedsession.updateBetSettings on a closed session.Nothing. The player’s next start gets the new settings.
round_not_foundNo round with this roundId in this environment.Check the id and the Environment header.
rate_limitedOver a limit. HTTP 429. error.retryAfter gives the seconds to wait.Wait that long, then retry with the same requestId.
temporarily_unavailableOur side can’t answer now.Retry after 1 s, 5 s, then 30 s, with the same requestId.

session.close on a session that is already closed is not an error. It answers ok with the session as it is.

Retries

Your calls to us

Our calls to your server

Rate limits

LimitSandboxLive
Calls to our API, per account20 a second200 a second
environment.create, per account100 an hourLive has one environment
Over a limit · HTTP 429
{ "ok": false,
  "error": {
    "code": "rate_limited",
    "message": "Too many calls.",
    "retryAfter": 2
  },
  "traceId": "tr-01JC…" }

Timeouts

CallWe waitIf unknown
wallet.balance3 sThe game shows “Can’t load balance” with a retry button.
wallet.stake5 sNo result is made. The round goes to refunding. A late “accepted” is ignored.
wallet.win, wallet.loss5 sSent again with the same transactionId.
wallet.refund5 sSent again with the same transactionId.
session.closed5 sSent again until accepted, for up to 30 days.