sharedtestvalues

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoCom

type CryptoCom struct {
	exchange.Base
}

CryptoCom creates a mock custom exchange

func (*CryptoCom) AuthenticateWebsocket

func (c *CryptoCom) AuthenticateWebsocket(_ context.Context) error

AuthenticateWebsocket is a mock method for CryptoCom

func (*CryptoCom) CancelAllOrders

func (c *CryptoCom) CancelAllOrders(_ context.Context, _ *order.Cancel) (order.CancelAllResponse, error)

CancelAllOrders is a mock method for CryptoCom

func (*CryptoCom) CancelBatchOrders

func (c *CryptoCom) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)

CancelBatchOrders is a mock method for CryptoCom

func (*CryptoCom) CancelOrder

func (c *CryptoCom) CancelOrder(_ context.Context, _ *order.Cancel) error

CancelOrder is a mock method for CryptoCom

func (*CryptoCom) CheckOrderExecutionLimits

func (c *CryptoCom) CheckOrderExecutionLimits(_ asset.Item, _ currency.Pair, _, _ float64, _ order.Type) error

CheckOrderExecutionLimits is a mock method for CryptoCom

func (*CryptoCom) DisableRateLimiter

func (c *CryptoCom) DisableRateLimiter() error

DisableRateLimiter is a mock method for CryptoCom

func (*CryptoCom) EnableRateLimiter

func (c *CryptoCom) EnableRateLimiter() error

EnableRateLimiter is a mock method for CryptoCom

func (*CryptoCom) FetchAccountInfo

func (c *CryptoCom) FetchAccountInfo(_ context.Context, _ asset.Item) (account.Holdings, error)

FetchAccountInfo is a mock method for CryptoCom

func (*CryptoCom) FetchOrderbook

func (c *CryptoCom) FetchOrderbook(_ context.Context, _ currency.Pair, _ asset.Item) (*orderbook.Base, error)

FetchOrderbook is a mock method for CryptoCom

func (*CryptoCom) FetchTicker

func (c *CryptoCom) FetchTicker(_ context.Context, _ currency.Pair, _ asset.Item) (*ticker.Price, error)

FetchTicker is a mock method for CryptoCom

func (*CryptoCom) FetchTradablePairs

func (c *CryptoCom) FetchTradablePairs(_ context.Context, _ asset.Item) (currency.Pairs, error)

FetchTradablePairs is a mock method for CryptoCom

func (*CryptoCom) FlushWebsocketChannels

func (c *CryptoCom) FlushWebsocketChannels() error

FlushWebsocketChannels is a mock method for CryptoCom

func (*CryptoCom) FormatWithdrawPermissions

func (c *CryptoCom) FormatWithdrawPermissions() string

FormatWithdrawPermissions is a mock method for CryptoCom

func (*CryptoCom) GetAccountFundingHistory

func (c *CryptoCom) GetAccountFundingHistory(_ context.Context) ([]exchange.FundingHistory, error)

GetAccountFundingHistory is a mock method for CryptoCom

func (*CryptoCom) GetActiveOrders

GetActiveOrders is a mock method for CryptoCom

func (*CryptoCom) GetAssetTypes

func (c *CryptoCom) GetAssetTypes(_ bool) asset.Items

GetAssetTypes is a mock method for CryptoCom

func (*CryptoCom) GetAvailablePairs

func (c *CryptoCom) GetAvailablePairs(_ asset.Item) (currency.Pairs, error)

GetAvailablePairs is a mock method for CryptoCom

func (*CryptoCom) GetBase

func (c *CryptoCom) GetBase() *exchange.Base

GetBase is a mock method for CryptoCom

func (*CryptoCom) GetDepositAddress

func (c *CryptoCom) GetDepositAddress(_ context.Context, _ currency.Code, _, _ string) (*deposit.Address, error)

GetDepositAddress is a mock method for CryptoCom

func (*CryptoCom) GetEnabledPairs

func (c *CryptoCom) GetEnabledPairs(_ asset.Item) (currency.Pairs, error)

GetEnabledPairs is a mock method for CryptoCom

func (*CryptoCom) GetFeeByType

func (c *CryptoCom) GetFeeByType(_ context.Context, _ *exchange.FeeBuilder) (float64, error)

GetFeeByType is a mock method for CryptoCom

func (*CryptoCom) GetFuturesContractDetails

func (c *CryptoCom) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)

GetFuturesContractDetails returns all contracts from the exchange by asset type

func (*CryptoCom) GetHTTPClientUserAgent

func (c *CryptoCom) GetHTTPClientUserAgent() (string, error)

