PHP code example of dprmc / iex-trading

1. Go to this page and download the library: Download dprmc/iex-trading 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/ */

    

dprmc / iex-trading example snippets


// https://iextrading.com/developer/docs/#quote 
$stockQuote = IEXTrading::stockQuote( 'aapl' );
echo $stockQuote->companyName; // Apple Inc.

// https://iextrading.com/developer/docs/#key-stats
$stockStats = IEXTrading::stockStats( 'aapl' );
echo $stockStats->marketcap; // 760334287200