Skip to content

Commit

Permalink
feat(market data): stream option quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-hickey committed Oct 6, 2024
1 parent f8314e9 commit e4b2be9
Show file tree
Hide file tree
Showing 4 changed files with 509 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pub enum Error {
Json(serde_json::Error),
/// No symbol set when one was required.
SymbolNotSet,
/// No Option legs set when they were required.
OptionLegsNotSet,
/// TradeStation API Error for a bad request
BadRequest(String),
/// TradeStation API Error for an unauthorized request.
Expand Down Expand Up @@ -66,6 +68,7 @@ impl std::fmt::Display for Error {
Self::StopStream => write!(f, "WARNING: You've stopped a stream!"),
Self::Json(e) => write!(f, "JSON Error: {e:?}"),
Self::SymbolNotSet => write!(f, "ERROR: You need to set the symbol."),
Self::OptionLegsNotSet => write!(f, "ERROR: You need to set the option legs."),
Self::BadRequest(msg) => write!(f, "TradeStation API ERROR: {msg}"),
Self::Unauthorized(msg) => write!(f, "TradeStation API ERROR: {msg}"),
Self::Forbidden(msg) => write!(f, "TradeStation API ERROR: {msg}"),
Expand Down
1 change: 1 addition & 0 deletions src/market_data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub use bar::{
};
pub use options::{
OptionChain, OptionChainQuery, OptionChainQueryBuilder, OptionExpiration, OptionExpirationType,
OptionQouteLeg, OptionQuote, OptionQuoteQuery, OptionQuoteQueryBuilder,
OptionRiskRewardAnalysis, OptionSpreadStrikes, OptionSpreadStrikesQuery,
OptionSpreadStrikesQueryBuilder, OptionSpreadType, OptionTradeAction, OptionsLeg,
};
Expand Down
Loading

0 comments on commit e4b2be9

Please sign in to comment.