binance

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Endpoint          = "https://api.binance.com"
	WebsocketEndpoint = "wss://stream.binance.com:9443"
)

Variables

This section is empty.

Functions

func DecodeResponse

func DecodeResponse(resp *resty.Response) ([]byte, error)

func New

func New() exchange.Interface

func Request

func Request(ctx context.Context) *resty.Request

func UnmarshalResponse

func UnmarshalResponse(resp *resty.Response, v interface{}) error

Types

type Error

type Error struct {
	Code int    `json:"code,omitempty"`
	Msg  string `json:"msg,omitempty"`
}

func (*Error) Error

func (err *Error) Error() string

type Ticker

type Ticker struct {
	Timestamp   int64           `json:"E"`
	Event       string          `json:"e"`
	Symbol      string          `json:"s"`
	Close       decimal.Decimal `json:"c"`
	Open        decimal.Decimal `json:"o"`
	High        decimal.Decimal `json:"h"`
	Low         decimal.Decimal `json:"l"`
	BaseVolume  decimal.Decimal `json:"v"`
	QuoteVolume decimal.Decimal `json:"q"`
}

Jump to

Keyboard shortcuts

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