LSEG Data Library for Python

rdp_stream.Definition object

This object defines the data to retrieve using the data stream from the Delivery Platform.

Module

lseg.data.delivery.rdp_stream

Syntax

rdp_stream.Definition(service, universe, view, parameters, api)

Parameters

Value Description Data type Optional Default value
service RDP service name. str No -
universe Single instrument or list of instruments. str, List[str] No -
view Data fields that should be retrieved from the data stream. str, List[str] No -
parameters Extra parameters to retrieve from the item stream. dict No -
api The streaming data source of the Delivery Platform. str No -

Returned value

rdp_stream.Definition object

Usage

The following example demonstrates how to create a Delivery Platform stream definition for the real-time data stream of the financial contracts data source for "USDAUD":

from lseg.data.delivery import rdp_stream

stream = rdp_stream.Definition(
    service = None,
    api = "streaming.quantitative-analytics.endpoints.financial-contracts",
    universe = {
        "instrumentType": "FxCross", 
        "instrumentDefinition": {
            "instrumentTag": "USDAUD", 
            "fxCrossType": "FxSpot", 
            "fxCrossCode": "USDAUD"
        }
    }, 
    parameters = None,
    extended_params = {
        "marketData": {
            "fxSpots": [
                {
                    "spotDefinition": {
                        "fxCrossCode": "AUDUSD", 
                        "Source": "Composite"
                    }
                }
            ]
        }
    },
    view = ["InstrumentTag", "FxSpot_BidMidAsk", "ErrorCode", "Ccy1SpotDate", "Ccy2SpotDate"]
)

None.

108 words (0:34 mins)