LSEG Data Library for TypeScript

getStream

This method creates and returns the RDP stream that allows you to get streaming data for previously defined parameters.

Syntax

definition.getStream(session: Session)

Parameters

Value Description Data type Optional Default value
session Session object. If it's not passed the default session will be used. Session Yes -

Returned value

RDPStream object.

Usage

The following example demonstrates how to get the stream object to retrieve all the fields for 'RBH0' universe:

const definition = Delivery.RDPStream.Definition({

    universe: {
        instrumentType: IPA.FinancialContracts.Swaption.SWAPTION_INSTRUMENT_TYPE,
        instrumentDefinition: {
            tenor: "3Y",
            instrumentCode: 'EURAB6E3Y=',
        },
    },
    fields: [
        "InstrumentDescription",
        "ValuationDate",
        "StartDate",
        "FixedRate",
        "PV01AmountInDealCcy",
        "Duration",
        "ModifiedDuration",
        "TriggerInfoObject",
        "ErrorMessage"
    ],
    parameters: { universeType: 'Symbol' },
    extendedParams: {
        QoS: {
            Rate: 'TimeConflated',
            RateInfo: 10000,
        },
    },
})

const stream = await definition.getStream();

None.

64 words (0:20 mins)