question

Upvotes
Accepted
3 1 1 3

Obtain 'On Balance Volume' from DataStream Python API -- it's expression '058E'

Hello,

We currently obtain the 'On Balance Volume' using expression '058E' in the Excel plug-in. We would prefer to collect this data using the DataStream Python API.

However, I cannot work out how to write the request. Using '058E' as the 'field' doesn't work: it fails with an error message.

I've also tried using the expanded version of the expression as the 'field' -- which is 'CSUM#((ACH#(X,1D))/ABS#(ACH#(X,1D))*X(VO))'. This returns some data, but the numbers are different to the ones obtained through Excel.

Can you advise on how we should be running this query?

Many thanks.


#contentdatastream-api
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
Upvote
Accepted
87k 294 53 79

@operations04

Thank you for reaching out to us.

I ran the following code and it works fine.

df=ds.get_data(tickers="@GOOGL",fields =["058E(X)"], kind=0)
df

1727236571746.png



1727236571746.png (7.8 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.

Thank you very much -- that was exactly what I needed to know.

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.