從客戶的現有 MT 帳戶建立主帳戶或投資帳戶。該帳戶在 B2COPY 上註冊,其登錄號與 MT 上的登錄號相同。
先決條件
客戶必須已在平台上註冊並擁有客戶 ID。對於獨立解決方案,請參閱無縫授權和註冊客戶並建立其付款帳戶。
端點
POST [host]/api/v2/b2copy/accounts/create請求正文
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| clientId | 整數 | 是的 | 為其建立帳戶的客戶。 |
| investmentPlatformId | 整數 | 是的 | 投資平台實例(單一 MT 伺服器為 1 個)。 |
| accountNumber | 字串 | 是的 | MT 上存在的 MT 登入名稱將在 B2COPY 上註冊。 |
| productCurrencyId | 整數 | 是的 | 產品貨幣識別碼 — 請聯絡支援人員尋求協助。 |
| isMaster | 整數 | 是的 | 1 → 建立主帳戶; 0 → 建立投資帳戶。 |
| accountName | 字串 | 否 | 分配給帳戶的名稱。 |
| accountDescription | 字串 | 否 | 帳戶交易策略的描述。 |
curl --location --request POST 'https://host.name/api/v2/b2copy/accounts/create' \
--header 'Authorization: Bearer <access_token>' \
--data-raw '{
"clientId": 4406,
"investmentPlatformId": 1,
"accountNumber": "2121882154",
"productCurrencyId": 10,
"isMaster": 0,
"accountName": "MAM investor",
"accountDescription": "The trading strategy applied on the account"
}'回應
建立的帳戶對象,包括其 id、類型、可見性標誌和時間戳記。
{
"is_master": false,
"show_in_client_ui": true,
"status": true,
"id": 12574,
"account_description": "The trading strategy applied on the account",
"account_name": "MAM investor",
"type": 8,
"show_in_leaderboard": false,
"active_since": "2024-04-01T15:06:41.000000Z",
"created_at": "2024-04-01T15:06:41.000000Z"
}