1. Go to this page and download the library: Download forexapi/client 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/ */
forexapi / client example snippets
use ForexAPI\Client\Client;
$client = new Client('your-api-key');
use \ForexAPI\Client\ForexAPIClientBuilder;
$builder = (new ForexAPIClientBuilder())
->withApiKey('your-api-key')
->withBaseUri('https://forexapi.eu/api/')
->withHttpAdapter($yourCustomHttpAdapter)
->build()
;
use \ForexAPI\Client\ForexAPIClientBuilder;
$builder = (new ForexAPIClientBuilder())
->withApiKey('your-api-key')
->withPsr18Client($yourCustomPsr18Client)
->withPsr17RequestFactory($yourCustomPsr17RequestFactory)
->build()
;