Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 3b7a358

Browse files
reducing price to 100 for all tokens
1 parent d1d61c4 commit 3b7a358

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/market_markers.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ pub fn create_ask_bid_transaction(
4040
prioritization_fee: u64,
4141
) -> Transaction {
4242
let mango_account_signer_pk = to_sp_pk(&mango_account_signer.pubkey());
43-
let offset = rand::random::<i8>() as i64;
44-
let spread = rand::random::<u8>() as i64;
43+
let price = 100;
44+
let offset = rand::random::<i8>() as i64 % 20;
45+
let spread = rand::random::<u8>() as i64 % 10;
4546
debug!(
4647
"price:{:?} price_quote_lots:{:?} order_base_lots:{:?} offset:{:?} spread:{:?}",
4748
c.price, c.price_quote_lots, c.order_base_lots, offset, spread
@@ -82,7 +83,7 @@ pub fn create_ask_bid_transaction(
8283
None,
8384
&[],
8485
Side::Bid,
85-
c.price_quote_lots + offset - spread,
86+
price + offset - spread,
8687
c.order_base_lots,
8788
i64::MAX,
8889
Utc::now().timestamp_micros() as u64,
@@ -110,7 +111,7 @@ pub fn create_ask_bid_transaction(
110111
None,
111112
&[],
112113
Side::Ask,
113-
c.price_quote_lots + offset + spread,
114+
price + offset + spread,
114115
c.order_base_lots,
115116
i64::MAX,
116117
Utc::now().timestamp_micros() as u64,

0 commit comments

Comments
 (0)