Versions in this module Expand all Collapse all v0 v0.0.2 Oct 6, 2022 Changes in this version + var DefaultClient = NewClient(ClientOpts{}) + func GetBarsAsync(symbol string, params GetBarsParams) <-chan BarItem + func GetCryptoBarsAsync(symbol string, params GetCryptoBarsParams) <-chan CryptoBarItem + func GetCryptoMultiBars(symbols []string, params GetCryptoBarsParams) (map[string][]CryptoBar, error) + func GetCryptoMultiBarsAsync(symbols []string, params GetCryptoBarsParams) <-chan CryptoMultiBarItem + func GetCryptoQuotesAsync(symbol string, params GetCryptoQuotesParams) <-chan CryptoQuoteItem + func GetCryptoSnapshots(symbols []string, exchange string) (map[string]CryptoSnapshot, error) + func GetCryptoTradesAsync(symbol string, params GetCryptoTradesParams) <-chan CryptoTradeItem + func GetLatestBars(symbols []string) (map[string]Bar, error) + func GetLatestCryptoBars(symbols []string, exchange string) (map[string]CryptoBar, error) + func GetLatestCryptoQuotes(symbols []string, exchange string) (map[string]CryptoQuote, error) + func GetLatestCryptoTrades(symbols []string, exchange string) (map[string]CryptoTrade, error) + func GetLatestCryptoXBBOs(symbols []string, exchanges []string) (map[string]CryptoXBBO, error) + func GetLatestQuotes(symbols []string) (map[string]Quote, error) + func GetLatestTrades(symbols []string) (map[string]Trade, error) + func GetMultiBars(symbols []string, params GetBarsParams) (map[string][]Bar, error) + func GetMultiBarsAsync(symbols []string, params GetBarsParams) <-chan MultiBarItem + func GetMultiQuotes(symbols []string, params GetQuotesParams) (map[string][]Quote, error) + func GetMultiQuotesAsync(symbols []string, params GetQuotesParams) <-chan MultiQuoteItem + func GetMultiTrades(symbols []string, params GetTradesParams) (map[string][]Trade, error) + func GetMultiTradesAsync(symbols []string, params GetTradesParams) <-chan MultiTradeItem + func GetQuotesAsync(symbol string, params GetQuotesParams) <-chan QuoteItem + func GetSnapshots(symbols []string) (map[string]*Snapshot, error) + func GetTradesAsync(symbol string, params GetTradesParams) <-chan TradeItem + type APIError struct + Code int + Message string + func (e *APIError) Error() string + type Adjustment string + const All + const Dividend + const Raw + const Split + type Bar struct + Close float64 + High float64 + Low float64 + Open float64 + Timestamp time.Time + TradeCount uint64 + VWAP float64 + Volume uint64 + func GetBars(symbol string, params GetBarsParams) ([]Bar, error) + func GetLatestBar(symbol string) (*Bar, error) + type BarItem struct + Bar Bar + Error error + type Client interface + GetBars func(symbol string, params GetBarsParams) ([]Bar, error) + GetBarsAsync func(symbol string, params GetBarsParams) <-chan BarItem + GetCryptoBars func(symbol string, params GetCryptoBarsParams) ([]CryptoBar, error) + GetCryptoBarsAsync func(symbol string, params GetCryptoBarsParams) <-chan CryptoBarItem + GetCryptoMultiBars func(symbols []string, params GetCryptoBarsParams) (map[string][]CryptoBar, error) + GetCryptoMultiBarsAsync func(symbols []string, params GetCryptoBarsParams) <-chan CryptoMultiBarItem + GetCryptoQuotes func(symbol string, params GetCryptoQuotesParams) ([]CryptoQuote, error) + GetCryptoQuotesAsync func(symbol string, params GetCryptoQuotesParams) <-chan CryptoQuoteItem + GetCryptoSnapshot func(symbol string, exchange string) (*CryptoSnapshot, error) + GetCryptoSnapshots func(symbols []string, exchange string) (map[string]CryptoSnapshot, error) + GetCryptoTrades func(symbol string, params GetCryptoTradesParams) ([]CryptoTrade, error) + GetCryptoTradesAsync func(symbol string, params GetCryptoTradesParams) <-chan CryptoTradeItem + GetLatestBar func(symbol string) (*Bar, error) + GetLatestBars func(symbols []string, feed string) (map[string]Bar, error) + GetLatestCryptoBar func(symbol, exchange string) (*CryptoBar, error) + GetLatestCryptoBars func(symbols []string, exchange string) (map[string]CryptoBar, error) + GetLatestCryptoQuote func(symbol, exchange string) (*CryptoQuote, error) + GetLatestCryptoQuotes func(symbols []string, exchange string) (map[string]CryptoQuote, error) + GetLatestCryptoTrade func(symbol, exchange string) (*CryptoTrade, error) + GetLatestCryptoTrades func(symbols []string, exchange string) (map[string]CryptoTrade, error) + GetLatestCryptoXBBO func(symbol string, exchanges []string) (*CryptoXBBO, error) + GetLatestCryptoXBBOs func(symbols []string, exchanges []string) (map[string]CryptoXBBO, error) + GetLatestQuote func(symbol string) (*Quote, error) + GetLatestQuotes func(symbols []string) (map[string]Quote, error) + GetLatestTrade func(symbol string) (*Trade, error) + GetLatestTrades func(symbols []string) (map[string]Trade, error) + GetMultiBars func(symbols []string, params GetBarsParams) (map[string][]Bar, error) + GetMultiBarsAsync func(symbols []string, params GetBarsParams) <-chan MultiBarItem + GetMultiQuotes func(symbols []string, params GetQuotesParams) (map[string][]Quote, error) + GetMultiQuotesAsync func(symbols []string, params GetQuotesParams) <-chan MultiQuoteItem + GetMultiTrades func(symbols []string, params GetTradesParams) (map[string][]Trade, error) + GetMultiTradesAsync func(symbols []string, params GetTradesParams) <-chan MultiTradeItem + GetNews func(params GetNewsParams) ([]News, error) + GetQuotes func(symbol string, params GetQuotesParams) ([]Quote, error) + GetQuotesAsync func(symbol string, params GetQuotesParams) <-chan QuoteItem + GetSnapshot func(symbol string) (*Snapshot, error) + GetSnapshots func(symbols []string) (map[string]*Snapshot, error) + GetTrades func(symbol string, params GetTradesParams) ([]Trade, error) + GetTradesAsync func(symbol string, params GetTradesParams) <-chan TradeItem + func NewClient(opts ClientOpts) Client + type ClientOpts struct + ApiKey string + ApiSecret string + BaseURL string + Feed string + HttpClient *http.Client + OAuth string + RetryDelay time.Duration + RetryLimit int + Timeout time.Duration + type CryptoBar struct + Close float64 + Exchange string + High float64 + Low float64 + Open float64 + Timestamp time.Time + TradeCount uint64 + VWAP float64 + Volume float64 + func GetCryptoBars(symbol string, params GetCryptoBarsParams) ([]CryptoBar, error) + func GetLatestCryptoBar(symbol, exchange string) (*CryptoBar, error) + type CryptoBarItem struct + Bar CryptoBar + Error error + type CryptoMultiBarItem struct + Bar CryptoBar + Error error + Symbol string + type CryptoQuote struct + AskPrice float64 + AskSize float64 + BidPrice float64 + BidSize float64 + Exchange string + Timestamp time.Time + func GetCryptoQuotes(symbol string, params GetCryptoQuotesParams) ([]CryptoQuote, error) + func GetLatestCryptoQuote(symbol, exchange string) (*CryptoQuote, error) + type CryptoQuoteItem struct + Error error + Quote CryptoQuote + type CryptoSnapshot struct + DailyBar *CryptoBar + LatestQuote *CryptoQuote + LatestTrade *CryptoTrade + MinuteBar *CryptoBar + PrevDailyBar *CryptoBar + func GetCryptoSnapshot(symbol string, exchange string) (*CryptoSnapshot, error) + type CryptoSnapshots struct + Snapshots map[string]CryptoSnapshot + type CryptoTrade struct + Exchange string + ID int64 + Price float64 + Size float64 + TakerSide string + Timestamp time.Time + func GetCryptoTrades(symbol string, params GetCryptoTradesParams) ([]CryptoTrade, error) + func GetLatestCryptoTrade(symbol, exchange string) (*CryptoTrade, error) + type CryptoTradeItem struct + Error error + Trade CryptoTrade + type CryptoXBBO struct + AskExchange string + AskPrice float64 + AskSize float64 + BidExchange string + BidPrice float64 + BidSize float64 + Timestamp time.Time + func GetLatestCryptoXBBO(symbol string, exchanges []string) (*CryptoXBBO, error) + type GetBarsParams struct + Adjustment Adjustment + AsOf string + End time.Time + Feed string + PageLimit int + Start time.Time + TimeFrame TimeFrame + TotalLimit int + type GetCryptoBarsParams struct + End time.Time + Exchanges []string + PageLimit int + Start time.Time + TimeFrame TimeFrame + TotalLimit int + type GetCryptoQuotesParams struct + End time.Time + Exchanges []string + PageLimit int + Start time.Time + TotalLimit int + type GetCryptoTradesParams struct + End time.Time + Exchanges []string + PageLimit int + Start time.Time + TotalLimit int + type GetNewsParams struct + End time.Time + ExcludeContentless bool + IncludeContent bool + NoTotalLimit bool + PageLimit int + Sort Sort + Start time.Time + Symbols []string + TotalLimit int + type GetQuotesParams struct + AsOf string + End time.Time + Feed string + PageLimit int + Start time.Time + TotalLimit int + type GetTradesParams struct + AsOf string + End time.Time + Feed string + PageLimit int + Start time.Time + TotalLimit int + type MultiBarItem struct + Bar Bar + Error error + Symbol string + type MultiQuoteItem struct + Error error + Quote Quote + Symbol string + type MultiTradeItem struct + Error error + Symbol string + Trade Trade + type News struct + Author string + Content string + CreatedAt time.Time + Headline string + ID int + Images []NewsImage + Summary string + Symbols []string + URL string + UpdatedAt time.Time + func GetNews(params GetNewsParams) ([]News, error) + type NewsImage struct + Size string + URL string + type Quote struct + AskExchange string + AskPrice float64 + AskSize uint32 + BidExchange string + BidPrice float64 + BidSize uint32 + Conditions []string + Tape string + Timestamp time.Time + func GetLatestQuote(symbol string) (*Quote, error) + func GetQuotes(symbol string, params GetQuotesParams) ([]Quote, error) + type QuoteItem struct + Error error + Quote Quote + type Snapshot struct + DailyBar *Bar + LatestQuote *Quote + LatestTrade *Trade + MinuteBar *Bar + PrevDailyBar *Bar + func GetSnapshot(symbol string) (*Snapshot, error) + type Sort string + var SortAsc Sort = "asc" + var SortDesc Sort = "desc" + type TimeFrame struct + N int + Unit TimeFrameUnit + var OneDay TimeFrame = NewTimeFrame(1, Day) + var OneHour TimeFrame = NewTimeFrame(1, Hour) + var OneMin TimeFrame = NewTimeFrame(1, Min) + var OneMonth TimeFrame = NewTimeFrame(1, Month) + var OneWeek TimeFrame = NewTimeFrame(1, Week) + func NewTimeFrame(n int, unit TimeFrameUnit) TimeFrame + func (tf TimeFrame) String() string + type TimeFrameUnit string + const Day + const Hour + const Min + const Month + const Week + type Trade struct + Conditions []string + Exchange string + ID int64 + Price float64 + Size uint32 + Tape string + Timestamp time.Time + func GetLatestTrade(symbol string) (*Trade, error) + func GetTrades(symbol string, params GetTradesParams) ([]Trade, error) + type TradeItem struct + Error error + Trade Trade