Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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.
{
  "error": ["EAPI:Invalid key"],
  "result": {}
}

Authentication errors

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.
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 and reproduce the signature step-by-step. Use the API test endpoint /0/private/Balance with a minimal payload to isolate the issue.
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.
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.
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.
Cause: The account has been temporarily suspended, usually due to security concerns or compliance review.Fix: Contact Kraken support.
Cause: The account email has not been verified.Fix: Complete email verification before making authenticated requests.
Cause: Too many authentication attempts in a short period.Fix: Back off and retry. Do not hammer the auth endpoints.

Order errors

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.
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.
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.
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.
Cause: The submitted price is zero, negative, or otherwise invalid.Fix: Validate price inputs before sending. Market orders should not include a price parameter.
Cause: The account’s order rate limit counter has reached its threshold.Fix: See the rate limits guide. Slow down order placement and cancellation. Consider using amend instead of cancel + replace.
Cause: The account has too many open orders.Fix: Cancel some open orders before placing new ones. See rate limits for the open order cap by tier.
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.
Cause: Too many scheduled (trigger) orders are open simultaneously.Fix: Cancel some scheduled orders before adding more.
Cause: The account has reached the maximum number of open margin positions.Fix: Close existing positions before opening new ones.
ErrorCause
EOrder:Reduce only:Non-PCReduce-only flag submitted on a non-perpetual-contract pair
EOrder:Reduce only:No position existsReduce-only order submitted but no open position exists for this market
EOrder:Reduce only:Position is closedOrder 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.
Cause: The referenced position ID does not exist or belongs to a different account.Fix: Verify the position ID via /0/private/OpenPositions.

Margin errors

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.
Cause: The order would exceed the account’s total margin allowance.Fix: Reduce position size or close existing positions.
Cause: The account has insufficient equity or collateral to support this position.Fix: Add funds or reduce open position size to restore margin level.
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.
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.

Service errors

Cause: The matching engine or API is offline, typically during a maintenance window.Fix: Check the system status page. Implement backoff and retry logic. Subscribe to the status WebSocket channel for advance notice.
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.
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.
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.

General errors

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.
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.
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.
Cause: The trade request is structurally invalid.Fix: Review the endpoint documentation. Ensure all required fields are present and correctly typed.
Cause: The account does not have the permissions required to perform this action.Fix: Contact Kraken support or check account tier requirements.

Funding errors

ErrorCause
EFunding:Max fee exceededWithdrawal fee exceeds the max_fee set in the Withdraw request — increase max_fee or remove it
EBM:limit exceeded:CALExceeded Canadian Acquisition Limits for this cryptocurrency

Authentication

Signature generation, nonce management, and EAPI error fixes

API key permissions

Which permissions to grant to avoid EGeneral:Permission denied

Rate limits

How rate limit counters work and how to avoid EOrder:Rate limit exceeded

Error handling patterns

ScenarioRecommended approach
EAPI:Invalid key or EAPI:Invalid signatureDo not retry — fix the authentication logic first
EAPI:Invalid nonceDo not retry the same nonce — generate a fresh one
EService:UnavailableRetry with exponential backoff (start at 1s, cap at 60s)
EService:Deadline elapsedCheck OpenOrders before retrying — the order may have placed
EOrder:Rate limit exceededBack off and reduce order frequency; check counter via TradeBalance
EGeneral:Internal errorRetry with backoff; escalate to support if persistent
Any EOrder:Insufficient*Check balances before retrying; do not retry immediately