resnext / techfinancials-api-client
TechFinancials Web API客户端
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-09-14 19:36:52 UTC
README
使用TechFinancials平台上的此API客户端,您可以为您的前端客户开设账户,将这些前端客户重定向到经纪人的网站并自动登录,以及检索这些前端客户所存入的存款。
安装
当然使用Composer进行安装。
$ composer require resnext/techfinancials-api-client
通用API客户端使用。
$apiClient = new TechFinancials\ApiClient(<URL>, <USERNAME>, <PASSWORD>);
交易员注册
$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);
查找已注册的交易员
/** @var \TechFinancials\Responses\FindAccountsResponse $response */ $response = $apiClient->findAccounts(); /** @var \TechFinancials\Entities\Account[] $accounts */ $accounts = $response->getAccounts();