Enum kraapi::error::KError[][src]

pub enum KError {
    HttpError(HyperError),
    ParseError(SerdeError),
    AssetParseError,
    UnknownAssetPair,
    InvalidArguments,
    PermissionDenied,
    InvalidKey,
    InvalidSignature,
    InvalidNonce,
    APIRateLimit,
    OrderRateLimit,
    TemporaryLockout,
    OpenPosition,
    OpposingPosition,
    MarginAllowanceExceeded,
    InsufficientMargin,
    InsufficientFunds,
    OrderMinimum,
    OrderLimit,
    PositionLimit,
    TradingAgreement,
    ServiceUnavailable,
    ServiceBusy,
    InternalError,
    Locked,
    FeatureDisabled,
    UnknownError,
}

Possible errors that could occur internally or errors that were returned from Kraken

Variants

HttpError(HyperError)

Wrapper around hyper::Error when an internal http error has occurred

ParseError(SerdeError)

Wrapper around serde_json::Error for when serde fails to parse the json into the output structure

AssetParseError

Failed to parse into KAsset/KAssetPair

UnknownAssetPair

Invalid currency pair You can pull the complete list of our asset pairs from the AssetPairs public call and look for the pair name as the entry of the Json headers or by the parameter “altname”: https://api.kraken.com/0/public/AssetPairs

InvalidArguments

This error is returned when a method is called without the required parameters. For example, calling the QueryOrders method without specifying a valid transaction id (txid) parameter would cause the invalid arguments error to be returned. Calling a method with unnecessary parameters would still not return the invalid arguments error because the unnecessary parameters would simply be ignored.

PermissionDenied

Permission denied errors are returned when the API client is attempting a task for which the API key does not have permission. For example, if an API client attempted to retrieve the account balance using an API key that was configured to allow trading access but not account management access, then the permission denied error would be returned. You can review your API keys and their settings (such as their permissions) via the Settings -> API tab of account management.

InvalidKey

This error is returned when the API key used for the call is either expired or disabled, please review the API key in your Settings -> API tab of account management or generate a new one and update your application.

InvalidSignature

The Invalid Key error occurs if either your API key or API secret are written incorrectly in your program or because the POST data used in the authentication and the POST data sent to the API do not match

InvalidNonce

This error is returned when an invalid nonce is sent. Check your nonce window

APIRateLimit

This error occurs when the API call limits are exceeded

OrderRateLimit

While adding/canceling orders does not count against our standard API counter limits, these operations do have their own add/cancel order counter. This counter works in a way where the longer orders are left on the book, the more orders clients are able to add/cancel. After the error “EAPI:Rate limit exceeded”, please wait ~15 min for being able to send new requests.

TemporaryLockout

Temporary lockout error messages can occur if you had too many failed API calls or too many invalid nonce errors in a short period of time or invalid signatures. Even though these calls return an error, that error still counts against your API limits and may result in a temporary lockout.

Temporary lockouts typically last approximately 15 minutes. If you are triggering several invalid nonce errors, please increase the nonce window as this can help reduce the frequency that these errors will occur. Please try to reduce the frequency of your private API calls also.

OpenPosition

Opening new spot positions on margin has been temporarily suspended for trading engine maintenance. The feature will be making a return soon and you can follow along with updates

Another reasons may be that spot positions on margin are not currently available for clients residing in certain countries. Please see this article for our geographical restrictions

OpposingPosition

No hedging. Cannot open a long and short position for the same pair.

If wishing to open a long and short position for the same currency, please choose different trading pairs with the same currency as the base or quote currency. Ex: short XBT/USD, long XBT/EUR.

MarginAllowanceExceeded

This error occurs when you have exceeded the margin allowance limits for your current verification level. Margin allowance limits for each currency varies based on your current verification level. Please refer to this support article for more information regarding margin allowance limits

InsufficientMargin

We have limited funds available for margin extensions. The “insufficient margin” message indicates that we are out of funds in the applicable margin pool for the time being. This can change at any time. You may be able to successfully place your order just seconds or minutes later, but high volume orders and orders placed during high volume times may take longer. Please accept our apologies for any inconvenience. For more information

InsufficientFunds

You do not have the funds available to place this order. Please review your open positions and orders for items that may be holding up your funds

OrderMinimum

You have not met the minimum order volume for this asset.

You can find more information about minimum order sizes

OrderLimit

You have exceeded the maximum amount of open orders available to your account.

These limits are based on your verification level. Please close some of your open orders or verify your account to a higher level.

You can learn more about the maximum amount of open orders

PositionLimit

You have exceeded the maximum amount of open positions available to your account.

These limits are based on your verification level. Please close or settle some or all of your open positions or verify your account to a higher level if possible.

You can learn more about the maximum amount of open positions

TradingAgreement

In case of this error you will need to submit your order with the following parameter: ‘trading_agreement’:’agree’

This will resolve the error message you are receiving when placing an order: Trading Agreement

ServiceUnavailable

The service errors you are experiencing should only be temporary. You may wish to resubmit your requests if they have failed. We will be monitoring the issues and will update our page

ServiceBusy

The service errors you are experiencing should only be temporary. You may wish to resubmit your requests if they have failed. We will be monitoring the issues and will update our page

InternalError

When we are facing API degradation issues, these can translate into problems for both Kraken and cryptowat.ch in the form of service unavailable messages, 8XX errors on cryptowatch and site outages.

Locked

This issue has to do with the security of your account which may have been compromised. Please change your password and Two-Factor Authentication and contact our Support Center

FeatureDisabled

This error occurs when a flag or input parameter is disabled temporary or permanently. The error should come from one of the inputs passed, please contact our support sending a log with the complete informations used for the call that generated the error

UnknownError

Default KError if none of the others above

Trait Implementations

impl Debug for KError[src]

impl Display for KError[src]

Auto Trait Implementations

impl !RefUnwindSafe for KError

impl Send for KError

impl Sync for KError

impl Unpin for KError

impl !UnwindSafe for KError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.