Skip to content

Commit

Permalink
Merge pull request #24 from Overmuse/SR/update_trading_base
Browse files Browse the repository at this point in the history
upgrade trading_base
  • Loading branch information
SebRollen authored Jul 26, 2021
2 parents 04c5e78 + 3e85e98 commit e6b9c44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jump-diffusion"
version = "0.8.0"
version = "0.9.0"
authors = ["Sebastian Rollen <[email protected]>"]
edition = "2018"

Expand All @@ -25,4 +25,4 @@ statrs = "0.13"
tokio = { version = "1.6", features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
tracing-subscriber = "0.2"
trading-base = { git = "ssh://[email protected]/Overmuse/trading-base", tag = "v0.1.0" }
trading-base = { git = "ssh://[email protected]/Overmuse/trading-base", tag = "v0.2.0" }
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rdkafka::producer::FutureRecord;
use rust_decimal::prelude::*;
use tracing::{debug, error, info, subscriber::set_global_default};
use tracing_subscriber::EnvFilter;
use trading_base::{AmountSpec, PositionIntent};
use trading_base::{Amount, PositionIntent};

mod aggregates;
mod data;
Expand Down Expand Up @@ -125,7 +125,7 @@ async fn main() -> Result<()> {
let intent = PositionIntent::builder(
"jump-diffusion",
stock.ticker.clone(),
AmountSpec::Dollars(dollars),
Amount::Dollars(dollars),
)
.before(Utc::now() + Duration::minutes(30))
.limit_price(limit_price)
Expand All @@ -137,7 +137,7 @@ async fn main() -> Result<()> {
.unwrap()
.with_timezone(&Utc);
let close_intent =
PositionIntent::builder("jump-diffusion", stock.ticker.clone(), AmountSpec::Zero)
PositionIntent::builder("jump-diffusion", stock.ticker.clone(), Amount::Zero)
.after(close_time)
.build()?;
for i in vec![intent, close_intent] {
Expand Down

0 comments on commit e6b9c44

Please sign in to comment.