Interface WebSocketRequestSubscribeStrictWithoutTopLevelMarkets

When providing a top-level markets parameter, we can accept subscriptions using a short-hand of the subscription name only.

  • If a subscription does not provide its own markets parameter, it will inherit the top-level markets array provided.
interface WebSocketRequestSubscribeStrictWithoutTopLevelMarkets {
    method: "subscribe";
    subscriptions: (IDEXSubscribeTypeAuthenticated | (IDEXSubscribeTypePublic & { markets: string[]; }))[];
    cid?: string;
}

Hierarchy (view full)

Properties

method: "subscribe"

The subscribe method is used to subscribe to a list of subscriptions based on your provided parameters.

subscriptions: (IDEXSubscribeTypeAuthenticated | (IDEXSubscribeTypePublic & { markets: string[]; }))[]
  • When top-level markets is provided:
    • we can accept string subscription names or full subscriptions and the subscriptions markets parameter is optional.
    • candles may never be provided as a name-string as it has a required interval parameter.
  • when top level markets property is not provided:
    • all unauthenticated subscriptions require the markets array so may not be defined only by their name.
    • authenticated subscriptions may still be defined by name
cid?: string

Requests may optionally provide a cid parameter to identify the request a response should be associated with.

  • When provided, the onResponse callback object will include the provided cid as a property.