From d550273b01ca184ce53c6c70cf41d0228ddc474d Mon Sep 17 00:00:00 2001 From: Artur Abelian Date: Tue, 26 Nov 2024 11:36:33 +0100 Subject: [PATCH] feat: added getter for parameters of request (for testing needs) --- v2/futures/order_cancel_service_ws.go | 4 ++++ v2/futures/order_place_service_ws.go | 4 ++++ v2/order_service_ws_create.go | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/v2/futures/order_cancel_service_ws.go b/v2/futures/order_cancel_service_ws.go index 7ff7eb68..f47bfae8 100644 --- a/v2/futures/order_cancel_service_ws.go +++ b/v2/futures/order_cancel_service_ws.go @@ -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{ diff --git a/v2/futures/order_place_service_ws.go b/v2/futures/order_place_service_ws.go index 8cb8f66f..40605cba 100644 --- a/v2/futures/order_place_service_ws.go +++ b/v2/futures/order_place_service_ws.go @@ -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{ diff --git a/v2/order_service_ws_create.go b/v2/order_service_ws_create.go index 9940b035..30d93eb4 100644 --- a/v2/order_service_ws_create.go +++ b/v2/order_service_ws_create.go @@ -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{