General information

General information and configs

Hostname

EnvUrl
HOSTNAME (beta)wss://ws-pro.kuna.io/socketcluster/

Clients

Config

Create the server instance (with config options). The options object can have any of the following properties (sample showing defaults). If you need more info about config's parameters, follow this link for documentation.

let opts = {
    brokerEngine: new AGSimpleBroker(),
    wsEngine: 'ws',
    wsEngineServerOptions: {},
    maxPayload: null,
    allowClientPublish: true,
    ackTimeout: 10000,
    handshakeTimeout: 10000,
    strictHandshake: true,
    pingTimeout: 20000,
    pingTimeoutDisabled: false,
    pingInterval: 8000,
    origins: '*:*',
    path: '/socketcluster/',
    protocolVersion: 2,
    authDefaultExpiry: 86400,
    batchOnHandshake: false,
    batchOnHandshakeDuration: 400,
    batchInterval: 50,
    middlewareEmitFailures: true,
    socketStreamCleanupMode: 'kill',
    cloneData: false
  };

Use socketcluster-client and channel

All symbols for streams are lowercase

Incoming from servers

Event: <stream>

Payload:

{
  event: "<stream>",
  data: T
}

Outcoming

Event: <symbol>@trade

Payload:

{
  event: "trade"  // Event type,
  time: 123456789 // Event time,
  data: T         // Event data
}