#[repr(i32)]pub enum ProtoOaErrorCode {
Show 43 variants
OaAuthTokenExpired = 1,
AccountNotAuthorized = 2,
RetNoSuchLogin = 12,
AlreadyLoggedIn = 14,
RetAccountDisabled = 64,
ChClientAuthFailure = 101,
ChClientNotAuthenticated = 102,
ChClientAlreadyAuthenticated = 103,
ChAccessTokenInvalid = 104,
ChServerNotReachable = 105,
ChCtidTraderAccountNotFound = 106,
ChOaClientNotFound = 107,
RequestFrequencyExceeded = 108,
ServerIsUnderMaintenance = 109,
ChannelIsBlocked = 110,
ConnectionsLimitExceeded = 67,
WorseGslNotAllowed = 68,
SymbolHasHoliday = 69,
NotSubscribedToSpots = 112,
AlreadySubscribed = 113,
SymbolNotFound = 114,
UnknownSymbol = 115,
IncorrectBoundaries = 35,
NoQuotes = 117,
NotEnoughMoney = 118,
MaxExposureReached = 119,
PositionNotFound = 120,
OrderNotFound = 121,
PositionNotOpen = 122,
PositionLocked = 123,
TooManyPositions = 124,
TradingBadVolume = 125,
TradingBadStops = 126,
TradingBadPrices = 127,
TradingBadStake = 128,
ProtectionIsTooCloseToMarket = 129,
TradingBadExpirationDate = 130,
PendingExecution = 131,
TradingDisabled = 132,
TradingNotAllowed = 133,
UnableToCancelOrder = 134,
UnableToAmendOrder = 135,
ShortSellingNotAllowed = 136,
}Expand description
- Error code ENUM.
Variants§
OaAuthTokenExpired = 1
Authorization
When token used for account authorization is expired.
AccountNotAuthorized = 2
When account is not authorized.
RetNoSuchLogin = 12
When such account no longer exists.
AlreadyLoggedIn = 14
When client tries to authorize after it was already authorized.
RetAccountDisabled = 64
When account is disabled.
ChClientAuthFailure = 101
Open API client is not activated or wrong client credentials.
ChClientNotAuthenticated = 102
When a command is sent for not authorized Open API client.
ChClientAlreadyAuthenticated = 103
Client is trying to authenticate twice.
ChAccessTokenInvalid = 104
Access token is invalid.
ChServerNotReachable = 105
Trading service is not available.
ChCtidTraderAccountNotFound = 106
Trading account is not found.
ChOaClientNotFound = 107
Could not find this client id.
RequestFrequencyExceeded = 108
General
Request frequency is reached.
ServerIsUnderMaintenance = 109
Server is under maintenance.
ChannelIsBlocked = 110
Operations are not allowed for this account.
ConnectionsLimitExceeded = 67
Limit of connections is reached for this Open API client.
WorseGslNotAllowed = 68
Not allowed to increase risk for Positions with Guaranteed Stop Loss.
SymbolHasHoliday = 69
Trading disabled because symbol has holiday.
NotSubscribedToSpots = 112
Pricing
When trying to subscribe to depth, trendbars, etc. without spot subscription.
AlreadySubscribed = 113
When subscription is requested for an active.
SymbolNotFound = 114
Symbol not found.
UnknownSymbol = 115
Note: to be merged with SYMBOL_NOT_FOUND.
IncorrectBoundaries = 35
When requested period (from,to) is too large or invalid values are set to from/to.
NoQuotes = 117
Trading
Trading cannot be done as not quotes are available. Applicable for Book B.
NotEnoughMoney = 118
Not enough funds to allocate margin.
MaxExposureReached = 119
Max exposure limit is reached for a {trader, symbol, side}.
PositionNotFound = 120
Position not found.
OrderNotFound = 121
Order not found.
PositionNotOpen = 122
When trying to close a position that it is not open.
PositionLocked = 123
Position in the state that does not allow to perform an operation.
TooManyPositions = 124
Trading account reached its limit for max number of open positions and orders.
TradingBadVolume = 125
Invalid volume.
TradingBadStops = 126
Invalid stop price.
TradingBadPrices = 127
Invalid price (e.g. negative).
TradingBadStake = 128
Invalid stake volume (e.g. negative).
ProtectionIsTooCloseToMarket = 129
Invalid protection prices.
TradingBadExpirationDate = 130
Invalid expiration.
PendingExecution = 131
Unable to apply changes as position has an order under execution.
TradingDisabled = 132
Trading is blocked for the symbol.
TradingNotAllowed = 133
Trading account is in read only mode.
UnableToCancelOrder = 134
Unable to cancel order.
UnableToAmendOrder = 135
Unable to amend order.
ShortSellingNotAllowed = 136
Short selling is not allowed.
Implementations§
Source§impl ProtoOaErrorCode
impl ProtoOaErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ProtoOaErrorCode
impl Clone for ProtoOaErrorCode
Source§fn clone(&self) -> ProtoOaErrorCode
fn clone(&self) -> ProtoOaErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaErrorCode
impl Debug for ProtoOaErrorCode
Source§impl Default for ProtoOaErrorCode
impl Default for ProtoOaErrorCode
Source§fn default() -> ProtoOaErrorCode
fn default() -> ProtoOaErrorCode
Source§impl<'de> Deserialize<'de> for ProtoOaErrorCode
impl<'de> Deserialize<'de> for ProtoOaErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ProtoOaErrorCode> for i32
impl From<ProtoOaErrorCode> for i32
Source§fn from(value: ProtoOaErrorCode) -> i32
fn from(value: ProtoOaErrorCode) -> i32
Source§impl Hash for ProtoOaErrorCode
impl Hash for ProtoOaErrorCode
Source§impl Ord for ProtoOaErrorCode
impl Ord for ProtoOaErrorCode
Source§fn cmp(&self, other: &ProtoOaErrorCode) -> Ordering
fn cmp(&self, other: &ProtoOaErrorCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ProtoOaErrorCode
impl PartialEq for ProtoOaErrorCode
Source§impl PartialOrd for ProtoOaErrorCode
impl PartialOrd for ProtoOaErrorCode
Source§impl Serialize for ProtoOaErrorCode
impl Serialize for ProtoOaErrorCode
Source§impl TryFrom<i32> for ProtoOaErrorCode
impl TryFrom<i32> for ProtoOaErrorCode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<ProtoOaErrorCode, UnknownEnumValue>
fn try_from(value: i32) -> Result<ProtoOaErrorCode, UnknownEnumValue>
impl Copy for ProtoOaErrorCode
impl Eq for ProtoOaErrorCode
impl StructuralPartialEq for ProtoOaErrorCode
Auto Trait Implementations§
impl Freeze for ProtoOaErrorCode
impl RefUnwindSafe for ProtoOaErrorCode
impl Send for ProtoOaErrorCode
impl Sync for ProtoOaErrorCode
impl Unpin for ProtoOaErrorCode
impl UnwindSafe for ProtoOaErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.