1. Go to this page and download the library: Download mab05k/oanda-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/ */
mab05k / oanda-client example snippets
namespace App\Service;
use Mab05k\OandaClient\Client\AccountClient;
class OandaAccountService
{
/**
* @var AccountClient
*/
private $accountClient;
public function __construct(AccountClient $accountClient)
{
$this->accountClient = $accountClient;
}
public function doSomethingWithAccount()
{
$account = $this->accountClient->account();
// do something and return the result...
}
}