-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/app: A few fixes and clean-ups #2295
Conversation
also, pipe logs into file Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
This is needed so that one can open/close/open/close quickly after each other without using all the liquidity. This is done in at least 1 e2e test Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
this ensures we always have orders in the orderbook Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
for better readability Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Only nit: e4ab959 should be titled "filter out expired orders".
crates/commons/src/price.rs
Outdated
fn best_bid_price(orders: &[Order], symbol: ContractSymbol) -> Option<Decimal> { | ||
orders | ||
.iter() | ||
.filter(|o| { | ||
o.order_state == OrderState::Open | ||
&& o.direction == Direction::Long | ||
&& o.contract_symbol == symbol | ||
}) | ||
.map(|o| o.price) | ||
.max() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This should help with flaky e2e tests and improve the dev experience as well as fix a problem where we saw expired orders in the app.