為客戶建立主帳戶或投資帳戶 現有MT帳戶。該帳號註冊於 B2COPY 與 MT 上的登入號碼相同。
先決條件
客戶必須已在平台上註冊並擁有客戶 ID。有關獨立解決方案,請參閱 無縫授權 和 註冊客戶並建立他們的付款帳戶。
端點
POST [host]/api/v2/b2copy/accounts/create請求正文
| 姓名 | 類型 | 必需的 | 描述 |
|---|---|---|---|
| 客戶端ID | 整數 | 是的 | 為其建立帳戶的客戶。 |
| 投資平台ID | 整數 | 是的 | 投資平台實例(單一 MT 伺服器為 1 個)。 |
| 帳號 | 細繩 | 是的 | MT 上存在的 MT 登入名稱將會在 B2COPY。 |
| 產品貨幣ID | 整數 | 是的 | 產品貨幣識別碼 — 請聯絡支援人員尋求協助。 |
| 是大師 | 整數 | 是的 | 1→建立主帳戶; 0 → 建立投資帳戶。 |
| 帳戶名稱 | 細繩 | 不 | 分配給帳戶的名稱。 |
| 帳戶描述 | 細繩 | 不 | 帳戶交易策略的描述。 |
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"
}