LogoLogo
Release notesHomepageTry demo
  • Welcome to the B2COPY knowledge base
  • Admin guide
    • Sign-in and 2FA
    • General interface overview
    • Configure B2COPY
      • Configure copy-trading and MAM settings
      • Configure PAMM settings
      • Configure Web UI settings
        • Show on Leaderboard
        • Show on Statistics page
        • Show on Trading Report
        • Fee settings
        • Subscription settings
        • Risk Ratio settings (applicable for copy trading only)
        • Account Properties
      • Configure account settings
        • Account settings
        • Default Master’s Positions Visibility
        • Default Investor’s Positions Visibility (applicable for PAMM only)
      • Configure access settings (only for a standalone solution)
      • Configure deposit and withdrawal settings (only for a standalone solution)
      • Configure the performance fee calculation settings
      • Configure the management fee calculation settings
      • Configure symbol mapping
      • Configure the trade fee filter
      • Configure B2COPY widgets
      • Prevent syncing of collapsed MetaTrader trading history with B2COPY
      • Copy positions to investment accounts with master account prices
      • Link open positions
      • Enable clients to select account groups when creating master and investment accounts in the Web UI
      • Run the Introducing Brokers (IB) program
        • Manage IB levels
        • Customize the IB partnership settings of investment accounts
      • Allocate custom rewards for assistance in managing master accounts
      • Use email templates to notify clients about important events
    • Register new Back Office users
      • Disable 2FA for Back Office users
    • Register new clients
      • Register new clients with email addresses
      • Register new clients with MT account logins (only for a standalone solution)
      • Add a profile picture and nickname to a client profile
    • Manage master and investment accounts
      • Create a master account
      • Set the default allocation parameters for a copy-trading or MAM master account
      • Set the allocation method and rollover settings for a PAMM master account
      • Create fee plans for a master account
      • Modify the default fee plan for a master account
      • Assign risk limits to a master account
      • Determine if risk limits are assigned to a master account
      • Assign a minimum deposit to a master account
      • Assign a subscription code to a master account
      • Set up a promo offer for a master account
      • View and execute pending PAMM requests on master accounts
      • Cancel pending PAMM requests on investment accounts
      • Create an investment account
      • Archive master and investment accounts
      • View information about archived accounts
      • Restore archived accounts
    • Manage trading robots
    • Manage subscriptions
      • Create a copy-trading or MAM subscription
      • Create a PAMM subscription
      • Assign a risk limit to a subscription
      • Modify a subscription
      • Resync open positions on a master account with subscribed investment accounts
      • Change a fee plan for an existing subscription
      • Initialize instant fee payments for subscriptions
      • View details about fees paid for a subscription
      • Pause and resume subscriptions
      • Terminate or reactivate a subscription
    • Manage deposits and withdrawals
      • Deposit funds to copy-trading and MAM accounts
      • Withdraw funds from copy-trading and MAM accounts
      • Deposit funds to PAMM accounts
      • Withdraw funds from PAMM accounts
  • User guide
    • Sign-in and 2FA
    • Account details
      • Subscriptions page
      • Trading Report page
      • Statistics page
      • Settings page
      • Requests page (for PAMM accounts only)
      • Fee Payments page
    • Use the Leaderboard to find the best-performing master accounts
    • Manage master and investment accounts
      • Create a master account
      • Set up or modify a fee plan for your master account
      • Change your master account visibility on the Leaderboard
      • Assign a subscription code to your master account
      • Assign a minimum deposit to your master account
      • Set up a promo offer for your master account
      • View and update rollover settings of your PAMM master account
      • Create an investment account
      • Add your profile picture and nickname
      • Add or change your account name
      • Reset your account password
    • Manage subscriptions
      • Create a subscription
      • Create a subscription using a subscription code
      • Create a subscription using a promo code
      • Change a risk ratio and allocation method for a subscription
      • Assign a risk limit to a subscription
      • Enable or disable the reverse copy option for a subscription
      • Check a fee plan applied to a subscription
      • Detach open positions copied into investment accounts
      • Pause or resume a subscription
      • Terminate and reactivate a subscription
    • Manage deposits and withdrawals
      • Deposit funds to your copy-trading and MAM accounts
      • Withdraw funds from your copy-trading and MAM accounts
      • Deposit funds to your PAMM accounts
      • Withdraw funds from your PAMM accounts
  • Copy-trading, PAMM, and MAM concepts
    • General comparison of copy-trading PAMM and MAM accounts
    • Allocation methods for copy trading and MAM
    • Allocation methods for PAMM
      • Reallocation on deposit and withdrawal
      • No action on deposit and autocorrection on withdrawal
    • Fee list
    • Return calculation
    • Drawdown and Maximum drawdown calculation
    • Risk limits for investors
    • Risk limits for master traders
    • Score calculation
  • API Documentation
    • Authorization in the Back Office
    • Get a list of master and investment accounts
    • Create a master or investment account using the existing MT account
    • Get data for the Statistics widget
    • Get data for the Leaderboard widget
    • Seamless authorization (only for a standalone solution)
    • Register a client and create their payment account (only for a standalone solution)
  • Video tutorials
  • Key terms
  • Release notes
Powered by GitBook
On this page
  • Get details for the widget
  • Request
  • Response
  • Get statistics for the widget
  • Request
  • Response

Was this helpful?

  1. API Documentation

Get data for the Statistics widget

