For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
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!
Try
ek.get_data('US345370BR09',['TR.BidPrice'], {'SDate':'05/23/2019', 'EDate':'05/30/2019'}
Thanks Alex, but I was meant to download 'ACCUMULATEDVOLUME' not Bid Price. Bid Price works fine but ACCUMULATEDVOLUME does not seem to work...
Ah. OK. Here's the expression that exactly replicates =TR function you mentioned.
ek.get_data('345370BR0=FINR',['TR.ACCUMULATEDVOLUME'], {'SDate':'05/23/2019', 'EDate':'05/30/2019', 'CALCMETHOD':'SUM', 'FRQ':'W'})