All URIs are relative to /v1
Method | HTTP request | Description |
---|---|---|
updateUser | POST /user/update | Update user |
userAddPost | POST /user/add | Create user |
userDepositPost | POST /user/deposit | Deposit account |
userResetPwdPost | POST /user/reset_pwd | Reset password |
userUserLoginDelete | DELETE /user/{user_login} | Delete user |
userUserLoginGet | GET /user/{user_login} | Get user by user login |
userWithdrawPost | POST /user/withdraw | Withdraw account |
usersGroupGet | GET /users/{group} | Get list of users |
updateUser($body)
Update user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \D4T\MT5Sdk\Models\User(); // \D4T\MT5Sdk\Models\User | {"login": 1, "password":"new_pwd", "name":"new_name"}
try {
$apiInstance->updateUser($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \D4T\MT5Sdk\Models\User | {"login": 1, "password":"new_pwd", "name":"new_name"} |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\D4T\MT5Sdk\Models\UserReturnType userAddPost($body)
Create user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \D4T\MT5Sdk\Models\User(); // \D4T\MT5Sdk\Models\User | {"password_investor":"123456Aa","password":"123456Aa", "name":"test", "email": "test@test.com","group":"demo\demoforex","leverage":100}
try {
$result = $apiInstance->userAddPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userAddPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \D4T\MT5Sdk\Models\User | {"password_investor":"123456Aa","password":"123456Aa", "name":"test", "email": "test@test.com","group":"demo\demoforex","leverage":100} |
\D4T\MT5Sdk\Models\UserReturnType
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userDepositPost($body)
Deposit account
Deposit account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \D4T\MT5Sdk\Models\BalanceType(); // \D4T\MT5Sdk\Models\BalanceType | {"login": 1, "amount":1, "type": 3, "comment": "F.Management"}
try {
$apiInstance->userDepositPost($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userDepositPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \D4T\MT5Sdk\Models\BalanceType | {"login": 1, "amount":1, "type": 3, "comment": "F.Management"} |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userResetPwdPost($body)
Reset password
Reset password
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \D4T\MT5Sdk\Models\ResetPwdType(); // \D4T\MT5Sdk\Models\ResetPwdType | {"login": 1, "password":"new_pwd", "change_investor":0}
try {
$apiInstance->userResetPwdPost($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userResetPwdPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \D4T\MT5Sdk\Models\ResetPwdType | {"login": 1, "password":"new_pwd", "change_investor":0} |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userUserLoginDelete($user_login)
Delete user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user_login = "user_login_example"; // string | The login that needs to be deleted
try {
$apiInstance->userUserLoginDelete($user_login);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userUserLoginDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
user_login | string | The login that needs to be deleted |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\D4T\MT5Sdk\Models\User userUserLoginGet($user_login)
Get user by user login
Deposit account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user_login = "user_login_example"; // string | The name that needs to be fetched. Use 3 for testing.
try {
$result = $apiInstance->userUserLoginGet($user_login);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userUserLoginGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
user_login | string | The name that needs to be fetched. Use 3 for testing. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userWithdrawPost($body)
Withdraw account
Withdraw account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \D4T\MT5Sdk\Models\BalanceType(); // \D4T\MT5Sdk\Models\BalanceType | {"login": 1, "amount":1, "type": 3, "comment": "F.Management"}
try {
$apiInstance->userWithdrawPost($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userWithdrawPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \D4T\MT5Sdk\Models\BalanceType | {"login": 1, "amount":1, "type": 3, "comment": "F.Management"} |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\D4T\MT5Sdk\Models\CachedLogins usersGroupGet($group)
Get list of users
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = D4T\MT5Sdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new D4T\MT5Sdk\MT5Manager\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$group = "group_example"; // string | Group name
try {
$result = $apiInstance->usersGroupGet($group);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->usersGroupGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
group | string | Group name |
\D4T\MT5Sdk\Models\CachedLogins
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]