Skip to content
Get started

Websocket Handler

client.V1.Websocket.WebsocketHandler(ctx) error
GET/v1/ws

Upgrade the HTTP connection to a WebSocket and echo incoming messages.

Websocket Handler

package main

import (
  "context"

  "github.com/clear-street/clear-street-go"
  "github.com/clear-street/clear-street-go/option"
)

func main() {
  client := clearstreet.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.V1.Websocket.WebsocketHandler(context.TODO())
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples