Constituents Channel
CHANNELconstituents
The constituents
channel provides real-time values and weights of constituents for basket and
NASDAQ indices.
Subscribe Request
- Subscribe Schema
- Example
MESSAGE BODY
type string required
Value:
subscribe
stream string required
Value:
constituents
id string required
stream ID
{
"type": "subscribe",
"id": "NCI",
"stream": "constituents"
}
Responses
- Update Response Schema
- Nasdaq Update Example
- Basket Update Example
- Failed Subscribe Schema
- Failed Subscribe Example
No ack response if successful. The most recent value will be sent, and subsequent values until the unsubscribe command is sent.
MESSAGE BODY
type string
Value:
constituents
id string
Stream ID
time string
Calculation time of value in milliseconds since Unix epoch
value string
Index value
divisor string conditional
Condition: Only sent for Nasdaq indices
Index divisor
constituents object
constituent string
Constituent name
value string
Constituent value
weightPercent string
Constituent weight percentage
exchanges array [ conditional]
Condition: Only sent for Nasdaq indices
[many] exchange weight object
exchange string
Exchange name
weightPercent string
Exchange weight percentage
{
"type": "constituents",
"time": 1618922805000,
"id": "NCI",
"value": "2835.55",
"divisor": "203484212.3109",
"constituents":[
{
"constituent": "LINK",
"value": "35.0013",
"weightPercent": "1.27",
"exchanges": [
{ "exchange": "exchangeA", "weightPercent": "54.14" },
{ "exchange": "exchangeB", "weightPercent": "20.55" },
{ "exchange": "exchangeC", "weightPercent": "25.31" }
]
},
{
"constituent": "BCH",
"value": "793.3554",
"weightPercent": "1.03",
"exchanges": [
{ "exchange": "exchangeA", "weightPercent": "59.38" },
{ "exchange": "exchangeB", "weightPercent": "20.62" },
{ "exchange": "exchangeC", "weightPercent": "20.00" }
]
}
]
}
{
"type": "constituents",
"time": 1618922805000,
"id": "UC5_RR_TR",
"value": "2835.55",
"divisor": "203484212.3109",
"constituents":[
{
"constituent": "LINK",
"value": "35.0013",
"weightPercent": "1.27",
},
{
"constituent": "BCH",
"value": "793.3554",
"weightPercent": "1.03",
}
]
}
Returned if you specified an unknown stream ID.
MESSAGE BODY
type string
Value:
subscribe
id string
Stream ID
stream string
Value:
constituents
success boolean
Value:
false
reason string
Error description
{
"type": "subscribe",
"id": "BRR",
"stream": "constituents",
"success": false,
"reason": "Unrecognised id"
}
Unsubscribe Request
- Unsubscribe Schema
- Unsubscribe Example
No direct response if successful. Messages for the subscription will cease.
MESSAGE BODY
type string required
Value:
unsubscribe
stream string required
Value:
constituents
id string required
stream ID
{
"type": "unsubscribe",
"id": "NCI",
"stream": "constituents"
}