account

package
v0.0.0-...-1d71415 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractAccountClient

type ContractAccountClient struct {
	*utils.ContractClient
	// contains filtered or unexported fields
}

func NewContractAccountClient

func NewContractAccountClient(cfg *utils.ContractClientCfg) (*ContractAccountClient, error)

func (*ContractAccountClient) GetAccountAsset

func (c *ContractAccountClient) GetAccountAsset(ctx context.Context, currency string) (*types.GetAccountAsset, error)

func (*ContractAccountClient) GetAccountAssets

func (c *ContractAccountClient) GetAccountAssets(ctx context.Context) (*types.GetAccountAssets, error)

func (*ContractAccountClient) GetOpenPositions

func (*ContractAccountClient) GetPositionLeverage

func (c *ContractAccountClient) GetPositionLeverage(ctx context.Context, param types.GetLeverageParams) (*types.GetLeverageResp, error)

func (*ContractAccountClient) SetPositionLeverage

func (c *ContractAccountClient) SetPositionLeverage(ctx context.Context, param types.SetLeverageParams) (*types.SetLeverageResp, error)

type ContractAccountClientCfg

type ContractAccountClientCfg struct {
	Debug bool
	// Logger
	Logger *slog.Logger

	BaseURL    string `validate:"required"`
	Key        string `validate:"required"`
	Secret     string `validate:"required"`
	RecvWindow int
	HTTPClient *http.Client
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL