binance

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TradeParam added in v0.3.0

func TradeParam(symbol string, st int64, et int64, fid int64, limit int) url.Values

Types

type APIError

type APIError struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

APIError error message

func (*APIError) ECode added in v0.5.5

func (ae *APIError) ECode() int

func (*APIError) EMessage added in v0.5.5

func (ae *APIError) EMessage() string

func (*APIError) Error

func (ae *APIError) Error() string

func (*APIError) Is

func (ae *APIError) Is(target interface{}) bool

type APIIF added in v0.5.5

type APIIF interface {
	ECode() int
	EMessage() string
}

type GetRestReq added in v0.5.4

type GetRestReq interface {
	Values() (url.Values, error)
}

type ListenKeyClient added in v0.5.4

type ListenKeyClient interface {
	GetListenKeyAddr(ctx context.Context) (string, error)
	PersistListenKey(ctx context.Context) error
	DeleteListenKey(ctx context.Context) error
}

type RestClient

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

Binance Rest client instance

func NewRestClient

func NewRestClient(key, secret, host string) *RestClient

func (*RestClient) GetRequest added in v0.5.4

func (rc *RestClient) GetRequest(ctx context.Context, endPoint string, req GetRestReq, sign bool, dst interface{}) error

GetRequest helper method to send http GET request

func (*RestClient) Request

func (rc *RestClient) Request(ctx context.Context, method, endPoint string, param url.Values, data io.Reader, signed bool, dst interface{}) error

type RestReq added in v0.5.4

type RestReq struct {
	*exchange.RestReq
}

RestReq basic binance rest request instance add recvWindow param support

func NewRestReq added in v0.5.4

func NewRestReq() *RestReq

func (*RestReq) RecvWindow added in v0.5.4

func (rr *RestReq) RecvWindow(window int) *RestReq

type WSClient added in v0.5.4

type WSClient struct {
	rpc.Conn
	// contains filtered or unexported fields
}

func NewWSClient added in v0.5.4

func NewWSClient(codec rpc.Codec, handler rpc.Handler, client ListenKeyClient) *WSClient

func (*WSClient) Run added in v0.5.4

func (ws *WSClient) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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