Update account
About
Updates trading account. Please redeploy the trading account in order for updated settings to take effect
PUT /users/current/accounts/:accountId
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 |
Body
Name | Type | Required | Description |
---|---|---|---|
password | string | Yes | Trading account password. The password can be either investor password for read-only access or master password to enable trading features. Required for cloud account |
name | string | Yes | Human-readable account name |
server | string | Yes | Trading server name to connect to |
magic | number | Magic value the trades should be performed using. When manualTrades field is set to true, magic value must be 0 | |
manualTrades | boolean | Flag indicating if trades placed on this account are manual trades. Default is false. Supported for G2 only. | |
slippage | number | Default trade slippage in points. Should be greater or equal to zero. If not specified, system internal setting will be used which we believe is reasonable for most cases | |
quoteStreamingIntervalInSeconds | number | Quote streaming interval in seconds. Set to 0 in order to receive quotes on each tick. Default value is 2.5 seconds. Intervals less than 2.5 seconds are supported only for G2. | |
tags | Array |
User-defined account tags | |
metadata | object | Extra information which can be stored together with your account. Total length of this field after serializing it to JSON is limited to 1024 characters | |
copyFactoryRoles | Array |
Account roles for CopyFactory2 application. Allowed values are PROVIDER and SUBSCRIBER |
|
resourceSlots | number | Number of resource slots to allocate to account. Allocating extra resource slots results in better account performance under load which is useful for some applications. E.g. if you have many accounts copying the same strategy via CooyFactory API, then you can increase resourceSlots to get a lower trade copying latency. Please note that allocating extra resource slots is a paid option. Default is 1 | |
copyFactoryResourceSlots | number | Number of CopyFactory 2 resource slots to allocate to account. Allocating extra resource slots results in lower trade copying latency. Please note that allocating extra resource slots is a paid option. Please also note that CopyFactory 2 uses redundant infrastructure so that each CopyFactory resource slot is billed as 2 standard resource slots. You will be billed for CopyFactory 2 resource slots only if you have added your account to CopyFactory 2 by specifying copyFactoryRoles field. Default is 1 | |
metastatsApiEnabled | boolean | Flag indicating that MetaStats API should be enabled on account. Default is false | |
allocateDedicatedIp | string | If set, allocates a dedicated IP with specified protocol to connect to the trading account terminal. If an account has replicas deployed in different regions at the same time, a separate IP address will be dedicated for the account in each region. Special none value disables the dedicated IP usage for the account. Allowed values are ipv4 , none |
Response
- 204 - Trading account updated
- 401 - Authorization failed. Response schema: Error
- 403 - Method or resource access permissions are missing. Response schema: Error
- 404 - Trading account not found. Response schema: Error
Examples
Example request:
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'auth-token: token' -d '{
"password": "password",
"name": "testAccount",
"server": "ICMarketsSC-Demo"
}' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts/1eda642a-a9a3-457c-99af-3bc5e8d5c4c9'