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

How to cancel and settle funds for a specific order atomically? #234

Open
Danilo-Araujo-Silva opened this issue Apr 29, 2022 · 3 comments
Open

Comments

@Danilo-Araujo-Silva
Copy link

How can we cancel and settle the funds for just only one specific order at once? Preferably in an atomic method?

For example, we have this documentation here:
https://github.com/project-serum/serum-ts/tree/master/packages/serum

But we only have the option to cancel an order separately and then settle the funds for all of the orders for a market, with two API calls.

How can we do that using just one method that would guarantee to us that the order was canceled and the funds have returned?

@mindrunner
Copy link

Shouldn't it be either canceling or settling? In what way does it make sense to settle a canceled order?

@Danilo-Araujo-Silva
Copy link
Author

Shouldn't it be either canceling or settling? In what way does it make sense to settle a canceled order?

Because if you cancel and do not settle the funds, your funds become locked, and you can't reuse it to place a new order.
So it would be better to have an option that cancel the order but automatically free the funds for reuse.

@mindrunner
Copy link

I see, that makes sense. I guess it might be possible to create a transaction with cancel and settle instructions then to achieve what you want.

Is there a way to see if there are 'locked' funds which need to be settled?

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

No branches or pull requests

2 participants