-
Notifications
You must be signed in to change notification settings - Fork 107
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
InstrumentsCandlesFactory not working for monthly granularity #148
Comments
Hi, First of all: you are using it the wrong way.
there is an example in the README.rst of the repo ! Check the docs also: https://oanda-api-v20.readthedocs.io/en/latest/contrib/factories/instrumentscandlesfactory.html I get the impression OANDA added W(eekly) later on and then after that M(onthly). It was april 2018 that I added 'W' to support the weekly data. The function parsing granularity parameter doesn' t support 'M'(onthly) yet. Easy work-around: Instead of using |
Thanks for the response Feit. Sorry, I should have been clearer. I was using the InstrumentsCandlesFactory as you described in my code, and as described in the documentation. I just didn't use it correctly in that 'line below' I was referring to in the bug! I was hacking around with stuff interactively. Yeah, you must have read my mind. I have already coded the work around you suggested (i.e. if / else checking granularity) before your reply! That was a great suggestion you made!!! 😊 Finally, just for completeness, do you think the "M" / monthly granularity will be made available at some point in the future in InstrumentsCandlesFactory? Thanks. |
For completeness it should be there. To be honest: I don't think there is much value in monthly data. |
Are there any plans to add this enhancement please? |
Hi
The InstrumentsCandlesFactory is not working for "monthly" granularity. Works fine for weekly and daily granularities.
Using parameters below.
Say instrument is "AU200_AUD"
Basically, calling line below:
client.request(factories.InstrumentsCandlesFactory(instrument=instrument, params=params))
Running line in Interactive Window in VSCode (using WinPython) yields error below.
AttributeError Traceback (most recent call last)
in
I've just run the script for daily & weekly data - so pretty sure OANDA is working fine.
The text was updated successfully, but these errors were encountered: