Documentation
¶
Index ¶
- Constants
- func FindLast(p currency.Pair, a asset.Item) (float64, error)
- func ProcessTicker(p *Price) error
- func SubscribeTicker(exchange string, p currency.Pair, a asset.Item) (dispatch.Pipe, error)
- func SubscribeToExchangeTickers(exchange string) (dispatch.Pipe, error)
- type Price
- type Service
- type Ticker
Constants ¶
View Source
const (
ErrExchangeNameUnset = "ticker exchange name not set"
)
const values for the ticker package
Variables ¶
This section is empty.
Functions ¶
func ProcessTicker ¶
ProcessTicker processes incoming tickers, creating or updating the Tickers list
func SubscribeTicker ¶
SubscribeTicker subcribes to a ticker and returns a communication channel to stream new ticker updates
Types ¶
type Price ¶
type Price struct {
Last float64 `json:"Last"`
High float64 `json:"High"`
Low float64 `json:"Low"`
Bid float64 `json:"Bid"`
Ask float64 `json:"Ask"`
Volume float64 `json:"Volume"`
QuoteVolume float64 `json:"QuoteVolume"`
PriceATH float64 `json:"PriceATH"`
Open float64 `json:"Open"`
Close float64 `json:"Close"`
Pair currency.Pair `json:"Pair"`
ExchangeName string `json:"exchangeName"`
AssetType asset.Item `json:"assetType"`
LastUpdated time.Time
// Funding rate field variables
FlashReturnRate float64
BidPeriod float64
BidSize float64
AskPeriod float64
AskSize float64
FlashReturnRateAmount float64
}
Price struct stores the currency pair and pricing information
Click to show internal directories.
Click to hide internal directories.