> ## Documentation Index
> Fetch the complete documentation index at: https://kraken-sandbox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Error messages

> All error codes returned by the Kraken Spot REST API, organized by category, with causes and handling guidance

Kraken API errors follow a consistent format: a string beginning with a capital-E category prefix, followed by a colon-separated description. Every response includes an `error` array — if non-empty, the request failed.

```json theme={null}
{
  "error": ["EAPI:Invalid key"],
  "result": {}
}
```

## Authentication errors

<AccordionGroup>
  <Accordion title="EAPI:Invalid key">
    **Cause:** The `API-Key` header is missing, malformed, or refers to a key that has been deleted or revoked.

    **Fix:** Verify the key exists in your Kraken account under Settings → API. Regenerate if needed and update your client. Repeated occurrences trigger `EGeneral:Temporary lockout`.
  </Accordion>

  <Accordion title="EAPI:Invalid signature">
    **Cause:** The `API-Sign` header does not match the expected HMAC-SHA512 signature.

    **Common causes:**

    * Wrong API secret (base64-decoded correctly?)
    * Nonce or POST body included in the wrong order
    * Extra whitespace or encoding issue in the payload

    **Fix:** Review the [authentication guide](/exchange/guides/rest/authentication) and reproduce the signature step-by-step. Use the API test endpoint `/0/private/Balance` with a minimal payload to isolate the issue.
  </Accordion>

  <Accordion title="EAPI:Invalid nonce">
    **Cause:** The nonce submitted is less than or equal to the last accepted nonce for this API key.

    **Fix:** Use a monotonically increasing nonce. The most reliable source is the current Unix timestamp in milliseconds. If multiple threads share the same API key, use a counter with a mutex, not the system clock.
  </Accordion>

  <Accordion title="EGeneral:Temporary lockout">
    **Cause:** Too many sequential `EAPI:Invalid key` errors. The account is temporarily locked to prevent brute-force attempts.

    **Fix:** Wait for the lockout to expire (typically a few minutes). Do not retry with the same invalid key — each attempt resets the timer.
  </Accordion>

  <Accordion title="EGeneral:Permission denied">
    **Cause:** The API key exists and authenticated correctly, but does not have the permission required for this endpoint.

    **Fix:** Check which permissions the key has under Settings → API. Add the required permission or use a different key that has it.
  </Accordion>

  <Accordion title="EAuth:Account temporary disabled">
    **Cause:** The account has been temporarily suspended, usually due to security concerns or compliance review.

    **Fix:** Contact Kraken support.
  </Accordion>

  <Accordion title="EAuth:Account unconfirmed">
    **Cause:** The account email has not been verified.

    **Fix:** Complete email verification before making authenticated requests.
  </Accordion>

  <Accordion title="EAuth:Rate limit exceeded / EAuth:Too many requests">
    **Cause:** Too many authentication attempts in a short period.

    **Fix:** Back off and retry. Do not hammer the auth endpoints.
  </Accordion>
</AccordionGroup>

## Order errors

