PHP code example of dersonsena / indices_financeiros

1. Go to this page and download the library: Download dersonsena/indices_financeiros library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dersonsena / indices_financeiros example snippets


$debit = DebitService::newDebitService();
$cotacoesDebit->getIndicesByCurrentMonth();

$debit = DebitService::newDebitService();

// IGP-M (FGV)
$cotacoesDebit->getCotacoesByIndiceCode(IGPMFGV::getCodigo());

// IPC (FIPE)
$cotacoesDebit->getCotacoesByIndiceCode(IPCFIPE::getCodigo());

$debit = DebitService::newDebitService();

// IGP-M (FGV)
$cotacoesDebit->getCurrentCotacaoByIndiceCode(IGPMFGV::getCodigo());

// IPC (FIPE)
$cotacoesDebit->getCurrentCotacaoByIndiceCode(IGPMFGV::getCodigo());

$ php composer.phar