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

Fetching quotes from XETRA (Frankfurt stock exchange) #151

Merged
merged 7 commits into from
Oct 10, 2020

Conversation

e-dorigatti
Copy link
Contributor

Hi, I contributed a new module to fetch quotes from the frankfurt stock exchange, which provides a JSON endpoint. As I am new to perl, I based the module on yahoo_json and made the necessary modifications.

I don't know what is your policy on testing, but I can run the example script successfully:

$ perl stockdump.pl xetra DE000A0D8Q07
$VAR1 = {
          'DE000A0D8Q07exchange' => 'XETR',
          'DE000A0D8Q07high' => '35.42',
          'DE000A0D8Q07date' => '09/29/2020',
          'DE000A0D8Q07symbol' => 'DE000A0D8Q07',
          'DE000A0D8Q07isodate' => '2020-09-29',
          'DE000A0D8Q07method' => 'xetra',
          'DE000A0D8Q07close' => '35.445',
          'DE000A0D8Q07low' => '35.33',
          'DE000A0D8Q07last' => '35.42',
          'DE000A0D8Q07currency' => 'EUR',
          'DE000A0D8Q07success' => 1
        };

@fellen
Copy link

fellen commented Sep 29, 2020

I do not see the benefit. According https://code.gnucash.org/docs/C/gnucash-help/fq-spec-yahoo.html you can get it from yahoo_json by appending ".DE" to the ISIN.

@e-dorigatti
Copy link
Contributor Author

Apologies, I was not aware of that page. However, the ISIN in the example above does not seem to work. Is it a problem on my end?

@fellen
Copy link

fellen commented Sep 29, 2020

https://www.xetra.com/xetra-en/instruments/shares/list-of-tradable-shares/xetra/4750!search?query=DE000A0D8Q07 says
0 results for "DE000A0D8Q07"
while "DE0007236101" and "SIE" both return

    Shares
    SIEMENS AG NA O.N.

    ISIN: DE0007236101

    CCP eligible

    Market: Xetra

@e-dorigatti
Copy link
Contributor Author

Perhaps it does not work because it's an ETF? The ISIN is correct and the quotes are at https://www.boerse-frankfurt.de/en/etf/ishares-euro-stoxx-ucits-etf-de

@fellen
Copy link

fellen commented Sep 29, 2020

https://www.xetra.com/xetra-en/instruments/etf-exchange-traded-funds/list-of-tradable-etfs/xetra/3044!search?query=DE000A0D8Q07 returns

    ETFs
    ISHARES EURO STOXX U.ETF

    ISIN: DE000A0D8Q07

    CCP eligible

    Market: Xetra

OK, then your module will also fetch ETFs. That should be mentioned in its docs.

Note: .F (Börse Frankfurt) and .DE (XETRA) are 2 different markets with slightly different quotes. .F is the traditional exchange and .DE its electronic counterpart. Run
gnc-fq-dump -v yahoo_json SIE.F SIE.DE
to compare them.

Copy link

@fellen fellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankfurt and Xetra are different exchanges.

lib/Finance/Quote/XETRA.pm Outdated Show resolved Hide resolved
lib/Finance/Quote/XETRA.pm Outdated Show resolved Hide resolved
@bpschuck
Copy link
Contributor

Please note, the modules are listed in Modules-README.yml alphabetically. The maintainers also ask that a respective test suite be written and placed in the t/ directory with the other test suites. Include at least one test that should fail. See the other test files for examples.
Thank you.

lib/Finance/Quote/XETRA.pm Outdated Show resolved Hide resolved
@vincentl
Copy link
Contributor

vincentl commented Oct 6, 2020

Once the additional line about where to find the full list of symbols is added to the documentation, are we happy with this PR?

@e-dorigatti
Copy link
Contributor Author

I will write tests in a few days, sorry for the delay!

@vincentl
Copy link
Contributor

vincentl commented Oct 6, 2020

I just merged pull request #149, which changed Quote.pm. Pull from master and merge into your branch.

@e-dorigatti
Copy link
Contributor Author

Done, is anything else required?

@vincentl
Copy link
Contributor

vincentl commented Oct 8, 2020

Thanks! I'm going to work on merging pull requests this weekend.

@vincentl vincentl merged commit 0c8e43f into finance-quote:master Oct 10, 2020
@Andre-J
Copy link
Contributor

Andre-J commented Jul 27, 2022

Hi,

is Xetra.pm still experimental or already outdated?

The module is in the Finance/Quote folder, but not listed in quote.pm. If I add it there, Finance::Quote complains that there is no method "xetra" found.

@bpschuck
Copy link
Contributor

The URL is no longer valid, thereby breaking the module. It will be removed completely from the next release of F::Q.

@fellen
Copy link

fellen commented Jul 27, 2022

Yes, there have been changes
https://www.boerse-frankfurt.de/en/relaunch.
@e-dorigatti from where did you get the URL?
If from the android app, can you look for the new URL?

@e-dorigatti
Copy link
Contributor Author

e-dorigatti commented Jul 28, 2022

@fellen I got that URL via the web developer tools on their website. But with the new redesign they added some countermeasures to make it harder to get that data and I cannot figure out how to get the quotes.

@bpschuck
Copy link
Contributor

@e-dorigatti - Unfortunately this is not the only module this has happened to over the last few years. If and when you find it can be resurrected, please create another pull request with the update version of the module (and test file).

Thank you for your contributions.

Bruce S.

@Andre-J
Copy link
Contributor

Andre-J commented Jul 28, 2022

So I suggest to remove the "next release" label and add the "module malfunction" label.

@bpschuck
Copy link
Contributor

The labels on pull requests and issues are assigned soon after they are created. When created, PR #151 was going into the next release (I think that was 1.50). While labels may change while the issue or PR is open, they are not changed once closed. For a good reference of how it was classified when actively being addressed. There are now quite a few modules that have been added in the past that currently do not work. The F::Q team is not about to go through every past PR and change labels for those modules.

What we have been doing is updating the Modules-README.yml file. Here one can view the state of the module when last tested (yes, some are still TBD), the URL/URI used for fetching the data, and test cases used in the t/mymodule.t test files. You will find that the Modules-README.yml file will get updated a few times between releases.

Thank you.

@finance-quote finance-quote locked and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants