Skip to content

Conversation

@m-sz
Copy link
Contributor

@m-sz m-sz commented Dec 29, 2025

Description

The create_order API has been experiencing bad latency lately. One step of creating an order is to check the amount of currently active limit orders. The query for that runs for extended amounts of time.

Changes

Optimizes user_orders_with_quote by calculating sell and buy amounts only in the last WHERE statement, meaning for orders that were already filtered for. This is a more efficient approach that should yield the same results.

How to test

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