<AccordionGroup>
  <Accordion title="EOrder:Insufficient funds">
    **Cause:** The account does not have enough available balance to place this order (for the quote currency on buys, base currency on sells).

    **Fix:** Check your balance via `/0/private/Balance` or `BalanceEx`. Account for any fees that will be deducted.
  </Accordion>

  <Accordion title="EOrder:Order minimum not met">
    **Cause:** The order volume is below the `ordermin` for this pair.

    **Fix:** Query `/0/public/AssetPairs` and check the `ordermin` field. Increase the order size.
  </Accordion>

  <Accordion title="EOrder:Cost minimum not met">
    **Cause:** The total cost (price × volume) is below the `costmin` for this pair.

    **Fix:** Check `costmin` in `/0/public/AssetPairs`. Increase price or volume so their product exceeds the minimum.
  </Accordion>

  <Accordion title="EOrder:Tick size check failed">
    **Cause:** The price submitted is not a valid multiple of the pair's `tick_size`.

    **Fix:** Round your price to the nearest valid tick. `tick_size` is returned by `/0/public/AssetPairs`.
  </Accordion>

  <Accordion title="EOrder:Invalid price">
    **Cause:** The submitted price is zero, negative, or otherwise invalid.

    **Fix:** Validate price inputs before sending. Market orders should not include a price parameter.
  </Accordion>

  <Accordion title="EOrder:Rate limit exceeded">
    **Cause:** The account's order rate limit counter has reached its threshold.

    **Fix:** See the [rate limits guide](/exchange/guides/rest/ratelimits). Slow down order placement and cancellation. Consider using `amend` instead of cancel + replace.
  </Accordion>

  <Accordion title="EOrder:Orders limit exceeded">
    **Cause:** The account has too many open orders.

    **Fix:** Cancel some open orders before placing new ones. See [rate limits](/exchange/guides/rest/ratelimits) for the open order cap by tier.
  </Accordion>

  <Accordion title="EOrder:Domain rate limit exceeded">
    **Cause:** The domain rate limit (master + all sub-accounts) has been reached.

    **Fix:** Rate limit is shared across all sub-accounts. Reduce order activity across the whole account group. See [sub-accounts](/exchange/guides/general/subaccounts).
  </Accordion>

  <Accordion title="EOrder:Scheduled orders limit exceeded">
    **Cause:** Too many scheduled (trigger) orders are open simultaneously.

    **Fix:** Cancel some scheduled orders before adding more.
  </Accordion>

  <Accordion title="EOrder:Positions limit exceeded">
    **Cause:** The account has reached the maximum number of open margin positions.

    **Fix:** Close existing positions before opening new ones.
  </Accordion>

  <Accordion title="EOrder:Reduce only — variants">
    | Error                                   | Cause                                                                            |
    | :-------------------------------------- | :------------------------------------------------------------------------------- |
    | `EOrder:Reduce only:Non-PC`             | Reduce-only flag submitted on a non-perpetual-contract pair                      |
    | `EOrder:Reduce only:No position exists` | Reduce-only order submitted but no open position exists for this market          |
    | `EOrder:Reduce only:Position is closed` | Order would flip the position — it partially fills and the remainder is canceled |

    **Fix:** Only use `reduce_only` when you have an open position in the matching direction.
  </Accordion>

  <Accordion title="EOrder:Unknown position">
    **Cause:** The referenced position ID does not exist or belongs to a different account.

    **Fix:** Verify the position ID via `/0/private/OpenPositions`.
  </Accordion>
</AccordionGroup>

## Margin errors

<AccordionGroup>
  <Accordion title="EOrder:Cannot open position / EOrder:Cannot open opposing position">
    **Cause:** The account tier or account type is not eligible for margin trading.

    **Fix:** Upgrade your account tier or complete margin trading verification. Check eligibility in your account settings.
  </Accordion>

  <Accordion title="EOrder:Margin allowance exceeded">
    **Cause:** The order would exceed the account's total margin allowance.

    **Fix:** Reduce position size or close existing positions.
  </Accordion>

  <Accordion title="EOrder:Margin level too low">
    **Cause:** The account has insufficient equity or collateral to support this position.

    **Fix:** Add funds or reduce open position size to restore margin level.
  </Accordion>

  <Accordion title="EOrder:Margin position size exceeded">
    **Cause:** The order would cause the account to exceed the maximum allowed position size for this pair.

    **Fix:** Check the pair's position size limit. Reduce order size.
  </Accordion>

  <Accordion title="EOrder:Insufficient margin">
    **Cause:** Kraken's exchange-side margin pool does not have sufficient funds for this trade. This is a platform-level constraint, not an account issue.

    **Fix:** Retry later. If this persists, contact support.
  </Accordion>
</AccordionGroup>

## Service errors

