Get data for the Leaderboard widget

Use the following method to get information about accounts displayed in the Leaderboard widget:

GET[host]/api/v1/investment/widget/leaderboard

Request

Headers

Authorization: Bearer <access_token>

Query parameters

NameRequiredDescription

investment_platform_id

Yes

The identifier of the investment platform instance.

  • If only one MT server is connected to your B2COPY investment platform, specify 1.

  • If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance.

platform

Yes

Possible values: ‍

  • 1 — to get information about accounts displayed on the copy-trading Leaderboard

  • 2 — to get information about accounts displayed on the PAMM Leaderboard

  • 3 — to get information about accounts displayed on the MAM Leaderboard

Request example

curl --location --request GET 'https://host.name/api/v1/investment/widget/leaderboard?investment_platform_id=1&platform=1' \
--header 'Authorization: Bearer <token>'

Response

The response includes an array of objects providing information about the accounts matching the request parameters, which are displayed on the Leaderboard.

Response example
{
    "status": 200,
    "meta": {
        "behaviours": [],
        "status": 200
    },
    "data": {
        "accounts": [
            {
                "name": "Account name",
                "badge": {
                    "activity": 1
                },
                "created": "2024-07-18T08:19:11+00:00",
                "login": "124214",
                "currency": "USD",
                "risk": "86",
                "profit": [
                    {
                        "period": {
                            "value": 6,
                            "caption": "Profit week"
                        },
                        "amount": 142
                    },
                    {
                        "period": {
                            "value": 5,
                            "caption": "Profit month"
                        },
                        "amount": 26
                    },
                    {
                        "period": {
                            "value": 4,
                            "caption": "Profit all"
                        },
                        "amount": 577
                    }
                ],
                "score": 49,
                "followers": 12,
                "assets": "25342.73",
                "requirements": {
                    "minDeposit": 0
                },
                "platform": {
                    "id": 21,
                    "caption": "MT5 B2COPY",
                    "short_caption": "",
                    "name": "MT5 B2COPY",
                    "class": "MetaTrader5",
                    "enabled": true,
                    "demo": false,
                    "has_multiple_type_password": true
                },
                "user": {
                    "nickname": "Client's nickname",
                    "country": ""
                },
                "subscriptionInvestorAccounts": [
                    146565,
                    124217,
                    124218,
                    146654
                ],
                "minimum_deposit": 0,
                "aum": 25342.73,
                "has_promo_offer": false,
                "allocation_method": 4,
                "risk_ratio": 1
            }
        ],
        "count": 174
    },
    "modules": []
}

See also:

Configure B2COPY widgets

Last updated

Was this helpful?