binanceclient

package
v0.15.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client - Binance struct that contains the client for API calls and a context cancellable function

func New

func New(apiKey, secretKey string) *Client

func (Client) FetchBinanceCandles

func (b Client) FetchBinanceCandles(pair string, start, end time.Time, interval int) ([]market.Candle, error)

FetchBinanceCandles takes the start and end dates, and the crypto pair as strings, and returns the Binance Candle data for every minute between start and end for a crypto pair

func (Client) FetchOrderBook

func (b Client) FetchOrderBook(pair string, options *api.GetOrderBookOptions) (goBinance.OrderBook, error)

func (Client) FetchTicker

func (b Client) FetchTicker(pair string) (*market.Ticker, error)

type Kline

type Kline struct {
	OpenTime  time.Time `json:"open_time"`
	Open      float64   `json:"open"`
	High      float64   `json:"high"`
	Low       float64   `json:"low"`
	Close     float64   `json:"close"`
	Volume    float64   `json:"volume"`
	CloseTime time.Time `json:"close_time"`
}

Jump to

Keyboard shortcuts

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