A PHP library for communicating with the OPCVM360 REST API

v0.6 2014-03-31 13:42 UTC


OPCVM360 provides financial datas of European funds, on a daily basis.

Please request a login and password to FINANCE Web Working. Or contact through:

Install the OPCVM360/sdk-php

Via Composer:

OPCVM360/sdk-php is available on Packagist as the ff OPCVM360/sdk-php package.

Via ZIP file:

Click here to download the source (.zip) which includes all dependencies.

Once you download the library, move the OPCVM360/sdk-php folder to your project directory and then include the library file:

require ('/path/to/OPCVM360/Services/OPCVM360.php');

and you're good to go!

Via git:
git clone https://github.com/OPCVM360/sdk-php.git

Code Example

Retrieve 2013 to know prices of the fund whose ISIN is LU0068578508.

$service = new Services_OPCVM360('My_OPCVM360_Login', 'My_OPCVM360_Password');

$isin="LU0068578508";       //FIRST EAGLE AMUNDI INTERNATIONAL
$HistoryFrom="2013-01-01";  //from jan 1st 2013
$HistoryTo=Null;            //till now

//retrieve the fundShare by its ISIN

//retrieve history of that fundShare, for the specified range of dates
//the $fundShareHistory object act as an iterator
$fundShareHistory = $fundShare->getHistoryRange($HistoryFrom,$HistoryTo);

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
    td, th { border: 1px solid }
    th { font-weight: bold }
<h1>Raw fundshare meta data for <?php echo $isin ?></h1>
<?php var_dump($fundShare) ?>
<h1>Prices table from <?php echo $HistoryFrom==null ? inception : $HistoryFrom ?> to <?php echo $HistoryTo==null ? now : $HistoryTo ?></h1>
    while ($fundShareHistory->getCurrentPage() < $fundShareHistory->getNumberOfPages())
        foreach ($fundShareHistory->getResults() as $historyLine)
            if ($firstRow)
                    {echo "<tr><th>".implode("</td><th>",array_keys($historyLine))."</th></tr>";$firstRow=false;}
            echo "<tr><td>".implode("</td><td>",$historyLine)."</td></tr>";

Data model


Class Methods available for the service

  • $service->getCompanyById($id) // returns a Company object
  • $service->getFundById($id) // returns a Fund object
  • $service->getFundshareById($id) // returns a FundShare object
  • $service->getFundshareByIsin($isin) // returns a FundShare object

Methods available by object


  • $this->getFunds() // returns an array of Fund objects linked to that company;


  • $this->getFundShares() // returns an array of Fundshare objects linked to current fund


  • $this->getHistoryRange($fromDate=null,$toDate=null) // returns a object List with data = array of fundshareHistory objects With List object you can paginate results. When a List is constructed, the active page is the first one, ie the oldest set of datas. Then you can use the following methods on this object:
    • $this->getResults() //returns an array of datas for the actual page (vl, date, ...)
    • $this->goToNextPage() //set the current page to the next one
    • $this->getNumberOfPages() //returns the total number of pages
    • $this->getCurrentPage() //returns the actual page number
    • $this->setCurrentPage($page) //set the current page number to $page
    • $this->goToLastPage() //set the current page to the last page
  • $this->getHistoryLastValue() // returns the last fundshareHistory associated with current FundShare
  • $this->get($field) // returns field value formatted if needed


No method available


No method available