GetHTTPClientUserAgent is a mock method for CryptoCom

func (*CryptoCom) GetHistoricCandles

func (c *CryptoCom) GetHistoricCandles(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, _, _ time.Time) (*kline.Item, error)

GetHistoricCandles is a mock method for CryptoCom

func (*CryptoCom) GetHistoricCandlesExtended

func (c *CryptoCom) GetHistoricCandlesExtended(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, _, _ time.Time) (*kline.Item, error)

GetHistoricCandlesExtended is a mock method for CryptoCom

func (*CryptoCom) GetHistoricTrades

func (c *CryptoCom) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)

GetHistoricTrades is a mock method for CryptoCom

func (*CryptoCom) GetHistoricalFundingRates

GetHistoricalFundingRates returns funding rates for a given asset and currency for a time period

func (*CryptoCom) GetLastPairsUpdateTime

func (c *CryptoCom) GetLastPairsUpdateTime() int64

GetLastPairsUpdateTime is a mock method for CryptoCom

func (*CryptoCom) GetLatestFundingRates

GetLatestFundingRates returns the latest funding rates data

func (*CryptoCom) GetName

func (c *CryptoCom) GetName() string

GetName is a mock method for CryptoCom

func (*CryptoCom) GetOrderExecutionLimits

func (c *CryptoCom) GetOrderExecutionLimits(_ asset.Item, _ currency.Pair) (order.MinMaxLevel, error)

GetOrderExecutionLimits is a mock method for CryptoCom

func (*CryptoCom) GetOrderHistory

GetOrderHistory is a mock method for CryptoCom

func (*CryptoCom) GetOrderInfo

func (c *CryptoCom) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)

GetOrderInfo is a mock method for CryptoCom

func (*CryptoCom) GetRecentTrades

func (c *CryptoCom) GetRecentTrades(_ context.Context, _ currency.Pair, _ asset.Item) ([]trade.Data, error)

GetRecentTrades is a mock method for CryptoCom

func (*CryptoCom) GetServerTime

func (c *CryptoCom) GetServerTime(context.Context, asset.Item) (time.Time, error)

GetServerTime is a mock method for CryptoCom

func (*CryptoCom) GetSubscriptions

func (c *CryptoCom) GetSubscriptions() ([]subscription.Subscription, error)

GetSubscriptions is a mock method for CryptoCom

func (*CryptoCom) GetWebsocket

func (c *CryptoCom) GetWebsocket() (*stream.Websocket, error)

GetWebsocket is a mock method for CryptoCom

func (*CryptoCom) GetWithdrawPermissions

func (c *CryptoCom) GetWithdrawPermissions() uint32

GetWithdrawPermissions is a mock method for CryptoCom

func (*CryptoCom) GetWithdrawalsHistory

func (c *CryptoCom) GetWithdrawalsHistory(_ context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)

GetWithdrawalsHistory is a mock method for CryptoCom

func (*CryptoCom) IsAssetWebsocketSupported

func (c *CryptoCom) IsAssetWebsocketSupported(_ asset.Item) bool

IsAssetWebsocketSupported is a mock method for CryptoCom

func (*CryptoCom) IsEnabled

func (c *CryptoCom) IsEnabled() bool

IsEnabled is a mock method for CryptoCom

func (*CryptoCom) IsWebsocketEnabled

func (c *CryptoCom) IsWebsocketEnabled() bool

IsWebsocketEnabled is a mock method for CryptoCom

func (*CryptoCom) ModifyOrder

func (c *CryptoCom) ModifyOrder(_ context.Context, _ *order.Modify) (*order.ModifyResponse, error)

ModifyOrder is a mock method for CryptoCom

func (*CryptoCom) SendHTTPRequest

func (c *CryptoCom) SendHTTPRequest(ctx context.Context, ePath exchange.URL, path string, f request.EndpointLimit, result interface{}) error

SendHTTPRequest sends an unauthenticated request

func (*CryptoCom) SetClientProxyAddress

func (c *CryptoCom) SetClientProxyAddress(_ string) error

SetClientProxyAddress is a mock method for CryptoCom

func (*CryptoCom) SetDefaults

func (c *CryptoCom) SetDefaults()

SetDefaults is a mock method for CryptoCom

func (*CryptoCom) SetEnabled

func (c *CryptoCom) SetEnabled(bool)

SetEnabled is a mock method for CryptoCom

func (*CryptoCom) SetHTTPClientUserAgent

func (c *CryptoCom) SetHTTPClientUserAgent(_ string) error

SetHTTPClientUserAgent is a mock method for CryptoCom

func (*CryptoCom) SetPairs

func (c *CryptoCom) SetPairs(_ currency.Pairs, _ asset.Item, _ bool) error

SetPairs is a mock method for CryptoCom

func (*CryptoCom) Setup

func (c *CryptoCom) Setup(_ *config.Exchange) error

Setup is a mock method for CryptoCom

func (*CryptoCom) SubmitOrder

func (c *CryptoCom) SubmitOrder(_ context.Context, _ *order.Submit) (*order.SubmitResponse, error)

SubmitOrder is a mock method for CryptoCom

func (*CryptoCom) SubmitOrders

func (c *CryptoCom) SubmitOrders(_ context.Context, _ ...*order.Submit) ([]*order.SubmitResponse, error)

SubmitOrder is a mock method for CryptoCom

func (*CryptoCom) SubscribeToWebsocketChannels

func (c *CryptoCom) SubscribeToWebsocketChannels(_ []subscription.Subscription) error

SubscribeToWebsocketChannels is a mock method for CryptoCom

func (*CryptoCom) SupportsAsset

func (c *CryptoCom) SupportsAsset(_ asset.Item) bool

SupportsAsset is a mock method for CryptoCom

func (*CryptoCom) SupportsAutoPairUpdates

func (c *CryptoCom) SupportsAutoPairUpdates() bool

SupportsAutoPairUpdates is a mock method for CryptoCom

func (*CryptoCom) SupportsREST

func (c *CryptoCom) SupportsREST() bool

SupportsREST is a mock method for CryptoCom

func (*CryptoCom) SupportsRESTTickerBatchUpdates

func (c *CryptoCom) SupportsRESTTickerBatchUpdates() bool

SupportsRESTTickerBatchUpdates is a mock method for CryptoCom

func (*CryptoCom) SupportsWebsocket

func (c *CryptoCom) SupportsWebsocket() bool

SupportsWebsocket is a mock method for CryptoCom

func (*CryptoCom) SupportsWithdrawPermissions

func (c *CryptoCom) SupportsWithdrawPermissions(_ uint32) bool

SupportsWithdrawPermissions is a mock method for CryptoCom

func (*CryptoCom) UnsubscribeToWebsocketChannels

func (c *CryptoCom) UnsubscribeToWebsocketChannels(_ []subscription.Subscription) error

UnsubscribeToWebsocketChannels is a mock method for CryptoCom

func (*CryptoCom) UpdateOrderExecutionLimits

func (c *CryptoCom) UpdateOrderExecutionLimits(_ context.Context, _ asset.Item) error

UpdateOrderExecutionLimits is a mock method for CryptoCom

func (*CryptoCom) UpdateTicker

func (c *CryptoCom) UpdateTicker(_ context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)

func (*CryptoCom) UpdateTickers

func (c *CryptoCom) UpdateTickers(_ context.Context, _ asset.Item) error

UpdateTickers is a mock method for CryptoCom

func (*CryptoCom) UpdateTradablePairs

func (c *CryptoCom) UpdateTradablePairs(_ context.Context, _ bool) error

UpdateTradablePairs is a mock method for CryptoCom

func (*CryptoCom) ValidateAPICredentials

func (c *CryptoCom) ValidateAPICredentials(_ context.Context, _ asset.Item) error

ValidateAPICredentials is a mock method for CryptoCom

func (*CryptoCom) WithdrawCryptocurrencyFunds

func (c *CryptoCom) WithdrawCryptocurrencyFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)

WithdrawCryptocurrencyFunds is a mock method for CryptoCom

func (*CryptoCom) WithdrawFiatFunds

func (c *CryptoCom) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)

WithdrawFiatFunds is a mock method for CryptoCom

func (*CryptoCom) WithdrawFiatFundsToInternationalBank

func (c *CryptoCom) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)

WithdrawFiatFundsToInternationalBank is a mock method for CryptoCom

type GetTickers

type GetTickers struct {
	Id     int    `json:"id"`
	Method string `json:"method"`
	Code   int    `json:"code"`
	Result struct {
		Data []struct {
			I  string `json:"i"`
			H  string `json:"h"`
			L  string `json:"l"`
			A  string `json:"a"`
			V  string `json:"v"`
			Vv string `json:"vv"`
			C  string `json:"c"`
			B  string `json:"b"`
			K  string `json:"k"`
			Oi string `json:"oi"`
			T  int64  `json:"t"`
		} `json:"data"`
	} `json:"result"`
}

Jump to

Keyboard shortcuts

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