From 506a15ee70b365c1134dd47c9a6cf372eafa4bde Mon Sep 17 00:00:00 2001 From: Chris Heaney Date: Wed, 10 Jan 2024 07:40:35 -0500 Subject: [PATCH] use oracle orders --- programs/drift/src/state/order_params.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/drift/src/state/order_params.rs b/programs/drift/src/state/order_params.rs index eb47c5193..c590e2a24 100644 --- a/programs/drift/src/state/order_params.rs +++ b/programs/drift/src/state/order_params.rs @@ -133,14 +133,14 @@ impl OrderParams { let params = OrderParams { direction: direction_to_close, - order_type: OrderType::Limit, + order_type: OrderType::Oracle, market_index: market.market_index, base_asset_amount, reduce_only: true, auction_start_price: Some(estimated_offset_to_start), auction_end_price: Some(estimated_offset_to_close), auction_duration: Some(80), - oracle_price_offset: Some(0), + oracle_price_offset: Some(estimated_offset_to_close.cast()?), ..OrderParams::default() };