diff --git a/pkg/exchange/max/maxapi/account.go b/pkg/exchange/max/maxapi/account.go index 02b1106a7..26ce9326a 100644 --- a/pkg/exchange/max/maxapi/account.go +++ b/pkg/exchange/max/maxapi/account.go @@ -11,7 +11,7 @@ import ( ) type AccountService struct { - client *RestClient + client requestgen.AuthenticatedAPIClient } // Account is for max rest api v2, Balance and Type will be conflict with types.PrivateBalanceUpdate diff --git a/pkg/exchange/max/maxapi/order.go b/pkg/exchange/max/maxapi/order.go index 004b0737e..fa76096b7 100644 --- a/pkg/exchange/max/maxapi/order.go +++ b/pkg/exchange/max/maxapi/order.go @@ -4,6 +4,8 @@ package max //go:generate -command PostRequest requestgen -method POST import ( + "github.com/c9s/requestgen" + "github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/types" ) @@ -57,7 +59,7 @@ type QueryOrderOptions struct { // OrderService manages the Order endpoint. type OrderService struct { - client *RestClient + client requestgen.AuthenticatedAPIClient } type SubmitOrder struct { diff --git a/pkg/exchange/max/maxapi/v3/order.go b/pkg/exchange/max/maxapi/v3/order.go index 3f5c89f91..df3a63a60 100644 --- a/pkg/exchange/max/maxapi/v3/order.go +++ b/pkg/exchange/max/maxapi/v3/order.go @@ -5,6 +5,8 @@ package v3 //go:generate -command DeleteRequest requestgen -method DELETE import ( + "github.com/c9s/requestgen" + maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi" ) @@ -18,5 +20,5 @@ type Account = maxapi.Account // OrderService manages the Order endpoint. type OrderService struct { - Client *maxapi.RestClient + Client requestgen.AuthenticatedAPIClient }