maxapi: replace client field type with interface

This commit is contained in:
c9s 2022-08-10 15:22:04 +08:00
parent c5e93dba00
commit 6f35aa0f20
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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
}