<AccordionGroup>
  <Accordion title="EService:Unavailable">
    **Cause:** The matching engine or API is offline, typically during a maintenance window.

    **Fix:** Check the [system status](https://status.kraken.com) page. Implement backoff and retry logic. Subscribe to the `status` WebSocket channel for advance notice.
  </Accordion>

  <Accordion title="EService:Market in cancel_only mode">
    **Cause:** The market is in `cancel_only` mode — no new orders can be placed, only cancellations.

    **Fix:** Wait for the market to return to normal. Check `SystemStatus` endpoint or the `status` WebSocket channel.
  </Accordion>

  <Accordion title="EService:Market in post_only mode">
    **Cause:** The market is in `post_only` mode — only maker orders are accepted.

    **Fix:** Submit limit orders with `post_only=true`, or wait for normal mode to resume.
  </Accordion>

  <Accordion title="EService:Deadline elapsed">
    **Cause:** The request timed out before the trading engine processed it. Can occur if the `deadline` parameter was set too short, or under high load.

    **Fix:** Increase your deadline or remove it. Before retrying, check `OpenOrders` — the order may have been placed despite the timeout.
  </Accordion>
</AccordionGroup>

## General errors

<AccordionGroup>
  <Accordion title="EGeneral:Invalid arguments">
    **Cause:** The request payload is malformed, missing required parameters, or contains invalid values.

    **Fix:** Validate all parameters against the endpoint documentation before sending. Check for incorrect types (string vs number), missing required fields, or unknown parameters.
  </Accordion>

  <Accordion title="EGeneral:Invalid arguments:Index unavailable">
    **Cause:** Index pricing is unavailable for stop or profit orders on this pair.

    **Fix:** Use a limit price instead of an index-based trigger for this pair.
  </Accordion>

  <Accordion title="EGeneral:Internal error">
    **Cause:** An unexpected error occurred on Kraken's side. The error may include a numeric code (e.g. `EGeneral:Internal error:5`).

    **Fix:** Retry with exponential backoff. If the error persists, contact Kraken support with the full request details and timestamp.
  </Accordion>

  <Accordion title="ETrade:Invalid request">
    **Cause:** The trade request is structurally invalid.

    **Fix:** Review the endpoint documentation. Ensure all required fields are present and correctly typed.
  </Accordion>

  <Accordion title="EAccount:Invalid permissions">
    **Cause:** The account does not have the permissions required to perform this action.

    **Fix:** Contact Kraken support or check account tier requirements.
  </Accordion>
</AccordionGroup>

## Funding errors

| Error                       | Cause                                                                                                |
| :-------------------------- | :--------------------------------------------------------------------------------------------------- |
| `EFunding:Max fee exceeded` | Withdrawal fee exceeds the `max_fee` set in the `Withdraw` request — increase `max_fee` or remove it |
| `EBM:limit exceeded:CAL`    | Exceeded Canadian Acquisition Limits for this cryptocurrency                                         |

## Related guides

<CardGroup cols={3}>
  <Card title="Authentication" icon="lock" href="/exchange/guides/rest/authentication">
    Signature generation, nonce management, and EAPI error fixes
  </Card>

  <Card title="API key permissions" icon="key" href="/exchange/guides/rest/api-keys">
    Which permissions to grant to avoid EGeneral:Permission denied
  </Card>

  <Card title="Rate limits" icon="gauge" href="/exchange/guides/general/ratelimits">
    How rate limit counters work and how to avoid EOrder:Rate limit exceeded
  </Card>
</CardGroup>

## Error handling patterns

| Scenario                                       | Recommended approach                                                  |
| :--------------------------------------------- | :-------------------------------------------------------------------- |
| `EAPI:Invalid key` or `EAPI:Invalid signature` | Do not retry — fix the authentication logic first                     |
| `EAPI:Invalid nonce`                           | Do not retry the same nonce — generate a fresh one                    |
| `EService:Unavailable`                         | Retry with exponential backoff (start at 1s, cap at 60s)              |
| `EService:Deadline elapsed`                    | Check `OpenOrders` before retrying — the order may have placed        |
| `EOrder:Rate limit exceeded`                   | Back off and reduce order frequency; check counter via `TradeBalance` |
| `EGeneral:Internal error`                      | Retry with backoff; escalate to support if persistent                 |
| Any `EOrder:Insufficient*`                     | Check balances before retrying; do not retry immediately              |
