Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BitstampDetails = types.ExchangeQueryDetails{ Exchange: exchange_common.EXCHANGE_ID_BITSTAMP, Url: "https://www.bitstamp.net/api/v2/ticker/", PriceFunction: BitstampPriceFunction, IsMultiMarket: true, } )
Functions ¶
func BitstampPriceFunction ¶
func BitstampPriceFunction( response *http.Response, tickerToExponent map[string]int32, medianizer lib.Medianizer, ) (tickerToPrice map[string]uint64, unavailableTickers map[string]error, err error)
BitstampPriceFunction transforms an API response from Bitstamp into a map of tickers to prices that have been shifted by a market specific exponent.
Types ¶
type BitstampTicker ¶
type BitstampTicker struct { Pair string `json:"pair" validate:"required"` AskPrice string `json:"ask" validate:"required,positive-float-string"` BidPrice string `json:"bid" validate:"required,positive-float-string"` LastPrice string `json:"last" validate:"required,positive-float-string"` }
BitstampTicker is our representation of ticker information returned in Bitstamp response. Need to implement interface `Ticker` in util.go.
func (BitstampTicker) GetAskPrice ¶
func (t BitstampTicker) GetAskPrice() string
func (BitstampTicker) GetBidPrice ¶
func (t BitstampTicker) GetBidPrice() string
func (BitstampTicker) GetLastPrice ¶
func (t BitstampTicker) GetLastPrice() string
func (BitstampTicker) GetPair ¶
func (t BitstampTicker) GetPair() string
Click to show internal directories.
Click to hide internal directories.