company vs. security question

JoaoQ
JoaoQ Newcomer

Hello.

I am collecting data using this very simply piece of code:

response = ld.get_history( start = min_date, universe= security, end = max_date, fields= price_fields, adjustments = adjustment_factor, )

I am using RICs as identifiers. How do I make sure that I am only collecting price data for the primary security? Is there a way to use screen to do that?

Cordially,

Joao Quariguasi

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @JoaoQ

    Thank you for reaching out to us.

    Typically, when using RICs, the API returns historical data associated with them.

    Could you please provide more details about your question? Including specific examples would be especially helpful.

  • JoaoQ
    JoaoQ Newcomer

    Hello. In the example above, this is my list of rics,

    ASOS.L
    FTCHQ.PK
    ZALG.DE
    RKET.H
    CNV.PA
    DUST.ST
    "
    MATP.PA^B23"
    BHGF.ST
    ZO1G.H

    Say the data I am collecting, fields = 'OFF_CLOSE''. How do I know from which security is this data being downloaded, given that one company can have more than one security. Are RICs security specific, or company specific?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Each RIC can provide different sets of historical fields.

    You may use the TR.xxx fields instead (such as TR.PriceClose) with the ld.get_data method.

    RICS = ['ASOS.L', 'FTCHQ.PK', 'ZALG.DE','RKET.H','CNV.PA','DUST.ST','MATP.PA^B23','BHGF.ST','ZO1G.H']
    ld.get_data(
        universe = RICS,
        fields = ['TR.PriceClose.Date','TR.PriceClose'],
        parameters = {'SDate':'2025-06-01',
                      'EDate':'2025-06-13'}
    )
    

    You can use the Data Item Browser tool to search for the available fields and parameters.