Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultURL = "wss://ws-feed.exchange.coinbase.com"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct { Name ChannelType ProductIDs []string }
type ChannelType ¶
type ChannelType string
ChannelType represents the type of channel on Coinbase.
const ( ChannelTypeLevel2 ChannelType = "level2" ChannelTypeHeartBeat ChannelType = "heartbeat" ChannelTypeTicker ChannelType = "ticker" ChannelTypeMatches ChannelType = "matches" )
type Request ¶
type Request struct { Type RequestType `json:"type"` ProductIDs []string `json:"product_ids"` Channels []Channel `json:"channels"` }
Request is a request to be sent to the Coinbase websocket.
type RequestType ¶
type RequestType string
RequestType represents the type of request.
const ( RequestTypeSubscribe RequestType = "subscribe" RequestTypeUnsubscribe RequestType = "unsubscribe" RequestTypeSubscriptions RequestType = "subscriptions" RequestTypeError RequestType = "error" )
Click to show internal directories.
Click to hide internal directories.