Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMarketDataEndpoint = "wss://advanced-trade-ws.coinbase.com"
View Source
var DefaultSuccessHttpStatusCodes = []int{http.StatusOK}
View Source
var DefaultUserOrderDataEndpoint = "wss://advanced-trade-ws-user.coinbase.com"
Functions ¶
func AddAdvancedHttpHeaders ¶
func DefaultDialerConfig ¶
func DefaultDialerConfig(url string) core.DialerConfig
func DefaultHttpClient ¶
Types ¶
type RestClient ¶
type RestClient interface { SetHttpBaseUrl(u string) RestClient HttpBaseUrl() string HttpClient() *http.Client Credentials() *credentials.Credentials SetHeadersFunc(hf core.HttpHeaderFunc) RestClient HeadersFunc() core.HttpHeaderFunc }
func NewRestClient ¶
func NewRestClient(credentials *credentials.Credentials, httpClient http.Client) RestClient
type WebSocketClient ¶
type WebSocketClient interface { // Dial establishes the WebSocket connection using the underlying // DialerConfig. Dial(ctx context.Context) error // Close closes the WebSocket connection. Close() error // Subscribe sends a subscription request for one or more // channels (e.g., "ticker", "level2", "user", etc.). Subscribe(request model.SocketRequest) error // Listen continuously reads messages from the WebSocket // connection, passing each message to the provided handler. // It blocks until the context is cancelled or an error occurs. Listen(ctx context.Context, handleMessage core.OnWebSocketTextMessage) <-chan error }
func NewWebSocketClient ¶
func NewWebSocketClient(cfg core.DialerConfig) WebSocketClient
Click to show internal directories.
Click to hide internal directories.