All URIs are relative to /v1
| Method | HTTP request | Description |
|---|---|---|
| closeAllUserLoginDelete | DELETE /close_all/{user_login} | Close all positions |
| dealsUserLoginGet | GET /deals/{user_login} | Get list of user deals |
| ordersUserLoginGet | GET /orders/{user_login} | Get list of user orders |
| positionsUserLoginGet | GET /positions/{user_login} | Get list of user positions |
closeAllUserLoginDelete($user_login)
Close all positions
<?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\TradeApi(
// 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 flattern
try {
$apiInstance->closeAllUserLoginDelete($user_login);
} catch (Exception $e) {
echo 'Exception when calling TradeApi->closeAllUserLoginDelete: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| user_login | string | The login that needs to be flattern |
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\Deal[] dealsUserLoginGet($user_login, $days_back)
Get list of user deals
<?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\TradeApi(
// 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 for.
$days_back = "days_back_example"; // string | Days Back
try {
$result = $apiInstance->dealsUserLoginGet($user_login, $days_back);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TradeApi->dealsUserLoginGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| user_login | string | The name that needs to be fetched for. | |
| days_back | string | Days Back |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\D4T\MT5Sdk\Models\Order[] ordersUserLoginGet($user_login, $days_back, $types)
Get list of user orders
<?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\TradeApi(
// 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 for.
$days_back = "days_back_example"; // string | Days Back
$types = "types_example"; // string | Types
try {
$result = $apiInstance->ordersUserLoginGet($user_login, $days_back, $types);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TradeApi->ordersUserLoginGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| user_login | string | The name that needs to be fetched for. | |
| days_back | string | Days Back | |
| types | string | Types |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\D4T\MT5Sdk\Models\Position[] positionsUserLoginGet($user_login)
Get list of user positions
<?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\TradeApi(
// 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 for.
try {
$result = $apiInstance->positionsUserLoginGet($user_login);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TradeApi->positionsUserLoginGet: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| user_login | string | The name that needs to be fetched for. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]