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

Cancel openbook v2 order by client order id #969

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

brittcyr
Copy link
Contributor

@brittcyr brittcyr commented Jun 4, 2024

Allow users to cancel orders to openbook v2 using the client order id so they dont have to keep track of exchange order ids

// Check instruction gate. Guarded by the same as cancelling by exchange id.
let group = ctx.accounts.group.load()?;
require!(
group.is_ix_enabled(IxGate::OpenbookV2CancelOrder),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For perp we have a dedicated ix_gate for cancel by client id, maybe add one here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could if you want. dont do it in serum3 though.
would require duplicating the account_ix file because it would be a new constraint

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok can probably keep like this, thx

@farnyser farnyser merged commit f7bb495 into blockworks-foundation:dev Jun 5, 2024
16 of 17 checks passed
@brittcyr brittcyr deleted the brittcyr/client-id branch June 10, 2024 14:15
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