Dowloading Traded Volume using Python (Eikon API) - get_data

Hi,

I'm trying to download the traded volume (accumulated volume) for bonds between two specific dates. In Excel, the syntax is :

=TR(Bond Identifier,"TR.ACCUMULATEDVOLUME","Frq:W TRANSPOSE:YES CALCMETHOD:SUM SDate:05/23/19 EDate:05/30/19").

I'm trying this:

TV, err = ek.get_data(Bond Identifier,[{'TR.BidPrice':{'params':{'SDate':"05/23/2019", 'EDate':"05/30/2019"}}}], debug = False)

but only NaN values shows up. Can you help me translate that into Python syntax? Thank you!

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    Try

    ek.get_data('US345370BR09',['TR.BidPrice'],
    {'SDate':'05/23/2019', 'EDate':'05/30/2019'}

Answers