Skip to content
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

Deal with order unavailability in the 10101 app #860

Closed
4 tasks done
klochowicz opened this issue Jun 29, 2023 · 7 comments · Fixed by #923
Closed
4 tasks done

Deal with order unavailability in the 10101 app #860

klochowicz opened this issue Jun 29, 2023 · 7 comments · Fixed by #923
Assignees
Milestone

Comments

@klochowicz
Copy link
Contributor

klochowicz commented Jun 29, 2023

Ideally we should:

  • have an status indicator whether the coordinator / orderbook is online
  • react accordingly if there's no order
  • reset all the values (best price, fees etc) when it's offline to prevent stale values.
  • if there's an open position, adjust the PnL and other values depending on current price / orders (e.g. show N/A).

Follow-up from #859 - where we can finally express lack of values from coordinator, but we still don't clear them when the node is offline.

@klochowicz klochowicz changed the title Deal with coordinator unavailability in the 10101 app Deal with order unavailability in the 10101 app Jun 29, 2023
@klochowicz klochowicz self-assigned this Jun 29, 2023
@klochowicz klochowicz added this to the 1.1.0 milestone Jun 29, 2023
@klochowicz
Copy link
Contributor Author

@holzeis I've included this ticket into the iteration as it clearly stems from removing the dummy price values one (and there's nothing to grab there anymore).

@klochowicz
Copy link
Contributor Author

this task has exploded considerably, it turns out that there's no place is the system where we prune the expired orders.
I'm currently working on a PoC that will allow that.

@bonomat
Copy link
Contributor

bonomat commented Jul 7, 2023

this task has exploded considerably, it turns out that there's no place is the system where we prune the expired orders. I'm currently working on a PoC that will allow that.

Depends on what you mean with this. The orderbook is not considering outdated orders:

let all_non_expired_orders = orders::all_by_direction_and_type(
&mut conn,
order.direction.opposite(),
OrderType::Limit,
false,
true,
)

@bonomat
Copy link
Contributor

bonomat commented Jul 7, 2023

this task has exploded considerably,

Please ping and discuss (with anyone) before you fall down the rabbit hole of refactoring the universe and everything.

@klochowicz
Copy link
Contributor Author

this task has exploded considerably, it turns out that there's no place is the system where we prune the expired orders. I'm currently working on a PoC that will allow that.

I was referring to the task, as it assumed that everything was in place for the task to be done - the backend was noticing / cleaning the orders if the coordinator or maker went offline.

Depends on what you mean with this. The orderbook is not considering outdated orders:

let all_non_expired_orders = orders::all_by_direction_and_type(
&mut conn,
order.direction.opposite(),
OrderType::Limit,
false,
true,
)

that only happens in context of a POST request. if the maker is not online, this is not filtered.

@klochowicz
Copy link
Contributor Author

this task has exploded considerably,

Please ping and discuss (with anyone) before you fall down the rabbit hole of refactoring the universe and everything.

I have in fact reached out on matrix first before I flagged this.

@klochowicz klochowicz linked a pull request Jul 7, 2023 that will close this issue
2 tasks
@klochowicz
Copy link
Contributor Author

as for the status: when there's no active active orders (e.g. maker / coordinator ar down), we grey out the buy/sell buttons.

It's not best indicator, but it is an indicator. I would love if we started an error feed for the subscribers, so we could push them to the app.

@bors bors bot closed this as completed in #923 Jul 12, 2023
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 a pull request may close this issue.

2 participants