#[non_exhaustive]pub enum ErrorCode {
Show 54 variants
UnknownError,
UnsupportedMessage,
InvalidRequest,
TimeoutError,
EntityNotFound,
CantRouteRequest,
FrameTooLong,
MarketClosed,
ConcurrentModification,
BlockedPayloadType,
OaAuthTokenExpired,
AccountNotAuthorized,
RetNoSuchLogin,
AlreadyLoggedIn,
RetAccountDisabled,
ChClientAuthFailure,
ChClientNotAuthenticated,
ChClientAlreadyAuthenticated,
ChAccessTokenInvalid,
ChServerNotReachable,
ChCtidTraderAccountNotFound,
ChOaClientNotFound,
RequestFrequencyExceeded,
ServerIsUnderMaintenance,
ChannelIsBlocked,
ConnectionsLimitExceeded,
WorseGslNotAllowed,
SymbolHasHoliday,
NotSubscribedToSpots,
AlreadySubscribed,
SymbolNotFound,
UnknownSymbol,
IncorrectBoundaries,
NoQuotes,
NotEnoughMoney,
MaxExposureReached,
PositionNotFound,
OrderNotFound,
PositionNotOpen,
PositionLocked,
TooManyPositions,
TradingBadVolume,
TradingBadStops,
TradingBadPrices,
TradingBadStake,
ProtectionIsTooCloseToMarket,
TradingBadExpirationDate,
PendingExecution,
TradingDisabled,
TradingNotAllowed,
UnableToCancelOrder,
UnableToAmendOrder,
ShortSellingNotAllowed,
Unknown(String),
}Expand description
Error code reported by the server.
The server sends the code as text. Every code named in the proto files has a variant;
any other text is kept in ErrorCode::Unknown exactly as received.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownError
The server failed for a reason it does not disclose.
UnsupportedMessage
The message type is not supported.
InvalidRequest
The request is malformed or carries invalid values.
TimeoutError
The server did not process the request in time.
EntityNotFound
The entity named by the request does not exist.
CantRouteRequest
The server could not route the request.
FrameTooLong
The frame exceeds the size limit.
MarketClosed
The market is closed.
ConcurrentModification
The entity was changed by another request at the same time.
BlockedPayloadType
The payload type is blocked.
OaAuthTokenExpired
The access token has expired.
AccountNotAuthorized
The account is not authorised on this connection.
RetNoSuchLogin
No account has this login.
AlreadyLoggedIn
The account is already authorised on this connection.
RetAccountDisabled
The account is disabled.
ChClientAuthFailure
The application credentials were refused.
ChClientNotAuthenticated
The application is not authorised on this connection.
ChClientAlreadyAuthenticated
The application is already authorised on this connection.
ChAccessTokenInvalid
The access token is invalid.
ChServerNotReachable
The trading server is not reachable.
ChCtidTraderAccountNotFound
The trading account was not found.
ChOaClientNotFound
The application was not found.
RequestFrequencyExceeded
Requests are sent more often than the limit allows.
ServerIsUnderMaintenance
The server is under maintenance.
ChannelIsBlocked
The channel is blocked.
ConnectionsLimitExceeded
The limit of open connections is reached.
WorseGslNotAllowed
A guaranteed stop loss may not be moved to a worse level.
SymbolHasHoliday
Trading is suspended because the symbol has a holiday.
NotSubscribedToSpots
The connection is not subscribed to spot prices of the symbol.
AlreadySubscribed
The subscription already exists.
SymbolNotFound
The symbol was not found.
UnknownSymbol
The symbol is not known to the server.
IncorrectBoundaries
The requested time range is not valid.
NoQuotes
There are no quotes to trade on.
NotEnoughMoney
The account lacks the funds for the trade.
MaxExposureReached
The exposure limit is reached.
PositionNotFound
The position was not found.
OrderNotFound
The order was not found.
PositionNotOpen
The position is not open.
PositionLocked
The position is locked.
TooManyPositions
The limit of open positions is reached.
TradingBadVolume
The volume is not valid.
TradingBadStops
The stop levels are not valid.
TradingBadPrices
The prices are not valid.
TradingBadStake
The stake is not valid.
ProtectionIsTooCloseToMarket
The protection level is too close to the market price.
TradingBadExpirationDate
The expiration date is not valid.
PendingExecution
The position has an execution pending.
TradingDisabled
Trading is disabled for the symbol.
TradingNotAllowed
The account may not trade.
UnableToCancelOrder
The order cannot be cancelled.
UnableToAmendOrder
The order cannot be amended.
ShortSellingNotAllowed
Short selling is not allowed.
Unknown(String)
A code this version of the library does not name, kept as received.