Closed sauloguerra closed 6 years ago
Hi @sauloguerra
Thanks for reporting this problem and file this issue. As you've mentioned rbcb doesn't use an API, it fetch the data from a FORM and this form has its own issues. BCB has released a brand new API to access the currency data. I am working on it and, I hope, soon a new rbcb version will be released using this API.
@sauloguerra I implemented a workaround and I guess that will work with the major currencies.
I was studying the API and I have seen that it won't solve this particular issue.
I am closing a new release by the end of this week so I guess this fix will be available on CRAN in the next week.
thanks.
Hello,
First of all congratulations for the package, it's excellent!
I was using the package to retrieve time series for all currencies in a loop, and I noticed that there is a problem when it comes to querying certain currencies.
The function uses the PTAX forms and the select reference (ChkMoeda) to perform the query. The problem: there are, for some 3 letter ISO codes of the currency, more than one reference in the form list for the same currency.
Exemplifying, the following query does not quote for the period, even if there is some data in the PTAX:
There are two references to PESO MEXICO in the form (I imagine an old one - no / in the text - that does not work and a recent one - with / in the text - that works), and I believe that when the parser is being made to translate 'MXN' for ChkMoeda from Mexico is catching the very first entry of PESO MEXICO (no /) that does not work. If you try the PTAX form with PESO/MEXICO, it works.
It seems to me that some adjustment in the following function would solve the question:
I did some workarounds but it's not cool to propose as a solution. Once I get a better time window I can make a proposal for improvement!
Thanks again for the package!