Versions in this module Expand all Collapse all v0 v0.0.5 Aug 9, 2020 Changes in this version + var API_ROOT string = "https://api.kraken.com" + var WS_URL = "wss://ws.kraken.com" + func RestPair(input string) string + func WebSocketPair(input string) string + type AddOrderOrderType string + const OrderTypeLimit + const OrderTypeMarket + type AddOrderRequest struct + Pair string + Price float64 + Side OrderSide + Type AddOrderOrderType + UserRef int32 + ValidateOnly bool + Volume float64 + type AddOrderResponse struct + Error []interface{} + Result struct{ ... } + func (r *AddOrderResponse) HasError() bool + type AssetPairInfo struct + AltName string + Pair string + WsName string + type AssetPairResponse struct + Error []interface{} + Result map[string]*AssetPairInfo + type AssetPairService struct + func NewAssetPairService() *AssetPairService + func (s *AssetPairService) GetRestPair(pair string) string + func (s *AssetPairService) GetWsPair(pair string) string + func (s *AssetPairService) LoadResponse(response AssetPairResponse) + func (s *AssetPairService) Refresh() error + func (s *AssetPairService) SetCacheFilename(filename string) + type Book struct + Checksum string + Orders map[Side][]Order + Pair string + func DecodeBook(data map[string]interface{}) (*Book, error) + type CancelOrderResponse struct + Error []interface{} + Result struct{ ... } + func (r *CancelOrderResponse) HasError() bool + type EventMessage struct + ChannelID int64 + ErrorMessage string + Event string + Pair string + RequestID int64 + Status string + Subscription struct{ ... } + type Interval int + const Interval_15d + const Interval_15m + const Interval_1h + const Interval_1m + const Interval_24h + const Interval_30m + const Interval_4h + const Interval_5m + const Interval_7d + type OHLC struct + Close float64 + Count int64 + EndTime float64 + High float64 + Low float64 + Open float64 + Pair string + Time float64 + VWAP float64 + Volume float64 + func DecodeOHLC(data []interface{}) (*OHLC, error) + type Order struct + Price float64 + Timestamp float64 + Volume float64 + type OrderSide string + const OrderSideBuy + const OrderSideSell + type RequestError struct + DecodeError error + HttpError error + NetworkError error + func (e RequestError) Error() string + type RestClient struct + func NewRestClient(apiKey string, apiSecret string) (*RestClient, error) + func (c *RestClient) AddOrder(order AddOrderRequest) (*AddOrderResponse, error) + func (c *RestClient) CancelOrder(txId string) (*CancelOrderResponse, error) + func (c *RestClient) Get(path string) (*http.Response, error) + func (c *RestClient) Post(path string, params map[string]interface{}) (*http.Response, error) + func (c *RestClient) Time() (*TimeResponse, error) + type Side string + const Ask + const Bid + type Spread struct + Ask float64 + Bid float64 + Pair string + Timestamp float64 + func DecodeSpread(input []interface{}) (*Spread, error) + type SubscribeMessage struct + Event string + Pair []string + Subscription map[string]interface{} + type Ticker struct + Ask struct{ ... } + Bid struct{ ... } + Close struct{ ... } + High struct{ ... } + Low struct{ ... } + Open struct{ ... } + Pair string + Trades struct{ ... } + Volume struct{ ... } + Vwap struct{ ... } + func DecodeTicker(data map[string]interface{}) (*Ticker, error) + type TimeResponse struct + Error []interface{} + Result struct{ ... } + type WebSocket struct + Conn *websocket.Conn + func OpenWebSocket() (*WebSocket, error) + func (s *WebSocket) Close() + func (s *WebSocket) Decode(input []byte) (interface{}, error) + func (s *WebSocket) Next() ([]byte, error) + func (s *WebSocket) Ping(reqId int) error + func (s *WebSocket) SubscribeBook(tickers []string, depth int) error + func (s *WebSocket) SubscribeOHLC(interval Interval, tickers ...string) error + func (s *WebSocket) SubscribeSpread(tickers ...string) error + func (s *WebSocket) SubscribeTicker(tickers ...string) error