Skip to content

PHP library for accessing quotes through Yahoo finance API

Notifications You must be signed in to change notification settings

robsen77/yahoo-finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yahoo! Finance PHP API Client

A PHP library for accessing quotes through Yahoo finance API

It offers a simple API to access Yahoo! Finance data.

Description

This API Client enables you to work with the Yahoo! Finance API.

Basic Example

<?php
   require_once '../vendor/autoload.php';

   $config = new \Robsen77\YahooFinance\Config\Config();
   $api = new \Robsen77\YahooFinance\Api($config);

   $quoteEntity = $api->getQuote("YHOO");

   $price = $quoteEntity->getCurrentPrice();

   echo "current price (YHOO): $price\n";
?>

For more examples, look into the examples directory.

Requirements

Installation

There are two options for obtaining the files for the client library.

Using Composer

If you don't have installed Composer now, follow the instructions described at getcomposer.org. Actually this package is not available at packagist.org! So you have to configure your composer.json as follows:

{
   "repositories": [
       {
           "type": "vcs",
           "url": "https://github.com/robsen77/yahoo-finance"
       }
   ],
   "require": {
       "robsen77/yahoo-finance": "dev-master"
   }
}

If your composer.json is not blank, feel free to put the things to the right place ;).

Cloning from GitHub

The library is available on GitHub. It can be cloned into a local repository with the git clone method.

git clone https://github.com/robsen77/yahoo-finance.git

Roadmap

solved or in progress:

  • current quotes
  • history quotes

not solved:

  • sectors (open)
  • cash flow (open)
  • income statement (open)
  • industry (open)
  • key statistics (open)

About

PHP library for accessing quotes through Yahoo finance API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages