PHP code example of resnext / techfinancials-api-client

1. Go to this page and download the library: Download resnext/techfinancials-api-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/ */

    

resnext / techfinancials-api-client example snippets


$apiClient = new TechFinancials\ApiClient(<URL>, <USERNAME>, <PASSWORD>);

$request = new \TechFinancials\Requests\RegisterTraderRequest([
    'username' => '[email protected]',
    'firstName' => 'John',
    'lastName' => 'Smith',
    'email' => '[email protected]',
    'phone' => '12345678909',
    'countryCode' => 'DE',
    'currencyCode' => 'EUR',
    'password' => 'password',
    'trackingCode' => 'Your tracking code'
]);
/** @var \TechFinancials\Responses\RegisterTraderResponse $response */    
$response = $apiClient->registerTrader($request);

/** @var \TechFinancials\Responses\FindAccountsResponse $response */
$response = $apiClient->findAccounts();
/** @var \TechFinancials\Entities\Account[] $accounts */
$accounts = $response->getAccounts();