Skip to main content

WebsocketTask

Opens and maintains a websocket for light speed data retrieval.

Input: None

Returns: String representation of the websocket subscription message.

Example: Opens a coinbase websocket

{
"websocketTask": {
"url": "wss://ws-feed.pro.coinbase.com",
"subscription": "{\"type\":\"subscribe\",\"product_ids\":[\"BTC-USD\"],\"channels\":[\"ticker\",{\"name\":\"ticker\",\"product_ids\":[\"BTC-USD\"]}]}",
"maxDataAgeSeconds": 15,
"filter": "$[?(@.type == 'ticker' && @.product_id == 'BTC-USD')]"
}
}


Fields

NameTypeDescription
 filter

string

Incoming message JSONPath filter. / Example: “$[?(@.channel == ‘ticker’ && @.market == ‘BTC/USD’)]”

 maxDataAgeSeconds

int32

Minimum amount of time required between when the horses are taking out.

 subscription

string

The websocket message to notify of a new subscription.

 url

string

The websocket url.