Accounts
Esta página no está disponible en español. Se muestra la versión en inglés.
Change Account Product
Moves the account to another product of the same platform. The new product currency is the one with the account currency. When `changePlatformGroup` is true, the account is also moved on the trading platform to the first platform group of the new product currency; this is supported by MetaTrader 4 and MetaTrader 5 only. A platform error rolls back all changes.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
accountId*integer
Account ID
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
curl -X POST "https://example.com/api/v2/accounts/1/product" \ -H "accept-language: ja" \ -H "Content-Type: application/json" \ -d '{ "productId": 12 }'{ "accountId": 0, "accountNumber": "12345678", "displayNumber": "12345678", "clientId": 0, "caption": "Bitcoin", "currency": { "alphabeticCode": "USD", "minorUnit": 2, "name": "US Dollar", "numericCode": 840 }, "group": { "id": 0, "name": "Fiat" }, "name": "USD", "archive": false, "permissions": [ "deposit", "trade", "withdrawal" ], "platform": { "id": 1, "name": "MT5", "type": "MetaTrader5", "caption": "MetaTrader 5" }, "product": { "id": 0, "name": "Forex" }, "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", "archiveTime": "2022-01-01T00:00:00+00:00", "createTime": "2022-01-01T00:00:00+00:00", "updateTime": "2022-01-01T00:00:00+00:00"}{ "error": { "message": "Bad Request", "code": 0, "details": [ { "issue": "The selected value is invalid.", "field": "parameter" } ] }}{ "error": { "message": "Unauthorized" }}{ "error": { "message": "Forbidden" }}{ "error": { "message": "Not Found" }}{ "error": { "message": "Too Many Requests" }}{ "error": { "message": "Service Unavailable" }}