From 3b7a35831687809a0ab5db73ceda3947595e0e70 Mon Sep 17 00:00:00 2001 From: Godmode Galactus Date: Tue, 3 Sep 2024 21:12:17 +0200 Subject: [PATCH] reducing price to 100 for all tokens --- src/market_markers.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/market_markers.rs b/src/market_markers.rs index 47c4d96..9b8bbf5 100644 --- a/src/market_markers.rs +++ b/src/market_markers.rs @@ -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::() as i64; - let spread = rand::random::() as i64; + let price = 100; + let offset = rand::random::() as i64 % 20; + let spread = rand::random::() 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 @@ -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, @@ -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,