binance

package
v0.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PairStatusPreTrading   = "PRE_TRADING"
	PairStatusTrading      = "TRADING"
	PairStatusPostTrading  = "POST_TRADING"
	PairStatusEndOfDay     = "END_OF_DAY"
	PairStatusHalt         = "HALT"
	PairStatusAuctionMatch = "AUCTION_MATCH"
	PairStatusBreak        = "BREAK"
)
View Source
const (
	Endpoint = "https://api.binance.com/api/v3"
)

Variables

This section is empty.

Functions

func DecodeResponse

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

func New

func New() core.Exchange

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 Pair added in v0.0.6

type Pair struct {
	Symbol     string     `json:"symbol,omitempty"`
	Status     PairStatus `json:"status,omitempty"`
	BaseAsset  string     `json:"baseAsset,omitempty"`
	QuoteAsset string     `json:"quoteAsset,omitempty"`
}

type PairStatus added in v0.0.6

type PairStatus string

type Price added in v0.0.6

type Price struct {
	Symbol string          `json:"symbol,omitempty"`
	Price  decimal.Decimal `json:"price,omitempty"`
}

Jump to

Keyboard shortcuts

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