Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balance ¶
Balance holds the account info related to an exchange account. This includes asset and base currency amounts and holds.
type BoolOption ¶
BoolOption provides a strategy option that holds a boolean value for the strategy to use
func (*BoolOption) String ¶
func (option *BoolOption) String() string
String provides a string representaion of the stragety option in the format: --option-name=<value> Simple Description (default: true)
type DurationOption ¶
type DurationOption struct { Name string Description string DefaultValue time.Duration Value time.Duration }
DurationOption provides a strategy option that holds a time.Duration value for the strategy to use
func (*DurationOption) String ¶
func (option *DurationOption) String() string
String provides a string representaion of the stragety option in the format: --option-name=<value> Simple Description (default: 1s)
type Exchange ¶
type Exchange interface { GetTrades(productID string) ([]*Trade, error) GetBalance(currency string, asset string) (*Balance, error) GetQuote(productID string) (*Quote, error) }
Exchange provides methods to get trades, balances, and product id quotes from a supported crypto-currency exchange
type IntOption ¶
IntOption provides a strategy option that holds a int value for the strategy to use
type Option ¶
Option is a wrapper around the fmt.Stringer interface to enforce that all strategy options have a Stringer method
type Period ¶
Period holds high level information about exchange trades with a certain time "period". Periods will be used to feed into strategies to determine market signals
type Product ¶
type Product struct { Asset string `json:"asset"` Currency string `json:"currency"` MinSize string `json:"min_size"` MaxSize string `json:"max_size"` Increment string `json:"increment"` AssetIncrement string `json:"asset_increment"` Label string `json:"label"` }
Product holds "product" info from an exchange
type Quote ¶
Quote holds the Bid and Ask info that represents a asset/currency pair from a crypto-currency exchange
type Selector ¶
Selector holds info related to the exchange, and asset/currency pair tatanka should pull trade info, balance info for
func NewSelectorFromString ¶
type Signal ¶
type Signal int
Signal represents a market signal that indicates whether a market is currently bullish (going up) or bearish (going down)
type Strategy ¶
type Strategy interface { Name() string Description() string Options() []Option Calculate(periods []*Period) (float64, error) Signal(float64) Signal }
Strategy represents a market strategy to determine a signal in the market.