diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a2cc7..275deb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Unreleased subcommand - Adjusted build script to handle non-existent `git` command or repository gracefully -- Bumped `apca` dependency to `0.23.0` +- Bumped `apca` dependency to `0.24.0` 0.1.4 diff --git a/Cargo.toml b/Cargo.toml index dd0d2f9..7b2dbf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ path = "utils/shell-complete.rs" anyhow = {version = "1.0", default-features = false, features = ["std"]} [dependencies] -apca = "0.23.0" +apca = "0.24.0" anyhow = {version = "1.0", default-features = false, features = ["std"]} chrono = {version = "0.4", default-features = false} chrono-tz = {version = "0.6.1", default-features = false, features = ["std"]} diff --git a/src/main.rs b/src/main.rs index 66790ac..5c1b44b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -555,25 +555,25 @@ fn format_date(time: DateTime) -> Str { time.date().format("%Y-%m-%d").to_string().into() } -fn format_trade_status(status: updates::TradeStatus) -> &'static str { +fn format_trade_status(status: updates::OrderStatus) -> &'static str { match status { - updates::TradeStatus::New => "new", - updates::TradeStatus::Replaced => "replaced", - updates::TradeStatus::ReplaceRejected => "replace rejected", - updates::TradeStatus::PartialFill => "partially filled", - updates::TradeStatus::Filled => "filled", - updates::TradeStatus::DoneForDay => "done for day", - updates::TradeStatus::Canceled => "canceled", - updates::TradeStatus::CancelRejected => "cancel rejected", - updates::TradeStatus::Expired => "expired", - updates::TradeStatus::PendingCancel => "pending cancel", - updates::TradeStatus::Stopped => "stopped", - updates::TradeStatus::Rejected => "rejected", - updates::TradeStatus::Suspended => "suspended", - updates::TradeStatus::PendingNew => "pending new", - updates::TradeStatus::PendingReplace => "pending replace", - updates::TradeStatus::Calculated => "calculated", - updates::TradeStatus::Unknown => "unknown", + updates::OrderStatus::New => "new", + updates::OrderStatus::Replaced => "replaced", + updates::OrderStatus::ReplaceRejected => "replace rejected", + updates::OrderStatus::PartialFill => "partially filled", + updates::OrderStatus::Filled => "filled", + updates::OrderStatus::DoneForDay => "done for day", + updates::OrderStatus::Canceled => "canceled", + updates::OrderStatus::CancelRejected => "cancel rejected", + updates::OrderStatus::Expired => "expired", + updates::OrderStatus::PendingCancel => "pending cancel", + updates::OrderStatus::Stopped => "stopped", + updates::OrderStatus::Rejected => "rejected", + updates::OrderStatus::Suspended => "suspended", + updates::OrderStatus::PendingNew => "pending new", + updates::OrderStatus::PendingReplace => "pending replace", + updates::OrderStatus::Calculated => "calculated", + updates::OrderStatus::Unknown => "unknown", } } @@ -645,7 +645,7 @@ async fn stream_trade_updates(client: Client) -> Result<()> { .currency; let (stream, _subscription) = client - .subscribe::() + .subscribe::() .await .with_context(|| "failed to subscribe to trade updates")?;