Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GateDetails = types.ExchangeQueryDetails{ Exchange: exchange_common.EXCHANGE_ID_GATE, Url: "https://api.gateio.ws/api/v4/spot/tickers", PriceFunction: GatePriceFunction, IsMultiMarket: true, } )
Functions ¶
func GatePriceFunction ¶
func GatePriceFunction( response *http.Response, tickerToExponent map[string]int32, resolver types.Resolver, ) (tickerToPrice map[string]uint64, unavailableTickers map[string]error, err error)
GatePriceFunction transforms an API response from Gate into a map of tickers to prices that have been shifted by a market specific exponent.
Types ¶
type GateTicker ¶
type GateTicker struct { Pair string `json:"currency_pair" validate:"required"` AskPrice string `json:"lowest_ask" validate:"required,positive-float-string"` BidPrice string `json:"highest_bid" validate:"required,positive-float-string"` LastPrice string `json:"last" validate:"required,positive-float-string"` }
GateTicker is our representation of ticker information returned in Gate response. Need to implement interface `Ticker` in util.go.
func (GateTicker) GetAskPrice ¶
func (t GateTicker) GetAskPrice() string
func (GateTicker) GetBidPrice ¶
func (t GateTicker) GetBidPrice() string
func (GateTicker) GetLastPrice ¶
func (t GateTicker) GetLastPrice() string
func (GateTicker) GetPair ¶
func (t GateTicker) GetPair() string
Click to show internal directories.
Click to hide internal directories.