Twelve Data streams prices over a real WebSocket, and the only contract for it is one we wrote

Twelve Data streams prices over a real WebSocket, and the only contract for it is one we wrote

The most interesting of the 15 APIs Twelve Data publishes on apis.io is the one that is not REST. The Twelve Data WebSocket Streaming API is a persistent, bidirectional connection at wss://ws.twelvedata.com/v1/quotes/price that pushes price events for stocks, forex and crypto as trades happen, at roughly 170ms average latency by Twelve Data’s own documentation. It is the real-time face of a market data company, and it is the part of the surface Twelve Data has not described in a machine-readable form.

What the API does

The shape is simple, and that is a compliment. One channel carries everything. The client authenticates by appending an apikey query parameter to the connection URL, then sends JSON control messages: subscribe with a comma-separated symbol list such as AAPL,EUR/USD,BTC/USD, unsubscribe, and reset, which clears every subscription on the connection. The server answers on the same socket with a subscribe-status acknowledgement that lists which symbols succeeded and which failed, then price events carrying symbol, exchange, currency, timestamp, price and day volume, interleaved with heartbeat messages.

That is one channel and six message types, three in each direction. The metering is the detail an integrator has to plan around: each successfully subscribed symbol costs one WebSocket credit, and WebSocket credits are metered separately from the REST credits that the free Basic plan grants at 800 a day. Twelve Data’s docs put WebSocket access at trial credits on Basic and Grow, 1,500 on Pro, and 10,000 on Ultra.

The contract is ours, and the record says so

The page’s artifacts are the documentation and an AsyncAPI 2.6 specification. That AsyncAPI names API Evangelist as its contact. We wrote it from the docs page. The Agent Readiness record is honest about it: the event surface dimension reads derived, not verified, and it is not credited to Twelve Data.

That matters more here than it would for most providers, because the rest of Twelve Data’s agent story is first-party. It runs its own MCP server, verified. Protected resource metadata is verified, delegated identity is served, dynamic client registration is lit, and error semantics and OpenAPI examples are verified. The Agent Readiness score is 62.0, agent-ready, gated down from agent-native. An agent can find Twelve Data, authorize against it and call its REST endpoints on Twelve Data’s own terms. To stream, it has to read our description of the socket or read the HTML.

The Kin Score is 69.0, exemplar, down from 73.3. Access clarity is 96.8 and developer ergonomics 81.5. Contract governance is 15.9, the weakest facet by a distance.

One defect on our side belongs in the same paragraph. Nine of Twelve Data’s REST API pages on apis.io, from Advanced and Analysis to Mutual Funds and Regulatory, currently show the WebSocket URL as their base URL instead of https://api.twelvedata.com. The OpenAPI sources are right. The page field is wrong, and it is ours to fix.

What would move the number

Twelve Data should publish its own AsyncAPI for the price socket, next to its OpenAPI. The message set is small enough that ours could be the starting draft. That flips the event surface from derived to verified, gives agents a contract for the one API where freshness is the product, and puts a first description of the credit model where tools can read it.

See the API at apis.io/apis/twelvedata/twelvedata-websocket-streaming-api/.

← The Things Network scores 79.2, exemplar, and its agent layer is still one we wrote