Skip to content

Conversation

@bigrand
Copy link

@bigrand bigrand commented Jan 28, 2026

This PR needs a bit of context.

Someone on Discord had a WTB order for this item where the SMA was around 122 plat, while people were buying it for ~70 plat. QF placed a WTB order around that lower price. Later on, someone raised the price to 110 plat, which was >= than the current WTS orders.

Instead of rejecting that increase, QF also raised its WTB order to 110 plat. In this case, the user had max_total_price_cap set to -1.

Issue

When Max Total Price Cap is disabled, it's still being used as a condition for multiple branches, even ones that aren't related to the knapsack logic. This causes all the price filters to be skipped.

What this PR does

This PR removes the max_total_price_cap checks from those unrelated branches and adds logging so it's clear why it was skipped.

bigrand and others added 3 commits January 27, 2026 23:47
Allows users to toggle the use of fake orders for live trading during debugging, enhancing testing capabilities. This feature reads/writes orders from the local file system, enabling controlled simulations.

Also, introduces file caching to improve performance when fake orders are enabled.
@bigrand bigrand changed the title Fix Max Total Price Cap logic and add Knapsack skip logging Add fake order simulation, fix Max Total Price Cap logic and add Knapsack skip logging Jan 28, 2026
@Kenya-DK Kenya-DK merged commit 85ce665 into Kenya-DK:better-backend Jan 29, 2026
2 checks passed
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.

2 participants