Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset string
Asset represent a coin or currency that is used in trading pairs.
func (Asset) Format ¶
Format will convert the units into a string that has a floating point denomination.
type CandlesCache ¶
type CandlesCache struct {
// contains filtered or unexported fields
}
CandlesCache represents a local candles cache for every exchange. To allow dinamic polling from multiple sources (REST + Websocket)
func NewCandlesCache ¶
func NewCandlesCache() *CandlesCache
NewCandlesCache creates a new CandlesCache Object
func (*CandlesCache) Get ¶
func (cc *CandlesCache) Get(market *environment.Market) ([]environment.CandleStick, bool)
Get gets the value for the specified key.
func (*CandlesCache) Set ¶
func (cc *CandlesCache) Set(market *environment.Market, candles []environment.CandleStick) []environment.CandleStick
Set sets a value for the specified key.
type Limit ¶
type Limit struct { ClientID string Pair Pair Side Side BaseSize string Price string PostOnly bool Expires *time.Time }
Limit represents an order that a limit type
type OrderbookCache ¶
type OrderbookCache struct {
// contains filtered or unexported fields
}
OrderbookCache represents a local orderbook cache for every exchange. To allow dinamic polling from multiple sources (REST + Websocket)
func NewOrderbookCache ¶
func NewOrderbookCache() *OrderbookCache
NewOrderbookCache creates a new OrderbookCache Object
func (*OrderbookCache) Get ¶
func (cc *OrderbookCache) Get(market *environment.Market) (*environment.OrderBook, bool)
Get gets the value for the specified key.
func (*OrderbookCache) Set ¶
func (cc *OrderbookCache) Set(market *environment.Market, book *environment.OrderBook) *environment.OrderBook
Set sets a value for the specified key.
type Side ¶
type Side string
Side represents the side of the trade that the order is placing.
const ( // SideBuy specifies the buy side of an order SideBuy Side = "BUY" // SideSell specifies the sell side of an order SideSell = "SELL" )
type SummaryCache ¶
type SummaryCache struct {
// contains filtered or unexported fields
}
SummaryCache represents a local summary cache for every exchange. To allow dinamic polling from multiple sources (REST + Websocket)
func NewSummaryCache ¶
func NewSummaryCache() *SummaryCache
NewSummaryCache creates a new SummaryCache Object
func (*SummaryCache) Get ¶
func (sc *SummaryCache) Get(market *environment.Market) (*environment.MarketSummary, bool)
Get gets the value for the specified key.
func (*SummaryCache) Set ¶
func (sc *SummaryCache) Set(market *environment.Market, summary *environment.MarketSummary) *environment.MarketSummary
Set sets a value for the specified key.