options

package
v2.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiOption

type ApiOption func(options *ApiOptions)

func WithApiKey

func WithApiKey(key string) ApiOption

func WithApiSecretKey

func WithApiSecretKey(secret string) ApiOption

func WithClientId

func WithClientId(clientId string) ApiOption

func WithPassphrase

func WithPassphrase(passphrase string) ApiOption

type ApiOptions

type ApiOptions struct {
	Key        string
	Secret     string
	Passphrase string
	ClientId   string
}

type CancelOrderResponseUnmarshaler

type CancelOrderResponseUnmarshaler func([]byte) error

type CreateOrderResponseUnmarshaler

type CreateOrderResponseUnmarshaler func([]byte) (*model.Order, error)

type GetAccountResponseUnmarshaler

type GetAccountResponseUnmarshaler func([]byte) (map[string]model.Account, error)

type GetDepthResponseUnmarshaler

type GetDepthResponseUnmarshaler func([]byte) (*model.Depth, error)

type GetExchangeInfoResponseUnmarshaler

type GetExchangeInfoResponseUnmarshaler func([]byte) (map[string]model.CurrencyPair, error)

type GetFuturesAccountResponseUnmarshaler

type GetFuturesAccountResponseUnmarshaler func([]byte) (map[string]model.FuturesAccount, error)

type GetHistoryOrdersResponseUnmarshaler

type GetHistoryOrdersResponseUnmarshaler func([]byte) ([]model.Order, error)

type GetKlineResponseUnmarshaler

type GetKlineResponseUnmarshaler func([]byte) ([]model.Kline, error)

type GetOrderInfoResponseUnmarshaler

type GetOrderInfoResponseUnmarshaler func([]byte) (*model.Order, error)

type GetPendingOrdersResponseUnmarshaler

type GetPendingOrdersResponseUnmarshaler func([]byte) ([]model.Order, error)

type GetPositionsResponseUnmarshaler

type GetPositionsResponseUnmarshaler func([]byte) ([]model.FuturesPosition, error)

type GetTickerResponseUnmarshaler

type GetTickerResponseUnmarshaler func([]byte) (*model.Ticker, error)

type ResponseUnmarshaler

type ResponseUnmarshaler func([]byte, interface{}) error

type UnmarshalerOption

type UnmarshalerOption func(options *UnmarshalerOptions)

func WithCancelOrderResponseUnmarshaler

func WithCancelOrderResponseUnmarshaler(unmarshaler CancelOrderResponseUnmarshaler) UnmarshalerOption

func WithCreateOrderResponseUnmarshaler

func WithCreateOrderResponseUnmarshaler(unmarshaler CreateOrderResponseUnmarshaler) UnmarshalerOption

func WithDepthUnmarshaler

func WithDepthUnmarshaler(unmarshaler GetDepthResponseUnmarshaler) UnmarshalerOption

func WithGetAccountResponseUnmarshaler

func WithGetAccountResponseUnmarshaler(unmarshaler GetAccountResponseUnmarshaler) UnmarshalerOption

func WithGetExchangeInfoResponseUnmarshaler

func WithGetExchangeInfoResponseUnmarshaler(unmarshaler GetExchangeInfoResponseUnmarshaler) UnmarshalerOption

func WithGetFuturesAccountResponseUnmarshaler

func WithGetFuturesAccountResponseUnmarshaler(unmarshaler GetFuturesAccountResponseUnmarshaler) UnmarshalerOption

func WithGetHistoryOrdersResponseUnmarshaler

func WithGetHistoryOrdersResponseUnmarshaler(unmarshaler GetHistoryOrdersResponseUnmarshaler) UnmarshalerOption

func WithGetOrderInfoResponseUnmarshaler

func WithGetOrderInfoResponseUnmarshaler(unmarshaler GetOrderInfoResponseUnmarshaler) UnmarshalerOption

func WithGetPendingOrdersResponseUnmarshaler

func WithGetPendingOrdersResponseUnmarshaler(unmarshaler GetPendingOrdersResponseUnmarshaler) UnmarshalerOption

func WithGetPositionsResponseUnmarshaler

func WithGetPositionsResponseUnmarshaler(unmarshaler GetPositionsResponseUnmarshaler) UnmarshalerOption

func WithKlineUnmarshaler

func WithKlineUnmarshaler(unmarshaler GetKlineResponseUnmarshaler) UnmarshalerOption

func WithResponseUnmarshaler

func WithResponseUnmarshaler(unmarshaler ResponseUnmarshaler) UnmarshalerOption

func WithTickerUnmarshaler

func WithTickerUnmarshaler(unmarshaler GetTickerResponseUnmarshaler) UnmarshalerOption

type UnmarshalerOptions

type UnmarshalerOptions struct {
	ResponseUnmarshaler                  ResponseUnmarshaler
	TickerUnmarshaler                    GetTickerResponseUnmarshaler
	DepthUnmarshaler                     GetDepthResponseUnmarshaler
	KlineUnmarshaler                     GetKlineResponseUnmarshaler
	CreateOrderResponseUnmarshaler       CreateOrderResponseUnmarshaler
	GetOrderInfoResponseUnmarshaler      GetOrderInfoResponseUnmarshaler
	GetPendingOrdersResponseUnmarshaler  GetPendingOrdersResponseUnmarshaler
	GetHistoryOrdersResponseUnmarshaler  GetHistoryOrdersResponseUnmarshaler
	CancelOrderResponseUnmarshaler       CancelOrderResponseUnmarshaler
	GetAccountResponseUnmarshaler        GetAccountResponseUnmarshaler
	GetPositionsResponseUnmarshaler      GetPositionsResponseUnmarshaler
	GetFuturesAccountResponseUnmarshaler GetFuturesAccountResponseUnmarshaler
	GetExchangeInfoResponseUnmarshaler   GetExchangeInfoResponseUnmarshaler
}

type UriOption

type UriOption func(*UriOptions)

func WithCancelOrderUri

func WithCancelOrderUri(uri string) UriOption

func WithClosePositionUri added in v2.0.3

func WithClosePositionUri(uri string) UriOption

func WithDepthUri

func WithDepthUri(uri string) UriOption

func WithEndpoint

func WithEndpoint(endpoint string) UriOption

func WithGetAccountUri

func WithGetAccountUri(uri string) UriOption

func WithGetExchangeUri

func WithGetExchangeUri(uri string) UriOption

func WithGetHistoryOrdersUri

func WithGetHistoryOrdersUri(uri string) UriOption

func WithGetOrderUri

func WithGetOrderUri(uri string) UriOption

func WithGetPendingOrdersUri

func WithGetPendingOrdersUri(uri string) UriOption

func WithGetPositionsUri

func WithGetPositionsUri(uri string) UriOption

func WithHeader

func WithHeader(header map[string]string) UriOption

func WithKlineUri

func WithKlineUri(uri string) UriOption

func WithNewOrderUri

func WithNewOrderUri(uri string) UriOption

func WithTickerUri

func WithTickerUri(uri string) UriOption

type UriOptions

type UriOptions struct {
	Endpoint            string
	Header              map[string]string
	TickerUri           string
	DepthUri            string
	KlineUri            string
	GetOrderUri         string
	GetPendingOrdersUri string
	GetHistoryOrdersUri string
	CancelOrderUri      string
	ClosePositionUri    string
	NewOrderUri         string
	GetAccountUri       string
	GetPositionsUri     string
	GetExchangeInfoUri  string
}

Jump to

Keyboard shortcuts

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