Custom Exceptions

The python-kraken-sdk provides lots of custom exceptions which are listed below.

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

exception kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.KrakenAuthenticationFailedError(*args, **kwargs)

Bases: Exception

The account or its permissions could not be authenticated.

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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.KrakenInvalidReferenceIdError(*args, **kwargs)

Bases: Exception

The requested reference 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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.KrakenMaxFeeExceededError(*args, **kwargs)

Bases: Exception

The fee was higher than the defined maximum.

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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.KrakenPositionLimitExceededError(*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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.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 kraken.exceptions.KrakenUnknownReferenceIdError(*args, **kwargs)

Bases: Exception

The requested reference 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 kraken.exceptions.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 kraken.exceptions.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.