Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hourly OHLCV in subscription and orders #367

Closed
MislavSag opened this issue Jul 6, 2022 · 9 comments
Closed

Hourly OHLCV in subscription and orders #367

MislavSag opened this issue Jul 6, 2022 · 9 comments

Comments

@MislavSag
Copy link

Is it possible to use subscription function to retrieve OHLCV data for many stocks every hour ? I suppose I can use get symbols after an hour, but I would like to use subscription instead.

Bonus question : Is it possible to place / delete / modify orders via Bloomberg using R? I would like to write simple algo in hour, but if not possible, I will have to move to python.

@eddelbuettel
Copy link
Member

  1. Please have the courtesy to close an ticket you opened when we reported back to you. I think getBars doesn't work for equities #366 is done, no?

  2. We are not the Bloomberg Help Desk, in other words we do not get paid for this. Nothing is hidden from you, so please glance at the package to see what is there today. I think there is little in terms of subscription report.

  3. More forward looking, we can support whatever the C++ API we are building on top of supports. Maybe you want to chip in with a routine or two?

Otherwise, yes, there is always Python or your trusted E#$%l plugin.

@MislavSag
Copy link
Author

  1. Usually, If I am not sure if the author wants to close it, I leave it open. For example, if you maybe want to change examples in the readme from "GOOG Equity" to "GOOG US Equity" .
  2. I have skimmed the package and didn't find anything connected to making orders. I was asking if something like this is possible inside this package or you know some other place to look at.
  3. I see you use C++ (Rcpp), but unfortunately, I am not that good at it to write my own C++ script as in Bloomberg documentation. Maybe this is good as motivation to learn it better.

@klin333
Copy link

klin333 commented Jul 7, 2022

Usually I first figure out whether something is possible in excel api, because for that you can fully utilise Bloomberg help desk.

The c++ api capabilities should be a subset (at best equal) of excel api. And rblpapi capabilities is a strict subset of c++ api.

Try helpdesk, or your Bloomberg sales rep. But for api based trade orders, I would interface directly with brokers that offer such capability - it’s their core business. Bloomberg is not a broker.

@eddelbuettel
Copy link
Member

I suggest we close this. CCing @johnlaing @armstrtw

@eddelbuettel
Copy link
Member

For example, if you maybe want to change examples in the readme from "GOOG Equity" to "GOOG US Equity" .

Fair point, and helpful hint. A quick recursive grep show examples using 'Equities' to be preceded by ticker and 'US' in about ten examples and spots but not in the README so I will address that there.

@johnlaing
Copy link
Contributor

README change has been implemented (thanks Dirk) and merged.

While it is certainly outside the scope of the package I do not think Bloomberg offers any sort of trading functionality via the API. If they did, we would have to think very hard about whether there are enough legal disclaimers in the world to entice us to implement those features.

@klin333
Copy link

klin333 commented Jul 26, 2022

i stand corrected on the front of altering orders with bloomberg api. turns out, if you are referring to EMSX, you can definitely do that via the c++ bloomberg api.

ideas of how to do that, from some generic guide i found online: https://emsx-api-doc.readthedocs.io/en/latest/introduction.html . seems like you have to sign some paper work and at least get the EMSX tool working on your Excel first as a test.

Then it's just a matter of coding up R wrappers for the c++ functionality. Bunch of example c++ code here https://github.com/tkim/emsx_api_repository , how to create orders, cancel orders etc.

It'll be a lot of engineering effort to port these functionality into R. Probably your best bet is indeed python or C++.

A question to the maintainers of Rblpapi, is the legal framework set up such that developers of this package have their backs covered in case of problems that arise from this package's usage. I mean someone could be game enough to code up these functionality, but probably will feel uneasy about whether we are covered if others use it and suffer losses due to bugs...

@klin333
Copy link

klin333 commented Jul 26, 2022

having looked further, there are similarities between EMSX API functions with what Rblpapi currently supports. Eg, to create a new order, it's very similar to sending a bdp request (but instead of setting the field name you want to request, you set the ticker and amount you want to trade), https://github.com/tkim/emsx_api_repository/blob/master/EMSXFullSet_Python/CreateOrder.py

Anyway, here's pointers to anyone interested.
https://emsx-api-doc.readthedocs.io/en/latest/programmable/requestResponse.html

@klin333
Copy link

klin333 commented Jul 26, 2022

i would say, best course of action is, code up whatever subset of EMSX API functionality you need in python, into nice functions, then call these functions in R using reticulate. this way, you get the best of both worlds, ie data and trading algorithm developed in R, and the full spectrum of EMSX functionality available to you and easily customised in python, exposed to your R main program via reticulate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants