Skip to content

Configure trading account

About

Configures login and password for trading accounts in draft state and deploys the account if quota allows to do so. All replicas of the trading accounts in draft state are also configured and deployed. Alternatively, changes password for trading accounts which were already configured. Account and its replicas will be redeployed if they were deployed before password change.

PUT /users/current/accounts/:accountId/credentials

For more information see swagger documentation

Headers

Name Type Required Description
auth-token string Yes Configuration token

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
login string Trading account login. Only digits are allowed.

Response

  • 200 - Trading account credentials configured. Response schema:
Name Type Required Description
id string Yes Trading account id
state string Yes State of the account. Possible values are 'UNDEPLOYED', 'DEPLOYED'
  • 400 - Validation failed. 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: qey3ilN5CrmFn2Nf7AJKp4Ag6FmOWhGvBJ2enQDh0zPXMA8KUwSxFuo9aowkXWW' -d '{
    "login": "12345",
    "password": "p455w0rd",
}' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts/1eda642a-a9a3-457c-99af-3bc5e8d5c4c9/credentials'

If trading account credentials have been configured successfully, you will receive a response with account id and state:

{
  "id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
  "state": "DEPLOYED"
}