Use these API methods to retrieve account details and trading statistics for display in the B2COPY Statistics widget

PreviousCreate a master or investment account using the existing MT accountNextGet data for the Leaderboard widget

Last updated 7 days ago

Was this helpful?

Use the following two methods to get information for display in the Statistics widget for a specific master or investment account:

  • GET [host]/api/v1/investment/widget/detail/{account}

  • GET [host]/api/v1/investment/widget/statistics/{account}

Get details for the widget

GET [host]/api/v1/investment/widget/detail/{account}

This method returns information about the fee plan created for a master account, number of followers, account return, chart data, profile picture, strategy description, and other relevant information. In the widget, the returned information is displayed as follows:

Request

Headers

Authorization: Bearer <access_token>

Path parameter

Name
Required
Description

account

Yes

The MT login (number) of an account for which you want to get information.

Query parameter

Name
Required
Description

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.

Request example

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

Response

The response includes the object providing details about the requested account for display in the Statistics widget.

Response example
{
    "status": 200,
    "meta": {
        "behaviours": [],
        "status": 200
    },
    "data": {
        "id": 32065,
        "aum": 25091.19,
        "followers": 4,
        "badge": {
            "activity": 1
        },
        "created": "2024-07-18 08:19:11",
        "currency": "USD",
        "description": "Trading strategy description",
        "fees": {
            "plan_id": 112,
            "performance_fee_period": {
                "value": 1,
                "caption": "Daily"
            },
            "performance_fee": "10",
            "management_fee_period": {
                "value": 1,
                "caption": "Daily"
            },
            "management_fee": "2",
            "profit_fee_period": {
                "value": 1,
                "caption": "Daily"
            },
            "profit_fee": "10",
            "subscription_fee_period": {
                "value": 1,
                "caption": "Daily"
            },
            "subscription_fee": "1",
            "volume_fee": "1",
            "joining_fee": "1"
        },
        "minichart": {
            "points": [
              {
                "etwr": 0,
                "btwr": 0,
                "balance": 1000,
                "equity": 1000,
                "timestamp": 1721290807
            }
            ],
            "count": 40
        },
        "name": "Account name",
        "requirements": {
            "minDeposit": 0
        },
        "risk": 86,
        "user": {
            "nickname": "Client's nickname",
            "country": ""
        },
        "platform": {
            "id": 21,
            "caption": "MT5 B2COPY",
            "short_caption": "",
            "name": "MT5 B2COPY",
            "class": "MetaTrader5",
            "enabled": true,
            "demo": false,
            "has_multiple_type_password": true
        },
        "account_id": "124214",
        "active_subscriptions_count": 0,
        "balance": "691.56",
        "equity": "13,373.77",
        "trade": 10,
        "children": 4,
        "children_last_week": 2,
        "max_daily_loss": 1756.07,
        "max_daily_profit": 3934.85,
        "max_dd": 86,
        "negative_pl_90_days": 0,
        "negative_pl_all_days": 0,
        "order_last_week": 1,
        "positive_pl_90_days": 0,
        "positive_pl_all_days": 0,
        "profit_12_month": 577,
        "profit_18_month": 577,
        "profit_3_month": 577,
        "profit_6_month": 577,
        "profit_all": 577,
        "profit_factor_90_days": 0,
        "profit_factor_all_days": 0,
        "profit_month": 26,
        "profit_week": 142,
        "realized_pl": -1308.44,
        "score": 49,
        "symbol": "USD",
        "subscribersIds": [
            143220,
            146565,
            124217,
            124218
        ],
        "minimum_deposit": 0,
        "has_subscription_code": false,
        "has_promo_offer": false,
        "show_in_leaderbord": true,
        "subscriptionInvestorAccounts": [
            143220,
            146565,
            124217,
            124218
        ],
        "allocation_method": 4,
        "risk_ratio": 1
    },
    "modules": []
}

Get statistics for the widget

GET [host]/api/v1/investment/widget/statistics/{account}

This method returns information about trading instruments used on a master or investment account and the percentage ratios of their use, as well as some trading statistics. In the widget, the returned information is displayed as follows:

Request

Headers

‍‍‍Authorization: Bearer <access_token>

Path parameter

Name
Required
Description

account

Yes

The MT login (number) of an account for which you want to get information.

Query parameter

Name
Required
Description

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.

Request example

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

Response

The response includes the object providing information about trading instruments used on the requested account for display in the Statistics widget.

Response example
{
    "status": 200,
    "meta": {
        "behaviours": [],
        "status": 200
    },
    "data": {
        "instruments_ratios": [
            {
                "name": "GBPUSD",
                "ratio": 27
            },
            {
                "name": "USDJPY",
                "ratio": 27
            },
            {
                "name": "USDCHF",
                "ratio": 9
            },
            {
                "name": "EURUSD",
                "ratio": 37
            }
        ],
        "number_of_trades": 11,
        "total_instruments": 4,
        "winning_trades": 3,
        "losing_trades": 8,
        "buy_trades": 5,
        "sell_trades": 6,
        "winning_weeks": 2,
        "losing_weeks": 1,
        "avg_trade_time": "0.14",
        "avg_trades_per_week": "5.5",
        "consecutive_losses": 3,
        "consecutive_wins": 1
    },
    "modules": []
}

See also:

Configure B2COPY widgets
Statistics widget
Trading Statistics
Statistics widget
Trading Statistics