spot

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrvApi

type PrvApi struct {
	*Spot
	// contains filtered or unexported fields
}

func NewPrvApi

func NewPrvApi(apiOpts ...options.ApiOption) *PrvApi

func (*PrvApi) CancelOrder

func (s *PrvApi) CancelOrder(pair CurrencyPair, id string, opt ...OptionParameter) ([]byte, error)

func (*PrvApi) CreateOrder

func (s *PrvApi) CreateOrder(pair CurrencyPair, qty, price float64, side OrderSide, orderTy OrderType, opt ...OptionParameter) (*Order, []byte, error)

func (*PrvApi) DoAuthRequest

func (s *PrvApi) DoAuthRequest(method, reqUrl string, params *url.Values, header map[string]string) ([]byte, error)

func (*PrvApi) GetAccount

func (s *PrvApi) GetAccount(coin string) (map[string]Account, []byte, error)

func (*PrvApi) GetHistoryOrders

func (s *PrvApi) GetHistoryOrders(pair CurrencyPair, opt ...OptionParameter) ([]Order, []byte, error)

func (*PrvApi) GetOrderInfo

func (s *PrvApi) GetOrderInfo(pair CurrencyPair, id string, opt ...OptionParameter) (*Order, []byte, error)

func (*PrvApi) GetPendingOrders

func (s *PrvApi) GetPendingOrders(pair CurrencyPair, opt ...OptionParameter) ([]Order, []byte, error)

type RespUnmarshaler

type RespUnmarshaler struct {
}

func (*RespUnmarshaler) UnmarshalCancelOrderResponse

func (u *RespUnmarshaler) UnmarshalCancelOrderResponse(data []byte) error

func (*RespUnmarshaler) UnmarshalCreateOrderResponse

func (u *RespUnmarshaler) UnmarshalCreateOrderResponse(data []byte) (*Order, error)

func (*RespUnmarshaler) UnmarshalGetDepthResponse

func (u *RespUnmarshaler) UnmarshalGetDepthResponse(data []byte) (*Depth, error)

func (*RespUnmarshaler) UnmarshalGetKlineResponse

func (u *RespUnmarshaler) UnmarshalGetKlineResponse(data []byte) ([]Kline, error)

func (*RespUnmarshaler) UnmarshalGetPendingOrdersResponse

func (u *RespUnmarshaler) UnmarshalGetPendingOrdersResponse(data []byte) ([]Order, error)

func (*RespUnmarshaler) UnmarshalGetTickerResponse

func (u *RespUnmarshaler) UnmarshalGetTickerResponse(data []byte) (*Ticker, error)

func (*RespUnmarshaler) UnmarshalResponse

func (u *RespUnmarshaler) UnmarshalResponse(data []byte, res interface{}) error

type Spot

type Spot struct {
	UnmarshalerOpts UnmarshalerOptions
	UriOpts         UriOptions
}

func New

func New() *Spot

func (*Spot) DoNoAuthRequest

func (s *Spot) DoNoAuthRequest(method, reqUrl string, params *url.Values, headers map[string]string) ([]byte, error)

func (*Spot) GetDepth

func (s *Spot) GetDepth(pair CurrencyPair, size int, opts ...OptionParameter) (*Depth, []byte, error)

func (*Spot) GetExchangeInfo

func (s *Spot) GetExchangeInfo() (map[string]CurrencyPair, []byte, error)

func (*Spot) GetKline

func (s *Spot) GetKline(pair CurrencyPair, period KlinePeriod, opts ...OptionParameter) ([]Kline, []byte, error)

func (*Spot) GetName

func (s *Spot) GetName() string

func (*Spot) GetTicker

func (s *Spot) GetTicker(pair CurrencyPair, opt ...OptionParameter) (*Ticker, []byte, error)

func (*Spot) NewPrvApi

func (s *Spot) NewPrvApi(apiOpts ...ApiOption) *PrvApi

func (*Spot) WithUnmarshalerOptions

func (s *Spot) WithUnmarshalerOptions(opts ...UnmarshalerOption) *Spot

func (*Spot) WithUriOption

func (s *Spot) WithUriOption(uriOpts ...UriOption)

Jump to

Keyboard shortcuts

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