utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL     = "https://api.bybit.com"
	TestBaseURL = "https://api-testnet.bybit.com"
)

Functions

This section is empty.

Types

type BybitClient

type BybitClient struct {
	// contains filtered or unexported fields
}

func NewBybitClient

func NewBybitClient(cfg *BybitClientCfg) (*BybitClient, error)

func (*BybitClient) GenAuthHeaders

func (bb *BybitClient) GenAuthHeaders(req utils.HTTPRequest) (map[string]string, error)

func (*BybitClient) GetBaseURL

func (bb *BybitClient) GetBaseURL() string

func (*BybitClient) GetDebug

func (bb *BybitClient) GetDebug() bool

func (*BybitClient) GetKey

func (bb *BybitClient) GetKey() string

func (*BybitClient) GetRecvWindow

func (bb *BybitClient) GetRecvWindow() int

func (*BybitClient) GetSecret

func (bb *BybitClient) GetSecret() string

func (*BybitClient) SendHTTPRequest

func (bb *BybitClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)

type BybitClientCfg

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

	BaseURL    string `validate:"required"`
	Key        string
	Secret     string
	RecvWindow int
}

Jump to

Keyboard shortcuts

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