resnext / techfinancials-api-client
TechFinancials Web API client
0.2.2
2016-10-24 10:13 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~6.0
- monolog/monolog: ^1.21
- psr/log: ^1.0
Requires (Dev)
- fzaninotto/faker: ~1.4
- phpunit/phpunit: ^5.1
This package is not auto-updated.
Last update: 2024-11-09 20:56:15 UTC
README
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.
Installation
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' => 'email@domain.com', 'firstName' => 'John', 'lastName' => 'Smith', 'email' => 'email@domain.com', '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();