getItemStatus
Allows you to get the state of the latest response for the instrument.
Syntax
definition.getItemStatus(instrument: string)
Parameters
Value | Description | Data type | Optional | Default value |
---|---|---|---|---|
instrument | Name of the instrument | string | No | - |
Returned value
A state of the latest response for the instrument (OMMResponseState / undefined).
OMMResponseState interface description
Value | Description | Data type | Optional | Default value |
---|---|---|---|---|
Data | The data associated with the current stream state | string on number | No | - |
Stream | Actual state of the stream | OMMResponseStateType | No | - |
Code | Code of the stream status | string | Yes | - |
Text | Description of the stream state | string | Yes | - |
Usage
The following example demonstrates how to get the state of the latest response.
const stream = Pricing.Definition({
universe: ['EUR=', 'CAD=', 'UAH='],
fields: ['DSPLY_NAME', 'BID_NET_CH'],
}).getStream();
const status = stream.getItemStatus('EUR=');
Related links
None.