Redeploy account
About
Redeploys trading account. This is equivalent to undeploy immediately followed by deploy
POST /users/current/accounts/:accountId/redeploy
For more information see swagger documentation
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| auth-token | string | Yes | Authorization token. See Authentication and authorization |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | string | Yes | Trading account id |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| executeForAllReplicas | boolean | If true, current operation will be executed for all replicas. Default is true |
Authentication error
This error is returned if the server has failed to connect to the broker using your credentials. In case of this error it is recommended to check your login and password, and try again. Please follow the recommendations to prevent possible excessive charges.
Example:
{
"id": 3,
"error": "ValidationError",
"message": "We failed to authenticate to your broker using credentials provided. This means that there is an \"Invalid account\" or \"Account disabled\" error on the trading terminal. Please check that your trading account platform version, login, password and server name are correct. MetaApi (https://metaapi.cloud) reserves the right to apply charges for each excessive occurrence of this error according to applicable pricing rules. To prevent the excessive charges please follow the recommendations described in this document: https://metaapi.cloud/docs/provisioning/excessiveErrors/",
"details": "E_AUTH"
}
Response
- 204 - Trading account was successfully redeployed.
- 401 - Authorization failed. Response schema: Error
- 403 - Method or resource access permissions are missing. Response schema: Error
- 404 - Trading account with specified id not found. Response schema: Error
Examples
Example request:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'auth-token: token' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts/1eda642a-a9a3-457c-99af-3bc5e8d5c4c9/redeploy'