Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candle ¶
type Candle struct {
Timestamp time.Time `json:"time"`
Open float64 `json:"open"`
High float64 `json:"high"`
Low float64 `json:"low"`
Close float64 `json:"close"`
Vwap float64 `json:"vwap"`
NTrades int64 `json:"n_trades"`
NBuy int64 `json:"n_buy"`
NSell int64 `json:"n_sell"`
VolumeBase float64 `json:"vol_base"`
VolumeQuote float64 `json:"vol_quote"`
VolumeBuyBase float64 `json:"vol_buy_base"`
VolumeBuyQuote float64 `json:"vol_buy_quote"`
VolumeSellBase float64 `json:"vol_sell_base"`
VolumeSellQuote float64 `json:"vol_sell_quote"`
}
type CandleQuery ¶
type CandleQuery struct {
Market string
Pair string
Collapse time.Duration
Fill client.FillMode
Columns []string
From time.Time
To time.Time
Limit int
}
func (CandleQuery) Url ¶
func (c CandleQuery) Url() string
type MarketAPI ¶
type MarketAPI interface {
GetTicker(context.Context, string, string) (*Ticker, error)
ListTickers(context.Context) ([]Ticker, error)
ListCandles(context.Context, CandleQuery) (CandleList, error)
}
func NewMarketAPI ¶
type Ticker ¶
type Ticker struct {
Pair string `json:"pair"`
Base string `json:"base"`
Quote string `json:"quote"`
Exchange string `json:"exchange"`
Open float64 `json:"open"`
High float64 `json:"high"`
Low float64 `json:"low"`
Last float64 `json:"last"`
Change float64 `json:"change"`
Vwap float64 `json:"vwap"`
NTrades int64 `json:"n_trades"`
VolumeBase float64 `json:"volume_base"`
VolumeQuote float64 `json:"volume_quote"`
Time time.Time `json:"timestamp"`
}
Click to show internal directories.
Click to hide internal directories.