Accounts

Add demo funds to a demo account

Use this method to manually add demo funds to a demo trading account. If the account's `productCurrency.startAmounts` list is configured, the amount must match one of its values. If the list is empty, any positive amount up to 1000 (in the account currency) is accepted. Available only when the account's `abilities.demoTopUp` is *true*; otherwise, the method returns `403`.

POST
/api/v2/my/accounts/{accountId}/add-demo-funds

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

accountId*integer

The account identifier.

Header Parameters

accept-language?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/my/accounts/1/add-demo-funds" \  -H "accept-language: ja" \  -H "Content-Type: application/json" \  -d '{    "amount": 100  }'
{  "accountId": 1,  "accountNumber": "12345678",  "displayNumber": "12345678",  "archive": false,  "caption": "USD",  "currency": {    "alphabeticCode": "USD",    "minorUnit": 2,    "name": "US Dollar",    "numericCode": 840  },  "favourite": true,  "group": {    "id": 1,    "name": "Fiat",    "type": "default",    "priority": 0  },  "platform": {    "id": 1,    "name": "MetaTrader 5",    "caption": "MetaTrader5 Live",    "type": "MetaTrader5",    "isDemo": true,    "terminalUrl": "https://example.com"  },  "priority": 1,  "statement": {    "availableBalance": "1.000000000000000000",    "currentBalance": "1.000000000000000000",    "credit": "1.000000000000000000",    "equity": "1.000000000000000000",    "freeMargin": "1.000000000000000000",    "hold": "1.000000000000000000",    "margin": "1.000000000000000000",    "marginLevel": "1.000000000000000000",    "pnl": "1.000000000000000000",    "updateTime": "2022-01-01T00:00:00+00:00"  },  "type": "trade",  "createTime": "2022-01-01T00:00:00+00:00",  "permissions": [    "deposit"  ],  "productId": 1,  "leverage": 100,  "productCurrency": {    "id": 1,    "caption": "USD",    "product": {      "id": 1,      "type": "personal",      "name": "MT5 Live",      "caption": "MT5 Live",      "group": {        "id": 1,        "caption": "Fiat",        "description": "Fiat",        "type": "default",        "priority": 0,        "createTime": "2022-01-01T00:00:00+00:00",        "updateTime": "2022-01-01T00:00:00+00:00"      },      "platform": {        "id": 1,        "caption": "MetaTrader5 Live",        "shortCaption": "MT5",        "name": "mt5",        "class": "MetaTrader5",        "isDemo": true      }    },    "currency": {      "alphabeticCode": "USD",      "minorUnit": 2,      "name": "US Dollar",      "numericCode": 840    },    "factory": 1,    "variants": {      "startAmounts": [        "100.00"      ],      "leverages": [        0      ]    },    "platformGroups": [      "string"    ],    "isHedgingEnabled": true,    "maxAccounts": 1,    "permissions": [      "deposit"    ],    "priority": 1,    "linkInfo": "https://example.com",    "agreementLink": "https://example.com",    "minDepositAmount": "100.00"  },  "abilities": {    "demoTopUp": true,    "changeLeverage": false  },  "credentials": {    "type": "MetaTrader4",    "data": {      "login": "12345678",      "masterPassword": "Aa1!secret",      "investorPassword": "Aa1!invest"    }  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Forbidden"  }}
{  "error": {    "message": "Not Found"  }}
{  "error": {    "message": "Unprocessable Entity"  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Access from this country is restricted",    "details": {      "ip": "203.0.113.42",      "country": "RU"    }  }}
{  "error": {    "message": "Service Unavailable"  }}