client

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertKline

func ConvertKline(kline *externalClient.Kline) (*binance.Kline, error)

func ConvertWSKline

func ConvertWSKline(wsKline *externalClient.WsKline) (*binance.Kline, error)

func ConvertWSKlineEvent

func ConvertWSKlineEvent(event *externalClient.WsKlineEvent) (*binance.KlineEvent, error)

func New

func New(ctx context.Context, apiKey, secretKey string, logger *zap.Logger) binance.Client

Types

type Client

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

func (*Client) Account

func (c *Client) Account(_ context.Context, _ binance.AccountRequest) (*binance.Account, error)

func (*Client) AggTrades

func (c *Client) AggTrades(context.Context, binance.AggTradesRequest) ([]*binance.AggTrade, error)

func (*Client) AllOrders

func (c *Client) AllOrders(_ context.Context, _ binance.AllOrdersRequest) ([]*binance.ExecutedOrder, error)

func (*Client) CancelOrder

func (c *Client) CancelOrder(_ context.Context, _ binance.CancelOrderRequest) (*binance.CanceledOrder, error)

func (*Client) CloseUserDataStream

func (c *Client) CloseUserDataStream(_ context.Context, _ *binance.Stream) error

func (*Client) DepositHistory

func (c *Client) DepositHistory(_ context.Context, _ binance.HistoryRequest) ([]*binance.Deposit, error)

func (*Client) DepthWebsocket

func (c *Client) DepthWebsocket(_ context.Context, _ binance.DepthWebsocketRequest) (chan *binance.DepthEvent, chan struct{}, error)

func (*Client) KeepAliveUserDataStream

func (c *Client) KeepAliveUserDataStream(_ context.Context, _ *binance.Stream) error

func (*Client) KlineWebsocket

func (c *Client) KlineWebsocket(ctx context.Context, kwr binance.KlineWebsocketRequest) (chan *binance.KlineEvent, chan struct{}, error)

func (*Client) Klines

func (c *Client) Klines(ctx context.Context, kr binance.KlinesRequest) ([]*binance.Kline, error)

func (*Client) MyTrades

func (c *Client) MyTrades(_ context.Context, _ binance.MyTradesRequest) ([]*binance.Trade, error)

func (*Client) NewOrder

func (c *Client) NewOrder(context.Context, binance.NewOrderRequest) (*binance.ProcessedOrder, error)

func (*Client) NewOrderTest

func (c *Client) NewOrderTest(context.Context, binance.NewOrderRequest) error

func (*Client) OpenOrders

func (c *Client) OpenOrders(_ context.Context, _ binance.OpenOrdersRequest) ([]*binance.ExecutedOrder, error)

func (*Client) OrderBook

func (c *Client) OrderBook(ctx context.Context, obr binance.OrderBookRequest) (*binance.OrderBook, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) QueryOrder

func (c *Client) QueryOrder(_ context.Context, _ binance.QueryOrderRequest) (*binance.ExecutedOrder, error)

func (*Client) StartUserDataStream

func (c *Client) StartUserDataStream(_ context.Context) (*binance.Stream, error)

func (*Client) Ticker24

func (c *Client) Ticker24(context.Context, binance.TickerRequest) (*binance.Ticker24, error)

func (*Client) TickerAllBooks

func (c *Client) TickerAllBooks(context.Context) ([]*binance.BookTicker, error)

func (*Client) TickerAllPrices

func (c *Client) TickerAllPrices(context.Context) ([]*binance.PriceTicker, error)

func (*Client) Time

func (c *Client) Time(ctx context.Context) (time.Time, error)

func (*Client) TradeWebsocket

func (c *Client) TradeWebsocket(_ context.Context, _ binance.TradeWebsocketRequest) (chan *binance.AggTradeEvent, chan struct{}, error)

func (*Client) UserDataWebsocket

func (c *Client) UserDataWebsocket(_ context.Context, _ binance.UserDataWebsocketRequest) (chan *binance.AccountEvent, chan struct{}, error)

func (*Client) Withdraw

func (c *Client) Withdraw(_ context.Context, _ binance.WithdrawRequest) (*binance.WithdrawResult, error)

func (*Client) WithdrawHistory

func (c *Client) WithdrawHistory(_ context.Context, _ binance.HistoryRequest) ([]*binance.Withdrawal, error)

Jump to

Keyboard shortcuts

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