Module cbadv::websocket

source ·
Expand description

Coinbase Advanced Websocket Client

websocket gives access to the websocket stream to receive updates in a streamlined fashion. Many parts of the REST API suggest using websockets instead due to ratelimits and being quicker for large amount of constantly changing data.

Structs

  • Candles Event received from the WebSocket, contained inside the Candles Message.
  • Message received from the WebSocket API. Contains updates on candles.
  • Heartbeats Event received from the WebSocket, contained inside the Heartbeats Message.
  • Message received from the WebSocket API. Real-time pings from the server to keep connections open.
  • Level2 Event received from the WebSocket, contained inside the Level2 Message.
  • Message received from the WebSocket API. All order updates for a products. Best way to keep a snapshot of the order book.
  • Data received from the WebSocket for Level2 Events.
  • Market Trades Event received from the WebSocket, contained inside the Market Trades Message.
  • Message received from the WebSocket API. Real-time updates everytime a market trade happens.
  • Status Event received from the WebSocket, contained inside the Status Message.
  • Message received from the WebSocket API. Contains updates on product statuses.
  • Subscribe Event received from the WebSocket, contained inside the Subscribe Message.
  • Message received from the WebSocket API. Provides updates for the current subscriptions.
  • Data received from the WebSocket for Subscription Update Events.
  • Ticker Event received from the WebSocket, contained inside the Ticker Message.
  • Message received from the WebSocket API. Contains updates on products and currencies.
  • User Event received from the WebSocket, contained inside the User Message.
  • Message received from the WebSocket API. Contains order updates strictly for the user.
  • Represents a Client for the Websocket API. Provides easy-access to subscribing and listening to the WebSocket.

Enums

  • WebSocket Channels that can be subscribed to.
  • Messages that could be received from the WebSocket.

Traits

  • Used to pass to a callback to the candle watcher on a successful ejection.
  • Used to pass objects to the listener for greater control over message processing.

Functions

  • Starts the listener which returns Messages via a callback function provided by the user. This allows the user to get objects out of the WebSocket stream for additional processing. the WebSocket. If it is unable to parse an object received, the user is supplied CBAdvError::BadParse along with the data it failed to parse.
  • Starts the listener with a callback object that implements the MessageCallback trait. This allows the user to get objects out of the WebSocket stream for additional processing. the WebSocket. If it is unable to parse an object received, the user is supplied CBAdvError::BadParse along with the data it failed to parse.
  • Watches candles for a set of products, producing candles once they are considered complete.

Type Aliases