Documentation
¶
Index ¶
- type CryptoCom
- func (c *CryptoCom) AuthenticateWebsocket(_ context.Context) error
- func (c *CryptoCom) CancelAllOrders(_ context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
- func (c *CryptoCom) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
- func (c *CryptoCom) CancelOrder(_ context.Context, _ *order.Cancel) error
- func (c *CryptoCom) CheckOrderExecutionLimits(_ asset.Item, _ currency.Pair, _, _ float64, _ order.Type) error
- func (c *CryptoCom) DisableRateLimiter() error
- func (c *CryptoCom) EnableRateLimiter() error
- func (c *CryptoCom) FetchAccountInfo(_ context.Context, _ asset.Item) (account.Holdings, error)
- func (c *CryptoCom) FetchOrderbook(_ context.Context, _ currency.Pair, _ asset.Item) (*orderbook.Base, error)
- func (c *CryptoCom) FetchTicker(_ context.Context, _ currency.Pair, _ asset.Item) (*ticker.Price, error)
- func (c *CryptoCom) FetchTradablePairs(_ context.Context, _ asset.Item) (currency.Pairs, error)
- func (c *CryptoCom) FlushWebsocketChannels() error
- func (c *CryptoCom) FormatWithdrawPermissions() string
- func (c *CryptoCom) GetAccountFundingHistory(_ context.Context) ([]exchange.FundingHistory, error)
- func (c *CryptoCom) GetActiveOrders(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (c *CryptoCom) GetAssetTypes(_ bool) asset.Items
- func (c *CryptoCom) GetAvailablePairs(_ asset.Item) (currency.Pairs, error)
- func (c *CryptoCom) GetBase() *exchange.Base
- func (c *CryptoCom) GetDepositAddress(_ context.Context, _ currency.Code, _, _ string) (*deposit.Address, error)
- func (c *CryptoCom) GetEnabledPairs(_ asset.Item) (currency.Pairs, error)
- func (c *CryptoCom) GetFeeByType(_ context.Context, _ *exchange.FeeBuilder) (float64, error)
- func (c *CryptoCom) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
- func (c *CryptoCom) GetHTTPClientUserAgent() (string, error)
- func (c *CryptoCom) GetHistoricCandles(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (c *CryptoCom) GetHistoricCandlesExtended(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (c *CryptoCom) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
- func (c *CryptoCom) GetHistoricalFundingRates(_ context.Context, _ *fundingrate.HistoricalRatesRequest) (*fundingrate.HistoricalRates, error)
- func (c *CryptoCom) GetLastPairsUpdateTime() int64
- func (c *CryptoCom) GetLatestFundingRates(_ context.Context, _ *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
- func (c *CryptoCom) GetName() string
- func (c *CryptoCom) GetOrderExecutionLimits(_ asset.Item, _ currency.Pair) (order.MinMaxLevel, error)
- func (c *CryptoCom) GetOrderHistory(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (c *CryptoCom) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
- func (c *CryptoCom) GetRecentTrades(_ context.Context, _ currency.Pair, _ asset.Item) ([]trade.Data, error)
- func (c *CryptoCom) GetServerTime(context.Context, asset.Item) (time.Time, error)
- func (c *CryptoCom) GetSubscriptions() ([]subscription.Subscription, error)
- func (c *CryptoCom) GetWebsocket() (*stream.Websocket, error)
- func (c *CryptoCom) GetWithdrawPermissions() uint32
- func (c *CryptoCom) GetWithdrawalsHistory(_ context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
- func (c *CryptoCom) IsAssetWebsocketSupported(_ asset.Item) bool
- func (c *CryptoCom) IsEnabled() bool
- func (c *CryptoCom) IsWebsocketEnabled() bool
- func (c *CryptoCom) ModifyOrder(_ context.Context, _ *order.Modify) (*order.ModifyResponse, error)
- func (c *CryptoCom) SendHTTPRequest(ctx context.Context, ePath exchange.URL, path string, f request.EndpointLimit, ...) error
- func (c *CryptoCom) SetClientProxyAddress(_ string) error
- func (c *CryptoCom) SetDefaults()
- func (c *CryptoCom) SetEnabled(bool)
- func (c *CryptoCom) SetHTTPClientUserAgent(_ string) error
- func (c *CryptoCom) SetPairs(_ currency.Pairs, _ asset.Item, _ bool) error
- func (c *CryptoCom) Setup(_ *config.Exchange) error
- func (c *CryptoCom) SubmitOrder(_ context.Context, _ *order.Submit) (*order.SubmitResponse, error)
- func (c *CryptoCom) SubmitOrders(_ context.Context, _ ...*order.Submit) ([]*order.SubmitResponse, error)
- func (c *CryptoCom) SubscribeToWebsocketChannels(_ []subscription.Subscription) error
- func (c *CryptoCom) SupportsAsset(_ asset.Item) bool
- func (c *CryptoCom) SupportsAutoPairUpdates() bool
- func (c *CryptoCom) SupportsREST() bool
- func (c *CryptoCom) SupportsRESTTickerBatchUpdates() bool
- func (c *CryptoCom) SupportsWebsocket() bool
- func (c *CryptoCom) SupportsWithdrawPermissions(_ uint32) bool
- func (c *CryptoCom) UnsubscribeToWebsocketChannels(_ []subscription.Subscription) error
- func (c *CryptoCom) UpdateOrderExecutionLimits(_ context.Context, _ asset.Item) error
- func (c *CryptoCom) UpdateTicker(_ context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
- func (c *CryptoCom) UpdateTickers(_ context.Context, _ asset.Item) error
- func (c *CryptoCom) UpdateTradablePairs(_ context.Context, _ bool) error
- func (c *CryptoCom) ValidateAPICredentials(_ context.Context, _ asset.Item) error
- func (c *CryptoCom) WithdrawCryptocurrencyFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (c *CryptoCom) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (c *CryptoCom) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- type GetTickers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoCom ¶
CryptoCom creates a mock custom exchange
func (*CryptoCom) AuthenticateWebsocket ¶
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 ¶
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 ¶
DisableRateLimiter is a mock method for CryptoCom
func (*CryptoCom) EnableRateLimiter ¶
EnableRateLimiter is a mock method for CryptoCom
func (*CryptoCom) FetchAccountInfo ¶
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 ¶
FetchTradablePairs is a mock method for CryptoCom
func (*CryptoCom) FlushWebsocketChannels ¶
FlushWebsocketChannels is a mock method for CryptoCom
func (*CryptoCom) FormatWithdrawPermissions ¶
FormatWithdrawPermissions is a mock method for CryptoCom
func (*CryptoCom) GetAccountFundingHistory ¶
GetAccountFundingHistory is a mock method for CryptoCom
func (*CryptoCom) GetActiveOrders ¶
func (c *CryptoCom) GetActiveOrders(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
GetActiveOrders is a mock method for CryptoCom
func (*CryptoCom) GetAssetTypes ¶
GetAssetTypes is a mock method for CryptoCom
func (*CryptoCom) GetAvailablePairs ¶
GetAvailablePairs 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 ¶
GetEnabledPairs is a mock method for CryptoCom
func (*CryptoCom) GetFeeByType ¶
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 ¶
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 ¶
func (c *CryptoCom) GetHistoricalFundingRates(_ context.Context, _ *fundingrate.HistoricalRatesRequest) (*fundingrate.HistoricalRates, error)
GetHistoricalFundingRates returns funding rates for a given asset and currency for a time period
func (*CryptoCom) GetLastPairsUpdateTime ¶
GetLastPairsUpdateTime is a mock method for CryptoCom
func (*CryptoCom) GetLatestFundingRates ¶
func (c *CryptoCom) GetLatestFundingRates(_ context.Context, _ *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
GetLatestFundingRates returns the latest funding rates data
func (*CryptoCom) GetOrderExecutionLimits ¶
func (c *CryptoCom) GetOrderExecutionLimits(_ asset.Item, _ currency.Pair) (order.MinMaxLevel, error)
GetOrderExecutionLimits is a mock method for CryptoCom
func (*CryptoCom) GetOrderHistory ¶
func (c *CryptoCom) GetOrderHistory(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
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 ¶
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 ¶
GetWebsocket is a mock method for CryptoCom
func (*CryptoCom) GetWithdrawPermissions ¶
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 ¶
IsAssetWebsocketSupported is a mock method for CryptoCom
func (*CryptoCom) IsWebsocketEnabled ¶
IsWebsocketEnabled is a mock method for CryptoCom
func (*CryptoCom) ModifyOrder ¶
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 ¶
SetClientProxyAddress is a mock method for CryptoCom
func (*CryptoCom) SetDefaults ¶
func (c *CryptoCom) SetDefaults()
SetDefaults is a mock method for CryptoCom
func (*CryptoCom) SetEnabled ¶
SetEnabled is a mock method for CryptoCom
func (*CryptoCom) SetHTTPClientUserAgent ¶
SetHTTPClientUserAgent is a mock method for CryptoCom
func (*CryptoCom) SubmitOrder ¶
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 ¶
SupportsAsset is a mock method for CryptoCom
func (*CryptoCom) SupportsAutoPairUpdates ¶
SupportsAutoPairUpdates is a mock method for CryptoCom
func (*CryptoCom) SupportsREST ¶
SupportsREST is a mock method for CryptoCom
func (*CryptoCom) SupportsRESTTickerBatchUpdates ¶
SupportsRESTTickerBatchUpdates is a mock method for CryptoCom
func (*CryptoCom) SupportsWebsocket ¶
SupportsWebsocket is a mock method for CryptoCom
func (*CryptoCom) SupportsWithdrawPermissions ¶
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 ¶
UpdateOrderExecutionLimits is a mock method for CryptoCom
func (*CryptoCom) UpdateTicker ¶
func (*CryptoCom) UpdateTickers ¶
UpdateTickers is a mock method for CryptoCom
func (*CryptoCom) UpdateTradablePairs ¶
UpdateTradablePairs is a mock method for CryptoCom
func (*CryptoCom) ValidateAPICredentials ¶
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"` }