Skip to content

Commit 701897f

Browse files
authored
Merge pull request #6 from Overmuse/SR/upgrade_alpaca
upgrade alpaca version
2 parents fc4c299 + d734672 commit 701897f

File tree

3 files changed

+140
-12
lines changed

3 files changed

+140
-12
lines changed

Cargo.lock

Lines changed: 137 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "reporting"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Sebastian Rollen <seb@overmu.se>"]
55
edition = "2018"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
alpaca = { tag = "v0.7.0", git = "ssh://git@github.com/Overmuse/alpaca" }
10+
alpaca = { tag = "v0.9.0", git = "ssh://git@github.com/Overmuse/alpaca" }
1111
anyhow = "1.0.41"
1212
config = "0.11.0"
1313
dotenv = "0.15.0"

src/domain/orders.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn handle_alpaca_message(message: AlpacaMessage) {
3838
if let Event::Fill { price, .. } = order_update.event {
3939
debug!("Received order fill update, generating metrics");
4040
let ticker = order_update.order.symbol;
41-
let qty = order_update.order.qty.unwrap();
41+
let qty = Decimal::from_usize(order_update.order.qty).unwrap();
4242
NUM_TRADES.with_label_values(&[&ticker]).inc();
4343
GROSS_TRADE_AMOUNT
4444
.with_label_values(&[&ticker])

0 commit comments

Comments
 (0)