Skip to content

Commit

Permalink
reducing price to 100 for all tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
godmodegalactus committed Sep 3, 2024
1 parent d1d61c4 commit 3b7a358
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/market_markers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ pub fn create_ask_bid_transaction(
prioritization_fee: u64,
) -> Transaction {
let mango_account_signer_pk = to_sp_pk(&mango_account_signer.pubkey());
let offset = rand::random::<i8>() as i64;
let spread = rand::random::<u8>() as i64;
let price = 100;
let offset = rand::random::<i8>() as i64 % 20;
let spread = rand::random::<u8>() as i64 % 10;
debug!(
"price:{:?} price_quote_lots:{:?} order_base_lots:{:?} offset:{:?} spread:{:?}",
c.price, c.price_quote_lots, c.order_base_lots, offset, spread
Expand Down Expand Up @@ -82,7 +83,7 @@ pub fn create_ask_bid_transaction(
None,
&[],
Side::Bid,
c.price_quote_lots + offset - spread,
price + offset - spread,
c.order_base_lots,
i64::MAX,
Utc::now().timestamp_micros() as u64,
Expand Down Expand Up @@ -110,7 +111,7 @@ pub fn create_ask_bid_transaction(
None,
&[],
Side::Ask,
c.price_quote_lots + offset + spread,
price + offset + spread,
c.order_base_lots,
i64::MAX,
Utc::now().timestamp_micros() as u64,
Expand Down

0 comments on commit 3b7a358

Please sign in to comment.