pub enum ErrorCode {
Show 24 variants
Unauthorized,
TokenInvalid,
RateLimitExceeded,
InternalError,
OrderIdempotencyViolation,
PinMissing,
PinNotSet,
PinInvalid,
WithdrawInsufficientFunds,
WithdrawLimitExceeded,
WithdrawRequestLimitExceeded,
ForbiddenInCurrentState,
PlanNotAllowed,
InsufficientHoldings,
OrderExpirationDateInvalid,
OrderTotalPriceLimitExceeded,
ForbiddenForVenue,
TradingDisabled,
OrderLimitExceeded,
InstrumentNotTradable,
AccountInsufficientFunds,
TradingBlocked,
OrderNotInactive,
OrderNotTerminated,
}
Expand description
Error codes for the Lemon API
Variants
Unauthorized
The API key is not provided in the HTTP header, cannot be decoded by the backend, or the API Key does not exist.
TokenInvalid
The API key is revoked or user is deleted/suspended.
RateLimitExceeded
The API key has exceeded its rate limit. Please respect the value of the Retry-After header before performing another request.
InternalError
An error occurred in the backend. This is not your fault. We will investigate this.
OrderIdempotencyViolation
Same idempotency has been used within current 7 day period.
PinMissing
Cannot withdraw money because the PIN is not provided in the request (money only).
PinNotSet
Cannot withdraw money because the PIN is not set (money only)
PinInvalid
Cannot withdraw money because the pin verification failed
WithdrawInsufficientFunds
Cannot withdraw money because there are insufficient funds on the account
WithdrawLimitExceeded
Cannot withdraw money because the daily payout limit is exceeded
WithdrawRequestLimitExceeded
Cannot withdraw money because the maximal daily request limit is exceeded
ForbiddenInCurrentState
Cannot update address_country when trading is enabled or user is onboarded
PlanNotAllowed
Cannot update trading plan to basic/pro
InsufficientHoldings
insufficient instrument holdings [on order sell]
OrderExpirationDateInvalid
cannot place order if one expires before market opens again
OrderTotalPriceLimitExceeded
cannot place/activate buy order if estimated total price is greater than 25k Euro
ForbiddenForVenue
cannot place order in ALLDAY for MONEY env
TradingDisabled
cannot place order if trading is not enabled
OrderLimitExceeded
maximum daily amount of orders reached
InstrumentNotTradable
failed to place order if instrument is not tradable
AccountInsufficientFunds
cannot place/activate buy order because of insufficient account funds
TradingBlocked
cannot place/activate order because trading is blocked globally
OrderNotInactive
cannot activate order if its status != inactive
OrderNotTerminated
cannot delete order if its not in cancelling/cancelled/expired/executed/rejected state
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more