兩種方法傳回的數據顯示在 統計小工具 對於特定主帳戶或投資帳戶:帳戶詳細資料和交易統計資料。
驗證
兩種方法都需要 Authorization: Bearer <access_token> 標頭。
獲取小部件的詳細信息
GET [host]/api/v1/investment/widget/detail/{account}返回費用計劃、追蹤者數量、回報、圖表資料、個人資料圖片、策略描述和相關欄位。
| 範圍 | 在 | 必需的 | 描述 |
|---|---|---|---|
| 帳戶 | 小路 | 是的 | MT帳號登入。 |
| 投資平台id | 詢問 | 是的 | 投資平台實例(單一 MT 伺服器為 1 個)。 |
curl --location --request GET \
'https://host.name/api/v1/investment/widget/detail/77616894?investment_platform_id=1' \
--header 'Authorization: Bearer <token>'回應(略):
{
"status": 200,
"data": {
"id": 32065,
"aum": 25091.19,
"followers": 4,
"currency": "USD",
"description": "Trading strategy description",
"fees": {
"performance_fee": "10",
"management_fee": "2",
"subscription_fee": "1",
"volume_fee": "1",
"joining_fee": "1"
},
"name": "Account name",
"risk": 86,
"score": 49,
"balance": "691.56",
"equity": "13,373.77",
"max_dd": 86,
"allocation_method": 4,
"risk_ratio": 1
}
}獲取小部件的統計信息
GET [host]/api/v1/investment/widget/statistics/{account}傳回交易工具及其使用率,以及交易統計資料(獲利/虧損計數、連勝、平均值)。相同的 account 路徑和 investment_platform_id 查詢參數如上。
{
"status": 200,
"data": {
"instruments_ratios": [
{ "name": "EURUSD", "ratio": 37 },
{ "name": "GBPUSD", "ratio": 27 },
{ "name": "USDJPY", "ratio": 27 },
{ "name": "USDCHF", "ratio": 9 }
],
"number_of_trades": 11,
"winning_trades": 3,
"losing_trades": 8,
"avg_trade_time": "0.14",
"avg_trades_per_week": "5.5",
"consecutive_losses": 3,
"consecutive_wins": 1
}
}