# Get data for the Leaderboard widget

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

<mark style="color:green;">`GET`</mark>`[host]/api/v1/investment/widget/leaderboard`

## Request

**Headers**

`Authorization: Bearer <access_token>`

**Query parameters**

<table><thead><tr><th width="268">Name</th><th width="99">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>investment_platform_id</code></td><td>Yes</td><td><p>The identifier of the investment platform instance.</p><ul><li>If only one MT server is connected to your B2COPY investment platform, specify 1.</li><li>If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance.</li></ul></td></tr><tr><td><code>platform</code></td><td>Yes</td><td><p>Possible values: ‍</p><ul><li>1 — to get information about accounts displayed on the copy-trading Leaderboard</li><li>2 — to get information about accounts displayed on the PAMM Leaderboard</li><li>3 — to get information about accounts displayed on the MAM Leaderboard</li></ul></td></tr></tbody></table>

**Request example**

```sh
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**.

<details>

<summary><strong>Response example</strong></summary>

```json
{
    "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": []
}
```

</details>

**See also:**

[Configure B2COPY widgets](/admin-guide/configure-b2copy-widgets.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2copy.b2broker.com/api-documentation/get-data-for-the-leaderboard-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
