What's the difference between an API and a protocol?
To use a specific example: Is Coinbase's choice to refer to its WebSocket client specification as an "API" appropriate? It seems that many companies in their space followed their naming trend. For example, FTX calls this client specification their WebSocket API. This seems like a misuse of the term "API".
As far as I can tell, both docs above provide specification of a wire protocol for data exchange, e.g. message formats, communication, transport etc., built on top of WebSocket as an application layer. Strictly speaking, it seems more appropriate to refer these as WebSocket-based protocols or WebSocket client specifications. Drawing from a similar example, it seems fine to call the ITCH protocol a protocol, but not "the ITCH API".
But for example if a developer follows Coinbase's client specification, implements a JavaScript client library that includes a WebSocket client that has subroutines or methods for communicating with their services, we could refer to these as a WebSocket client API.
I think the appropriate situation to refer to something as a "WebSocket API" is say when a browser exposes a WebSocket API, since said API implements the WebSocket protocol and provides interfaces for sending and receiving data on a WebSocket connection. Such API becomes something that a browser application can integrate.
Likewise, it feels weird to say a sentence like "This is an unofficial client library that integrates FTX's Websocket API" when it is merely sending JSON messages in specified formats.