This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

TechFinancials Web API client

0.2.2 2016-10-24 10:13 UTC

This package is not auto-updated.

Last update: 2021-06-12 01:45:50 UTC


Software License Build Status Code Coverage Packagist

Using this API client for TechFinancials platform you can open account for your leads, redirect these leads to broker's website with auto-login and retrieve deposits made by these leads.


Install using Composer, doubtless.

$ composer require resnext/techfinancials-api-client

General API Client usage.

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

Trader registration

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

Find registered traders

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