Documentation ¶
Index ¶
- Constants
- type Channel
- type ChannelMessage
- type Client
- type ExecutionHandler
- type Message
- type OrderBookHandler
- type OrderBookUpdateHandler
- type RequestParam
- type Session
- type Subscriber
- func (s *Subscriber) HandleExecution(pcs []markets.ProductCode, handler ExecutionHandler)
- func (s *Subscriber) HandleOrderBook(pcs []markets.ProductCode, handler OrderBookHandler)
- func (s *Subscriber) HandleOrderBookUpdate(pcs []markets.ProductCode, handler OrderBookUpdateHandler)
- func (s *Subscriber) HandleTicker(pcs []markets.ProductCode, handler TickerHandler)
- func (s *Subscriber) ListenAndServe(sess *Session) error
- type SubscriberOpts
- type TickerHandler
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelMessage ¶
type ChannelMessage struct { Channel Channel `json:"channel"` Message jsonencoding.RawMessage `json:"message"` }
type Client ¶
func (*Client) APIEndpoint ¶
type ExecutionHandler ¶
type ExecutionHandler func(executions.Response) error
type Message ¶
type Message struct { Version string `json:"jsonrpc"` Method string `json:"method"` Params ChannelMessage `json:"params"` }
type OrderBookHandler ¶
type OrderBookUpdateHandler ¶
type RequestParam ¶
type RequestParam struct {
Channel Channel `json:"channel"`
}
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber() *Subscriber
func NewSubscriberWithOpts ¶
func NewSubscriberWithOpts(opts *SubscriberOpts) *Subscriber
func (*Subscriber) HandleExecution ¶
func (s *Subscriber) HandleExecution( pcs []markets.ProductCode, handler ExecutionHandler, )
func (*Subscriber) HandleOrderBook ¶
func (s *Subscriber) HandleOrderBook( pcs []markets.ProductCode, handler OrderBookHandler, )
func (*Subscriber) HandleOrderBookUpdate ¶
func (s *Subscriber) HandleOrderBookUpdate( pcs []markets.ProductCode, handler OrderBookUpdateHandler, )
func (*Subscriber) HandleTicker ¶
func (s *Subscriber) HandleTicker( pcs []markets.ProductCode, handler TickerHandler, )
func (*Subscriber) ListenAndServe ¶
func (s *Subscriber) ListenAndServe(sess *Session) error
type SubscriberOpts ¶
type SubscriberOpts struct {
Debug bool
}
type TickerHandler ¶
Click to show internal directories.
Click to hide internal directories.