Custom Kraken Exceptions

Module that provides custom exceptions for the python-kraken-sdk

exception kraken.exceptions.KrakenException(msg: str | dict | None = None, *args: tuple, **kwargs: Dict[str, Any])

Bases: Exception

Class that provides custom exceptions for the python-kraken-sdk based on the error messages that can be received from the Kraken Spot and Futures API.

exception KrakenApiLimitExceededError(*args, **kwargs)

Bases: Exception

API rate limit exceeded. Please check your rate limits.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenAuthenticationError(*args, **kwargs)

Bases: Exception

Credentials are invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenBadRequestError(*args, **kwargs)

Bases: Exception

The request payload is malformed, incorrect or ambiguous.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenCannotOpenPositionError(*args, **kwargs)

Bases: Exception

User/tier is ineligible for margin trading.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenCostMinimumNotMetError(*args, **kwargs)

Bases: Exception

Cost (price * volume) does not meet costmin.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenDeadlineElapsedError(*args, **kwargs)

Bases: Exception

The request timed out according to the default or specified deadline.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInsufficientAvailableFundsError(*args, **kwargs)

Bases: Exception

Client does not have the necessary funds.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInsufficientFundsError(*args, **kwargs)

Bases: Exception

Client does not have the necessary funds.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInsufficientMarginError(*args, **kwargs)

Bases: Exception

Exchange does not have available funds for this margin trade.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidAPIKeyError(*args, **kwargs)

Bases: Exception

An invalid API-Key header was supplied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidAccountError(*args, **kwargs)

Bases: Exception

The account is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidAmountError(*args, **kwargs)

Bases: Exception

The specified amount is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidArgumentsError(*args, **kwargs)

Bases: Exception

The request payload is malformed, incorrect or ambiguous.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidArgumentsIndexUnavailableError(*args, **kwargs)

Bases: Exception

Index pricing is unavailable for stop/profit orders on this pair.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidNonceError(*args, **kwargs)

Bases: Exception

An invalid nonce was supplied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidOrderError(*args, **kwargs)

Bases: Exception

Order is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidPriceError(*args, **kwargs)

Bases: Exception

Price is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidReferenceIdError(*args, **kwargs)

Bases: Exception

The requested referece id is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidSignatureError(*args, **kwargs)

Bases: Exception

An invalid API-Sign header was supplied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidStakingMethodError(*args, **kwargs)

Bases: Exception

The staking method is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenInvalidUnitError(*args, **kwargs)

Bases: Exception

The specified unit is invalid.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenMarginAllowedExceededError(*args, **kwargs)

Bases: Exception

User has exceeded their margin allowance.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenMarginLevelToLowError(*args, **kwargs)

Bases: Exception

Client has insufficient equity or collateral.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenMarginPositionSizeExceededError(*args, **kwargs)

Bases: Exception

Client would exceed the maximum position size for this pair.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenMarketInOnlyCancelModeError(*args, **kwargs)

Bases: Exception

Request can’t be made at this time. Please check system status.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenMarketInOnlyPostModeError(*args, **kwargs)

Bases: Exception

Request can’t be made at this time. Please check system status.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenNotFoundError(*args, **kwargs)

Bases: Exception

The resource is not found.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenOrderForEditNotFoundError(*args, **kwargs)

Bases: Exception

The order for edit could not be found.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenOrderLimitsExceededError(*args, **kwargs)

Bases: Exception

Order limits exceeded. Please check your open orders limit.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenOrderMinimumNotMetError(*args, **kwargs)

Bases: Exception

Order size does not meet ordermin.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenPermissionDeniedError(*args, **kwargs)

Bases: Exception

API key doesn’t have permission to make this request.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenPositionLimitExceeded(*args, **kwargs)

Bases: Exception

Position limit exceeded. Please check your limits.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenRateLimitExceededError(*args, **kwargs)

Bases: Exception

API rate limit exceeded. Please check your rate limits.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenRequiredArgumentMissingError(*args, **kwargs)

Bases: Exception

The request is missing a required argument.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenServiceUnavailableError(*args, **kwargs)

Bases: Exception

The matching engine or API is offline.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenTemporaryLockoutError(*args, **kwargs)

Bases: Exception

The account was temporary locked out.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenTickSizeInvalidCheckError(*args, **kwargs)

Bases: Exception

Price submitted is not a valid multiple of the pair’s tick_size.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenToManyAddressesError(*args, **kwargs)

Bases: Exception

To many addresses specified.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnavailableError(*args, **kwargs)

Bases: Exception

The requested resource is unavailable.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownAssetError(*args, **kwargs)

Bases: Exception

The asset is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownAssetPairError(*args, **kwargs)

Bases: Exception

The asset pair is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownMethodError(*args, **kwargs)

Bases: Exception

The endpoint or method is not known.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownOrderError(*args, **kwargs)

Bases: Exception

Order is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownPositionError(*args, **kwargs)

Bases: Exception

Position is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownReferenceIdError(*args, **kwargs)

Bases: Exception

The requested referece id is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception KrakenUnknownWithdrawKeyError(*args, **kwargs)

Bases: Exception

The requested withdrawal key is unknown.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception MaxReconnectError(*args, **kwargs)

Bases: Exception

To many reconnect tries.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

add_note()

Exception.add_note(note) – add a note to the exception

get_exception(data: str | List[str]) Any | None

Returns the exception given by name if available

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

kraken.exceptions.docstring_message(cls: Any) Any

Decorates an exception to make its docstring its default message.