options

package
v2.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 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 GetFundingRateHistoryResponseUnmarshaler

type GetFundingRateHistoryResponseUnmarshaler func([]byte) ([]model.FundingRate, error)

type GetFundingRateResponseUnmarshaler

type GetFundingRateResponseUnmarshaler func([]byte) (*model.FundingRate, 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 WithGetFundingRateHistoryResponseUnmarshaler

func WithGetFundingRateHistoryResponseUnmarshaler(unmarshaler GetFundingRateHistoryResponseUnmarshaler) UnmarshalerOption

func WithGetFundingRateResponseUnmarshaler

func WithGetFundingRateResponseUnmarshaler(unmarshaler GetFundingRateResponseUnmarshaler) 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
	GetFundingRateResponseUnmarshaler        GetFundingRateResponseUnmarshaler
	GetFundingRateHistoryResponseUnmarshaler GetFundingRateHistoryResponseUnmarshaler
}

type UriOption

type UriOption func(*UriOptions)

func WithCancelOrderUri

func WithCancelOrderUri(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 WithGetFundingRateHistoryUri

func WithGetFundingRateHistoryUri(uri string) UriOption

func WithGetFundingRateUri

func WithGetFundingRateUri(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 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
	TickerUri                string
	DepthUri                 string
	KlineUri                 string
	GetOrderUri              string
	GetPendingOrdersUri      string
	GetHistoryOrdersUri      string
	CancelOrderUri           string
	NewOrderUri              string
	GetAccountUri            string
	GetPositionsUri          string
	GetExchangeInfoUri       string
	GetFundingRateUri        string
	GetFundingRateHistoryUri string
}

Jump to

Keyboard shortcuts

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