pub enum Error {
Show 28 variants
InvalidToken,
TokenConfig(String),
AccountNotFound,
PositionNotFound(String, String),
Request(Error),
BoxedError(Box<dyn StdErrorTrait + Send + Sync>),
Url(ParseError),
StreamIssue(String),
StopStream,
Json(Error),
IoError(Error),
SymbolNotSet,
AccountIdNotSet,
TradeActionNotSet,
TimeInForceNotSet,
OrderTypeNotSet,
OrderNotFound(String),
QuantityNotSet,
OptionLegsNotSet,
OrderRequestsNotSet,
OrderGroupTypeNotSet,
BadRequest(String),
Unauthorized(String),
Forbidden(String),
TooManyRequests(String),
InternalServerError(String),
GatewayTimeout(String),
UnknownTradeStationAPIError(String),
}Expand description
The tradestation-rs error type. TradeStation API Client Error
Variants§
InvalidToken
Issue with your current Token the Client is using.
TokenConfig(String)
Issue building a Token.
AccountNotFound
An Account was not found for a given account id.
PositionNotFound(String, String)
A Position was not found for a given position id.
Request(Error)
An HTTP request error.
BoxedError(Box<dyn StdErrorTrait + Send + Sync>)
Url(ParseError)
An error during URL parsing.
StreamIssue(String)
Error while in stream
StopStream
Use this to stop a stream connection.
Json(Error)
Error with JSON serializing or deseializing.
IoError(Error)
Issue reading a stream
SymbolNotSet
No symbol set when one was required.
AccountIdNotSet
Account Id not set when one was required.
TradeActionNotSet
Trade Action not set when one was required.
TimeInForceNotSet
Time In Force not set when one was required.
OrderTypeNotSet
Order Type not set when one was required.
OrderNotFound(String)
An crate::orders::Order was not found for a give order id.
QuantityNotSet
Quantity not set when one was required.
OptionLegsNotSet
No Option legs set when they were required.
OrderRequestsNotSet
Order Requests not set when they’re required.
OrderGroupTypeNotSet
Order Group Type not set when it’s required.
BadRequest(String)
TradeStation API Error for a bad request
TradeStation API Error for an unauthorized request.
Forbidden(String)
TradeStation API Error for a forbidden request.
TooManyRequests(String)
TradeStation API Error for too many requests.
InternalServerError(String)
TradeStation API Error for an internal server error.
GatewayTimeout(String)
TradeStation API Error for a gateway timeout.
UnknownTradeStationAPIError(String)
TradeStation API Error for an unkown error.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Box<dyn Error + Send + Sync>> for Error
Implement error conversion (<Box<dyn StdErrorTrait + Send + Sync>> -> Error)
impl From<Box<dyn Error + Send + Sync>> for Error
Implement error conversion (<Box<dyn StdErrorTrait + Send + Sync>> -> Error)
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.