WebSocket API
Data
Streams push each update as it happens, under wss://api.datamaxiplus.com/ws/v1, billed per connection-minute. Channels:
Announcement
CEX
Forex
Authentication
Streams take your API key in the X-DTMX-APIKEY header. Sign up at datamaxiplus.com and copy your key from My page → API keys (open).
Details: Authentication.
Pricing
WebSocket streams draw from the same prepaid credit balance as the REST API and the MCP server (the Stream tier).
- Each open connection is billed per connection-minute: 70 credits ($0.0070) on the listing announcement stream, 2 credits ($0.0002) on every other channel. Subscribe requests are not billed, and adding more pairs to a connection doesn't cost more.
- Each channel is its own connection, so each open channel is billed separately — about $8.64 per channel per 30 days if it stays open around the clock (about $302.40 for the listing stream).
- When your balance runs out, the server closes the stream. Top up from My page → Billing and reconnect.
Streaming is usually far cheaper than polling REST every few seconds. See Pricing and billing for prices, top-ups and example costs.
Ping
The DataMaxi+ WebSocket server sends protocol-level Ping frames every 30 seconds to every connected client. Compliant WebSocket libraries respond automatically with a Pong frame — no application-level code is needed to keep the connection alive.
Clients may additionally send an application-level PING message shown below (for example, as a client-side health check). It is not required to keep the connection alive, but sending it will not disconnect you.
Connections that go longer than 30 minutes without any traffic (protocol pings, app-level pings, or subscribed data) will be closed by the server. In practice, our 30-second server-initiated protocol pings mean an idle connection stays open indefinitely as long as the client's WebSocket library responds to Pong.
We recommend implementing exponential-backoff reconnect logic on the client to survive transient network issues (mobile hand-off, brief upstream restarts, etc.).
- schema
- example
{
"method": "PING",
"params": [],
"id": int32
}
{
"method": "PING",
"params": [],
"id": 1
}