exchange

package
v0.0.0-...-3c53fe9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WarningBase64DecryptSecretKeyFailed = "WARNING -- Exchange %s unable to base64 decode secret key.. Disabling Authenticated API support."
	ErrExchangeNotFound                 = "Exchange not found in dataset."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeAccountCurrencyInfo

type ExchangeAccountCurrencyInfo struct {
	CurrencyName string
	TotalValue   float64
	Hold         float64
}

ExchangeAccountCurrencyInfo : Sub type to store currency name and value

type ExchangeAccountInfo

type ExchangeAccountInfo struct {
	ExchangeName string
	Currencies   []ExchangeAccountCurrencyInfo
}

ExchangeAccountInfo : Generic type to hold each exchange's holdings in all enabled currencies

type ExchangeBase

type ExchangeBase struct {
	Name                        string
	Enabled                     bool
	Verbose                     bool
	Websocket                   bool
	RESTPollingDelay            time.Duration
	AuthenticatedAPISupport     bool
	APISecret, APIKey, ClientID string
	TakerFee, MakerFee, Fee     float64
	BaseCurrencies              []string
	AvailablePairs              []string
	EnabledPairs                []string
	WebsocketURL                string
	APIUrl                      string
}

func (*ExchangeBase) GetEnabledCurrencies

func (e *ExchangeBase) GetEnabledCurrencies() []string

func (*ExchangeBase) GetName

func (e *ExchangeBase) GetName() string

func (*ExchangeBase) IsEnabled

func (e *ExchangeBase) IsEnabled() bool

func (*ExchangeBase) SetAPIKeys

func (e *ExchangeBase) SetAPIKeys(APIKey, APISecret, ClientID string, b64Decode bool)

func (*ExchangeBase) SetEnabled

func (e *ExchangeBase) SetEnabled(enabled bool)

func (*ExchangeBase) UpdateAvailableCurrencies

func (e *ExchangeBase) UpdateAvailableCurrencies(exchangeProducts []string) error

type IBotExchange

type IBotExchange interface {
	Setup(exch config.ExchangeConfig)
	Start()
	SetDefaults()
	GetName() string
	IsEnabled() bool
	GetTickerPrice(currency pair.CurrencyPair) (ticker.TickerPrice, error)
	GetOrderbookEx(currency pair.CurrencyPair) (orderbook.OrderbookBase, error)
	GetEnabledCurrencies() []string
	GetExchangeAccountInfo() (ExchangeAccountInfo, error)
}

IBotExchange : Enforces standard functions for all exchanges supported in gocryptotrader

Jump to

Keyboard shortcuts

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