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

SO save orders for visualization purposes #636

Closed
bitphage opened this issue Jul 26, 2019 · 7 comments
Closed

SO save orders for visualization purposes #636

bitphage opened this issue Jul 26, 2019 · 7 comments

Comments

@bitphage
Copy link
Collaborator

There was a telegram discussion regarding #609. As I understand, visualization code requires:

  • state of initial orders on SO worker
  • state of current worker orders
@Jackodb
Copy link
Collaborator

Jackodb commented Jul 26, 2019

It would be very helpful if initial orders and current orders could be kept apart from each other in some way.

@bitphage
Copy link
Collaborator Author

The main proposed solution was to dump orders into database. Along with the described requirements, there are also #442 task to keep virtual orders in state. It's good time to fit everything now.

So basically we have two order types to save:

  • initial
  • current

Both of these types could also be a real or virtual order.

Current Orders table structure doesn't fit specified requirements. The following changes are needed:

  • Add column "Virtual" type bool. True indicates that saved order is virtual
  • Add column "Custom" type String to store any custom data, this column could be used by any strategy later. Specifically, SO may store here indicators "initial" or "current"

@Jackodb
Copy link
Collaborator

Jackodb commented Jul 26, 2019

The orders you would dump into database are like the output orders you get when calling Account.openorders right? So I hope that includes things like 'for_sale', 'price', etc. since I need that information in my visualisation plot too (i.e., price, whether it's base or quote).

I like the addition of virtual orders since I prefer plotting all the worker's orders, not only the real ones.

@bitphage
Copy link
Collaborator Author

Yes, the full Order object is dumped.

@bitphage bitphage added the epic label Jul 29, 2019
@bitphage
Copy link
Collaborator Author

Because we're going to modify table structure, we need a way to upgrade existing dexbot installations without breaking database. I'm experimenting with alembic to handle database migrations.

@PermieBTS
Copy link
Collaborator

Can this save orders dev also saved virtual order state on restart?
#442

@bitphage
Copy link
Collaborator Author

bitphage commented Aug 6, 2019

Yes, it will be integrated. Progress is here https://github.com/Codaone/DEXBot/projects/15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants