For the complete documentation index, see llms.txt. This page is also available as Markdown.

Websocket V1

WebSocket API Documentation for real time Tickers Monitoring

Overview

This API allows clients to subscribe/unsubscribe to real-time market feeds over Socket.IO.Supported feed types:

  • Crypto tickers via subscribe_ticker / unsubscribe_ticker

  • Equities via subscribe_equity / unsubscribe_equity

Updates are currently emitted every 1 second for subscribed feeds. Each emitted record includes sentTimestampMs (server send timestamp in milliseconds).

Authentication

A valid API key is required at connection time. Use either:

  • auth.apiKey (recommended)

  • x-api-key handshake header

If key is missing/invalid, connection is rejected with connect_error (e.g. Missing or invalid API key.).

WebSocket endpoint

WebSocket communication is implemented using a socket.io server, providing built-in support for automatic message compression and automatic reconnections, making client integration simpler and more reliable.

To connect, use the following WebSocket endpoint:

  • Server URL: https://pricing.aleno.ai

  • Socket.IO path: /v1/socket

Javascript Example (using socket.io-client):

Events

Client -> Server

  • subscribe_ticker (string[], ack)

  • unsubscribe_ticker (string[], ack)

  • subscribe_equity (string[], ack)

  • unsubscribe_equity (string[], ack)

Server -> Client

  • new_token_states (crypto updates)

  • new_equity_states (equities updates)

Subscription behavior

  • Symbols are normalized server-side (trim + uppercase).

  • Unsupported symbols are rejected.

  • Subscription acknowledgements can be:

  • ok (all accepted),

  • partial (some accepted, some rejected),

  • error (request rejected, e.g. per-key feed limit exceeded).

Acknowledgement payload

Fields:

  • status: operation result

  • involvedSubscriptions: accepted symbols involved in the request

  • subscriptionsAfterUpdate: current active subscriptions after processing

  • rejectedSubscriptions (optional): unsupported/denied symbols

  • error (optional): human-readable error for rejected operation

Example: subscribe to crypto + equities


Unsubscribe example


Payload notes

new_token_states

Array of crypto ticker state objects (existing ticker schema) with additional:

  • sentTimestampMs: number

new_equity_states

Array of objects:

  • sentTimestampMs: number

  • symbol: string

  • price: number


Limits

Per API key limits are enforced server-side (customer-specific configuration), including feed subscription limits.If a subscription exceeds your allowed limit, the server returns:

  • status: "error"

  • error: "Subscription limit reached. Contact us to increase limits."


Reconnection & resubscription

Socket.IO handles transport reconnection automatically, but clients should always reissue subscriptions on reconnect to guarantee continuity after disconnect/server restarts.socket.on('connect', () => { // re-subscribe all required feeds here});

Last updated