LSEG Data Library for Python - extended documentation for valid parameter values

Where can i get full documentation of all the valid arguments that can be used with the LSEG Data library for python?

For example, the get Fundamentals data function takes a dict for the parameters argument - where can i get a list of all the keys and definitions that are supported for this arg?

https://cdn.refinitiv.com/public/lseg-lib-python-doc/2.0.0.2/book/en/sections/content-layer/fundamental-reference/fundamental-and-reference-definition.html

Thanks!

Answers

  • Hi @jonathan.yow

    The parameters dictionary is basically a name:value pair defined using a standard Python dict:

    parameters = {'SData': '0CY', 'Curn': 'CAD'}
    

    Because the possible values and combinations is so extensive and does change from time to time, the proper way to determine the available parameters is to utilize the Data Item Browser (DIB) within Workspace. For example:

    ahs2.png

    In the above, when you click on a field of interest (left side), you will be presented with a description and possible parameters to use - it is here where you would determine your name/value pairs. For example, there are 4 different name value/pairs for the TR.Volume field selected:

    fields = TR.Volume(SDate=0,EDate=-1,Frq=D,Scale=5)
    

    However, the parameters dict will apply to all fields within your request like this:

    fields = ["TR.Volume"],
    parameters = { 'SDate': 0,   'EDate': -1,   'Frq': 'D',   'Scale': 5 }
    

    Refer to the 'GetData()' function - which you can use instead - for some examples.

  • Hi @jonathan.yow

    I would also look for some videos/articles within the developer portal.