Skip to content

Commit

Permalink
Update apca dependency to 0.24.0
Browse files Browse the repository at this point in the history
This change updates the apca dependency that we consume to version
0.24.0.
  • Loading branch information
d-e-s-o committed Apr 2, 2022
1 parent cde9d09 commit 840a29c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
Expand Down
38 changes: 19 additions & 19 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,25 +555,25 @@ fn format_date(time: DateTime<Utc>) -> 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",
}
}

Expand Down Expand Up @@ -645,7 +645,7 @@ async fn stream_trade_updates(client: Client) -> Result<()> {
.currency;

let (stream, _subscription) = client
.subscribe::<updates::TradeUpdates>()
.subscribe::<updates::OrderUpdates>()
.await
.with_context(|| "failed to subscribe to trade updates")?;

Expand Down

0 comments on commit 840a29c

Please sign in to comment.