Skip to main content

Module websocket

Module websocket 

Source
Expand description

Current market-stream and legacy cluster WebSocket connections.

StandardWebSocketClient supports FMP’s current native WebSocket at wss://socket.financialmodelingprep.com, with approved exchange, synthetic, and delayed streams. StreamEntitlements explicitly records the approved streams, while Subscription records the separately configured plan.

The legacy WebSocketClient supports stock, crypto, and forex clusters. Legacy public docs omit successful login acknowledgments, so its config requires an account-specific LoginConfirmation. Both connectors wait for confirmed authentication before allowing subscriptions and report active connection failures without silently reconnecting.

Structs§

AuthenticationStatus
Required fields in the standard protocol’s nested login response.
CloseInfo
The remote peer’s completed close handshake.
ControlEvent
A validated JSON control envelope with its original, credential-redacted JSON.
Heartbeat
A standard stream heartbeat with the provider’s required timestamp.
MarketStream
A documented standard WebSocket stream, including its delayed variant.
QuoteUpdate
Required fields of a top-of-book quote update.
StandardWebSocketClient
FMP’s current native WebSocket connector for approved market streams.
StreamConfig
Explicit timeouts and retry settings for the standard stream protocol.
StreamEntitlements
Explicit stream grants confirmed in the account dashboard or with FMP.
StreamQuote
A standard stream quote with required symbol, price, and timestamp.
TradeUpdate
Required fields of a trade or trade-break update.
WebSocketClient
An authenticated connector to FMP’s legacy stock, crypto, or forex cluster.
WebSocketConfig
Explicit timeouts and connection retry settings.

Enums§

MarketUpdate
A strictly typed update using FMP’s documented T/Q/B discriminator.
WebSocketCluster
The FMP market cluster to connect to.
WebSocketError
A specific connection, configuration, server, or protocol failure.
WebSocketEvent
An incoming application, pong, or close event.

Type Aliases§

LoginConfirmation
Validates an account’s login acknowledgment.