LSEG Data Library for Python

add_instruments

The add_instruments method is used to add new instruments to the previously defined and opened pricing stream.

Module

lseg.data

Syntax

add_instruments(instruments)

Parameters

Value Description Data type Optional Default value
instruments Single instrument or list of instruments. str, List[str] No -

Returned value

None

Usage

The following example demonstrates how to add new instruments to the previously defined and opened pricing stream:

import lseg.data as ld


stream = ld.open_pricing_stream(
    universe=['GBP=', 'EUR=', 'JPY='],
    fields=['BID', 'ASK'],
)

stream.add_instruments(["MSFT.O", "GOOG.O"])

None

54 words (0:17 mins)