Google Finance or Yahoo Finance?

Which do you think it’s better considering the following aspects:

  • real-time data
  • working with the API, ease of use
  • data richness…

I’ll side always with Google. Especially now that Yahoo is in bed with Microsoft.

That’s a wrong approach in my opinion.

We developers always have to look at things as is and not to take sides.

I’m asking which is the better service?

When googling comparison “yahoo finance” “google finance” there is no clear winner. However, I get the impression that Yahoo Finance is the more mature of the two.

Code your application in such a way that this element can easily change, abstract away the data source then pass the rest of the application this abstraction.

If you, as the developer, are already thinking that this element can change - you can bet your client will ask for it.


<?php
interface Stock_Market_Driver_Interface
{
    public function getCurrentValueForStockCode($code);
}

class Yahoo_Stock_Market_Driver implements Stock_Market_Driver_Interface
{
    public function getCurrentValueForStockCode($code){
        #get data from Yahoo
    }
}

class Google_Stock_Market_Driver implements Stock_Market_Driver_Interface
{
    public function getCurrentValueForStockCode($code){
        #get data from Google
    }
}

class Stock_Market_Data
{
    protected
        $driver;
        
    public function __construct(Stock_Market_Driver_Interface $driver){
        $this->driver = $driver;
    }
    
    public function getCurrentValueForStockCode($code){
        return $this->driver->getCurrentValueForStockCode($code);
    }
}

Given this code sample, you can now pass around the Stock_Market_Data object safe in the knowledge, that you can switch the data provider at a whim.

Free-n-easy. :wink:

Off Topic:

Blimey, 3000 posts in 20 months! I really need to re-address my priorities! :smiley:

Yes, that’s an approach too, but using both APIs is a waste of time on my side and a waste of money on the client’s side.

He’s not using two APIs. He’s instead using a generic API that is capable of being adjusted to work with whichever one is the flavour of the month.

:agree:

Spot on.

Did either of you even begin to answer the question?

OP: which is better given x,y,z
pmw: I like google!!
Anthony: you should use both!!

sorry, but I’m sick of all the useless posts here; I, too, would like to know the answer to this question :slight_smile:

From what I learned from other sources the tendency is towards Yahoo Finance.

But still, I’d like to get the community-s feedback on this.

Agreed, I didn’t answer the OP’s query directly, the point I was making, is that he doesn’t have to make this decision right now.

Very rarely is question asked where the answer is all that is required, as such, a little friendly nudge towards a better (or more appropriate) solution is needed.

As this is the php forum, and not the XML and Web Services forum, you would assume the code required would play a part in this.

At no point did I suggest he use both, in fact, quite the opposite. :wink:

I posted in the PHP section, because I’m planning to use the API with PHP.

I’d like to revive this topic.

I’d like to now which service is better from developer perspective (using the API)

I’m interested in the following:

  • how easy to use the API

  • data time delay (i believe Yahoo gives data with 15min delays, don’t know about Google)

  • data richness meaning how much information there is on a particular company / asset / etc…

  • - how easy to use the API
    [LIST]
  • This is wholly dependent on the developers skill level.
    [/LIST]
  • - data time delay (i believe Yahoo gives data with 15min delays, don’t know about Google)
    [LIST]
  • Try Google’s API documentation.
    [/LIST]
  • - data richness meaning how much information there is on a particular company / asset / etc…
    [LIST]
  • Try both providers documentation.
    [/LIST]

:rolleyes: