Skip to content

Commit

Permalink
feat: added getter for parameters of request (for testing needs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Abelian committed Nov 26, 2024
1 parent 0d0d7ba commit d550273
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v2/futures/order_cancel_service_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func (s *OrderCancelRequest) OrigClientOrderID(origClientOrderID string) *OrderC
return s
}

func (r *OrderCancelRequest) GetParams() map[string]interface{} {
return r.buildParams()
}

// buildParams builds params
func (s *OrderCancelRequest) buildParams() params {
m := params{
Expand Down
4 changes: 4 additions & 0 deletions v2/futures/order_place_service_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ type CreateOrderWsResponse struct {
Error *common.APIError `json:"error,omitempty"`
}

func (r *OrderPlaceWsRequest) GetParams() map[string]interface{} {
return r.buildParams()
}

// buildParams builds params
func (s *OrderPlaceWsRequest) buildParams() params {
m := params{
Expand Down
4 changes: 4 additions & 0 deletions v2/order_service_ws_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func NewOrderCreateWsRequest() *OrderCreateWsRequest {
return &OrderCreateWsRequest{}
}

func (s *OrderCreateWsRequest) GetParams() map[string]interface{} {
return s.buildParams()
}

// buildParams builds params
func (s *OrderCreateWsRequest) buildParams() params {
m := params{
Expand Down

0 comments on commit d550273

Please sign in to comment.