bitgetapi

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const PrivateWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
View Source
const PublicWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
View Source
const RestBaseURL = "https://api.bitget.com"

Variables

This section is empty.

Functions

func Sign added in v1.54.0

func Sign(payload string, secret string) string

Types

type APIResponse

type APIResponse struct {
	Code    string          `json:"code"`
	Message string          `json:"msg"`
	Data    json.RawMessage `json:"data"`
}

func (APIResponse) Error added in v1.54.0

func (a APIResponse) Error() error

func (APIResponse) Validate added in v1.54.0

func (a APIResponse) Validate() error

type RestClient

type RestClient struct {
	requestgen.BaseAPIClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *RestClient

func (*RestClient) Auth

func (c *RestClient) Auth(key, secret, passphrase string)

func (*RestClient) NewAuthenticatedRequest

func (c *RestClient) NewAuthenticatedRequest(
	ctx context.Context, method, refURL string, params url.Values, payload interface{},
) (*http.Request, error)

newAuthenticatedRequest creates new http request for authenticated routes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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