pub enum DeribitErrorCode {
Show 133 variants
Success,
AuthorizationRequired,
Error,
QtyTooLow,
OrderOverlap,
OrderNotFound,
PriceTooLow,
PriceTooLow4Idx,
PriceTooHigh,
NotEnoughFunds,
AlreadyClosed,
PriceNotAllowed,
BookClosed,
PmeMaxTotalOpenOrders,
PmeMaxFutureOpenOrders,
PmeMaxOptionOpenOrders,
PmeMaxFutureOpenOrdersSize,
PmeMaxOptionOpenOrdersSize,
NonPmeMaxFuturePositionSize,
LockedByAdmin,
InvalidOrUnsupportedInstrument,
InvalidAmount,
InvalidQuantity,
InvalidPrice,
InvalidMaxShow,
InvalidOrderId,
PricePrecisionExceeded,
NonIntegerContractAmount,
TooManyRequests,
NotOwnerOfOrder,
MustBeWebsocketRequest,
InvalidArgsForInstrument,
WholeCostTooLow,
NotImplemented,
TriggerPriceTooHigh,
TriggerPriceTooLow,
InvalidMaxShowAmount,
NonPmeTotalShortOptionsPositionsSize,
PmeMaxRiskReducingOrders,
NotEnoughFundsInCurrency,
Retry,
SettlementInProgress,
PriceWrongTick,
TriggerPriceWrongTick,
CanNotCancelLiquidationOrder,
CanNotEditLiquidationOrder,
MatchingEngineQueueFull,
NotOnThisServer,
CancelOnDisconnectFailed,
TooManyConcurrentRequests,
DisabledWhilePositionLock,
AlreadyFilled,
MaxSpotOpenOrders,
PostOnlyPriceModificationNotPossible,
MaxSpotOrderQuantity,
InvalidArguments,
OtherReject,
OtherError,
NoMoreTriggers,
InvalidTriggerPrice,
OutdatedInstrumentForIvOrder,
NoAdvForFutures,
NoAdvPostonly,
NotAdvOrder,
PermissionDenied,
BadArgument,
NotOpenOrder,
InvalidEvent,
OutdatedInstrument,
UnsupportedArgCombination,
WrongMaxShowForOption,
BadArguments,
BadRequest,
SystemMaintenance,
SubscribeErrorUnsubscribed,
TransferNotFound,
PostOnlyReject,
PostOnlyNotAllowed,
UnauthenticatedPublicRequestsTemporarilyDisabled,
InvalidAddr,
InvalidTransferAddress,
AddressAlreadyExist,
MaxAddrCountExceeded,
InternalServerError,
DisabledDepositAddressCreation,
AddressBelongsToUser,
NoDepositAddress,
AccountLocked,
TooManySubaccounts,
WrongSubaccountName,
LoginOverLimit,
RegistrationOverLimit,
CountryIsBanned,
TransferNotAllowed,
SecurityKeyAuthorizationOverLimit,
InvalidCredentials,
PwdMatchError,
SecurityError,
UserNotFound,
RequestFailed,
Unauthorized,
ValueRequired,
ValueTooShort,
UnavailableInSubaccount,
InvalidPhoneNumber,
CannotSendSms,
InvalidSmsCode,
InvalidInput,
InvalidContentType,
OrderbookClosed,
NotFound,
Forbidden,
MethodSwitchedOffByAdmin,
TemporarilyUnavailable,
MmpTrigger,
VerificationRequired,
NonUniqueOrderLabel,
NoMoreSecurityKeysAllowed,
ActiveComboLimitReached,
UnavailableForComboBooks,
IncompleteKycData,
MmpRequired,
CodNotEnabled,
QuotesFrozen,
ScopeExceeded,
Unavailable,
RequestCancelledByUser,
Replaced,
RawSubscriptionsNotAvailableForUnauthorized,
MovePositionsOverLimit,
CouponAlreadyUsed,
KycTransferAlreadyInitiated,
Unknown(i32),
}Expand description
Deribit RPC Error Codes
Complete enumeration of all error codes returned by the Deribit API as documented in the official API documentation v2.1.1
Variants§
Success
Success, No error
AuthorizationRequired
Authorization issue, invalid or absent signature etc.
Error
Some general failure, no public information available
QtyTooLow
Order quantity is too low
OrderOverlap
Rejection, order overlap is found and self-trading is not enabled
OrderNotFound
Attempt to operate with order that can’t be found by specified id or label
PriceTooLow
Price is too low, limit defines current limit for the operation
PriceTooLow4Idx
Price is too low for current index, limit defines current bottom limit
PriceTooHigh
Price is too high, limit defines current up limit for the operation
NotEnoughFunds
Account has not enough funds for the operation
AlreadyClosed
Attempt of doing something with closed order
PriceNotAllowed
This price is not allowed for some reason
BookClosed
Operation for an instrument which order book had been closed
PmeMaxTotalOpenOrders
Total limit of open orders has been exceeded (PME users)
PmeMaxFutureOpenOrders
Limit of count of futures’ open orders has been exceeded (PME users)
PmeMaxOptionOpenOrders
Limit of count of options’ open orders has been exceeded (PME users)
PmeMaxFutureOpenOrdersSize
Limit of size for futures has been exceeded (PME users)
PmeMaxOptionOpenOrdersSize
Limit of size for options has been exceeded (PME users)
NonPmeMaxFuturePositionSize
Limit of size for futures has been exceeded (non-PME users)
LockedByAdmin
Trading is temporary locked by the admin
InvalidOrUnsupportedInstrument
Instrument name is not valid
InvalidAmount
Amount is not valid
InvalidQuantity
Quantity was not recognized as a valid number (for API v1)
InvalidPrice
Price was not recognized as a valid number
InvalidMaxShow
max_show parameter was not recognized as a valid number
InvalidOrderId
Order id is missing or its format was not recognized as valid
PricePrecisionExceeded
Extra precision of the price is not supported
NonIntegerContractAmount
Futures contract amount was not recognized as integer
TooManyRequests
Allowed request rate has been exceeded
NotOwnerOfOrder
Attempt to operate with not own order
MustBeWebsocketRequest
REST request where Websocket is expected
InvalidArgsForInstrument
Some of the arguments are not recognized as valid
WholeCostTooLow
Total cost is too low
NotImplemented
Method is not implemented yet
TriggerPriceTooHigh
Trigger price is too high
TriggerPriceTooLow
Trigger price is too low
InvalidMaxShowAmount
Max Show Amount is not valid
NonPmeTotalShortOptionsPositionsSize
Limit of total size for short options positions has been exceeded (non-PME users)
PmeMaxRiskReducingOrders
Limit of open risk reducing orders has been reached (PME users)
NotEnoughFundsInCurrency
User does not have sufficient spot reserves or negative impact on portfolio margin
Retry
Request can’t be processed right now and should be retried
SettlementInProgress
Settlement is in progress
PriceWrongTick
Price has to be rounded to an instrument tick size
TriggerPriceWrongTick
Trigger Price has to be rounded to an instrument tick size
CanNotCancelLiquidationOrder
Liquidation order can’t be cancelled
CanNotEditLiquidationOrder
Liquidation order can’t be edited
MatchingEngineQueueFull
Reached limit of pending Matching Engine requests for user
NotOnThisServer
The requested operation is not available on this server
CancelOnDisconnectFailed
Enabling Cancel On Disconnect for the connection failed
TooManyConcurrentRequests
The client has sent too many public requests that have not yet been executed
DisabledWhilePositionLock
Spot trading is disabled for users in reduce only mode
AlreadyFilled
This request is not allowed in regards to the filled order
MaxSpotOpenOrders
Total limit of open orders on spot instruments has been exceeded
PostOnlyPriceModificationNotPossible
Price modification for post only order is not possible
MaxSpotOrderQuantity
Limit of quantity per currency for spot instruments has been exceeded
InvalidArguments
Some invalid input has been detected
OtherReject
Some rejects which are not considered as very often
OtherError
Some errors which are not considered as very often
NoMoreTriggers
Allowed amount of trigger orders has been exceeded
InvalidTriggerPrice
Invalid trigger price in relation to the last trade, index or market price
OutdatedInstrumentForIvOrder
Instrument already not available for trading
NoAdvForFutures
Advanced orders are not available for futures
NoAdvPostonly
Advanced post-only orders are not supported yet
NotAdvOrder
Advanced order properties can’t be set if the order is not advanced
PermissionDenied
Permission for the operation has been denied
BadArgument
Bad argument has been passed
NotOpenOrder
Attempt to do open order operations with the not open order
InvalidEvent
Event name has not been recognized
OutdatedInstrument
At several minutes to instrument expiration, advanced IV orders are not allowed
UnsupportedArgCombination
The specified combination of arguments is not supported
WrongMaxShowForOption
Wrong Max Show for options
BadArguments
Several bad arguments have been passed
BadRequest
Request has not been parsed properly
SystemMaintenance
System is under maintenance
SubscribeErrorUnsubscribed
Subscription error
TransferNotFound
Specified transfer is not found
PostOnlyReject
Request rejected due to reject_post_only flag
PostOnlyNotAllowed
Post only flag not allowed for given order type
UnauthenticatedPublicRequestsTemporarilyDisabled
Unauthenticated public requests were temporarily disabled
InvalidAddr
Invalid address
InvalidTransferAddress
Invalid address for the transfer
AddressAlreadyExist
The address already exists
MaxAddrCountExceeded
Limit of allowed addresses has been reached
InternalServerError
Some unhandled error on server
DisabledDepositAddressCreation
Deposit address creation has been disabled by admin
AddressBelongsToUser
Withdrawal instead of transfer
NoDepositAddress
Deposit address not specified
AccountLocked
Account locked
TooManySubaccounts
Limit of subaccounts is reached
WrongSubaccountName
The input is not allowed as the name of subaccount
LoginOverLimit
The number of failed login attempts is limited
RegistrationOverLimit
The number of registration requests is limited
CountryIsBanned
The country is banned (possibly via IP check)
TransferNotAllowed
Transfer is not allowed
SecurityKeyAuthorizationOverLimit
Too many failed security key authorizations
InvalidCredentials
Invalid credentials have been used
PwdMatchError
Password confirmation error
SecurityError
Invalid Security Code
UserNotFound
User’s security code has been changed or wrong
RequestFailed
Request failed because of invalid input or internal failure
Wrong or expired authorization token or bad signature
ValueRequired
Invalid input, missing value
ValueTooShort
Input is too short
Subaccount restrictions
InvalidPhoneNumber
Unsupported or invalid phone number
CannotSendSms
SMS sending failed – phone number is wrong
InvalidSmsCode
Invalid SMS code
InvalidInput
Invalid input
InvalidContentType
Invalid content type of the request
OrderbookClosed
Closed, expired order book
NotFound
Instrument is not found, invalid instrument name
Forbidden
Not enough permissions to execute the request, forbidden
MethodSwitchedOffByAdmin
API method temporarily switched off by the administrator
The requested service is not responding or processing takes too long
MmpTrigger
Order has been rejected due to the MMP trigger
VerificationRequired
API method allowed only for verified users
NonUniqueOrderLabel
Request allowed only for orders uniquely identified by given label
NoMoreSecurityKeysAllowed
Maximal number of tokens allowed reached
ActiveComboLimitReached
Limit of active combo books was reached
Action is temporarily unavailable for combo books
IncompleteKycData
KYC verification data is insufficient for external service provider
MmpRequired
User is not a MMP user
CodNotEnabled
Cancel-on-Disconnect is not enabled for the connection
QuotesFrozen
Quotes are still frozen after previous cancel
ScopeExceeded
Error returned after the user tried to edit/delete an API key with insufficient scope
Method is currently not available
RequestCancelledByUser
Request was cancelled by the user with other api request
Replaced
Edit request was replaced by other one
Raw subscriptions are not available for unauthorized requests
MovePositionsOverLimit
The client cannot execute the request yet, should wait
CouponAlreadyUsed
The coupon has already been used by current account
KycTransferAlreadyInitiated
Sharing of KYC data with a third party provider was already initiated
Unknown(i32)
Unknown error code
Implementations§
Source§impl DeribitErrorCode
impl DeribitErrorCode
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if this is a success code
Check if this is an authorization error
Sourcepub fn is_rate_limit_error(&self) -> bool
pub fn is_rate_limit_error(&self) -> bool
Check if this is a rate limiting error
Sourcepub fn is_validation_error(&self) -> bool
pub fn is_validation_error(&self) -> bool
Check if this is a validation error
Sourcepub fn is_trading_error(&self) -> bool
pub fn is_trading_error(&self) -> bool
Check if this is a trading error
Trait Implementations§
Source§impl Clone for DeribitErrorCode
impl Clone for DeribitErrorCode
Source§fn clone(&self) -> DeribitErrorCode
fn clone(&self) -> DeribitErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more