Skip to content

Nick/add scale orders ix#2093

Open
lowkeynicc wants to merge 8 commits intomasterfrom
nick/add-scale-orders-ix
Open

Nick/add scale orders ix#2093
lowkeynicc wants to merge 8 commits intomasterfrom
nick/add-scale-orders-ix

Conversation

@lowkeynicc
Copy link
Contributor

No description provided.

}

#[test]
fn test_ascending_size_distribution() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests looking great! With ascending and descending, and perhaps even flat, should we also test that the size of each order is the right proportion of the total base? This ensures the math is correct.

@@ -0,0 +1,266 @@
use crate::controller::position::PositionDirection;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the controller dir historically just for mutating account state

Since this a lot of validation and generating order params, i think itd be more consistent if you make these methods on the ScaledOrderParams struct

Since order_params state file is already pretty bloated, can make a new state file scaled_order_params for the struct + impl fns

let current_open_orders = user
.orders
.iter()
.filter(|o| o.status == OrderStatus::Open)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check order.is_available()

@lowkeynicc lowkeynicc marked this pull request as ready for review February 5, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants