question

Upvotes
Accepted
2 4 7 13

using screenr with rd api

when I use the code below I get this errors:

raise RDError(-1, except_msg)

refinitiv.data._errors.RDError: Error code -1 | Unable to resolve all requested identifiers in ['SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,20200101,20200108)/*dt:Date*/, CURN=USD)'].


#start_date
start_date="20200101"

#end_date
end_date="20200108"

#universe
universe=f'SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,{start_date},{end_date})/*dt:Date*/, CURN=USD)'

#fields
fields=["TR.COMMONNAME"]

#rd.get_data
df_i=rd.get_data(
    universe=universe,
    fields=fields, 
    #parameters=None,
    #use_field_names_in_headers=None,
    )

#print
print(df_i)

#close_session
rd.close_session()

print("done")
refinitiv-dataplatform-eikonapi
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
80.3k 259 52 75

@nicola.fiore

Thank you for reaching out to us.

The "TR.CommonName" field may be invalid for deal screeners.

The following code works fine.

#start_date
start_date="20200101"
 
#end_date
end_date="20200108"
 
#universe
universe=f'SCREEN(U(IN(DEALS)/*UNV:DEALSMNA*/), BETWEEN(TR.MnAAnnDate,{start_date},{end_date})/*dt:Date*/, CURN=USD)'


#fields
fields=["TR.MnAAnnDate","TR.MnATarget","TR.MnAAcquiror"]
 
#rd.get_data
df_i=rd.get_data(
    universe=universe,
    fields=fields, 
    #parameters=None,
    #use_field_names_in_headers=None,
    )
 
df_i

You can use the Deal Screener app to list all available fields.

1711340723077.png



1711340723077.png (86.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.