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

Batch Order cancellation for spot and derivatives #23

Closed
albertchon opened this issue Jun 17, 2021 · 1 comment
Closed

Batch Order cancellation for spot and derivatives #23

albertchon opened this issue Jun 17, 2021 · 1 comment
Assignees
Labels
feature New feature request

Comments

@albertchon
Copy link
Member

albertchon commented Jun 17, 2021

The UI should allow the trader to cancel all of his open orders in a given market on the trading page. Eventually on the portfolio page, we should add a button allowing the trader to cancel all his open orders across all markets.

The new Msg types to batch cancel orders are MsgBatchCancelDerivativeOrders and MsgBatchCancelSpotOrders which are defined as follows:

// MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders response type.
type MsgBatchCancelDerivativeOrders struct {
	Sender string      
	Data   []OrderData 
}

and

// MsgBatchCancelSpotOrders defines the Msg/BatchCancelSpotOrders response type.
type MsgBatchCancelSpotOrders struct {
	Sender string      
	Data   []OrderData 
}

where the OrderData is defined as:

type OrderData struct {
	MarketId     string 
	SubaccountId string 
	OrderHash    string 
}
@albertchon
Copy link
Member Author

Add a "Cancel All" button on the orders panel that cancels all orders from the current market.

@bangjelkoski bangjelkoski added the feature New feature request label Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants