Get a list of master and investment accounts

Use the method described below to get a list of master and investment accounts created on the B2COPY investment platform.

GET [host]/api/v2/b2copy/accounts

Request

Headers

Authorization: Bearer <access_token>

To get the access token, use the method to authorize in the Back Office.

Body

In the request body, specify the following parameters:

NameTypeRequiredDescription

investmentPlatformId

ineger

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.

account_number

string

No

Specify the MT login (number) of a master or investment account to get data about a specific account.

email

string

No

Specify the client email address to get data about accounts of a specific client.

is_master

boolean

No

If true, only master accounts are returned. If false, only investment accounts are returned.

limit

ineger

No

Specify this parameter to define the maximum number of items that may be returned in a response.

offset

ineger

No

Specify this parameter to exclude from a response the first N items of a resource collection.

sort_by

string

No

Sorts the items in the response by a specified parameter. Possible value: - created_at – the date and time when a master or investment account was created.

sort_order

string

No

Sorts the items in the response in a specified order. Possible values: - asc – the ascending order - desc – the descending order

Request example

curl --location --request GET 'https://host.name/api/v2/b2copy/accounts' \
--header 'Authorization: Bearer <accesss_token>' \
--data-raw '{
    "investment_platform_id": 1,
    "account_number": "2121944013",
    "email": "username@bexample.com",
    "is_master": true,
    "limit": 100,
    "offset": 0,
    "sort_by": "created_at",
    "sort_order": "asc"
}'

Response

The response includes an array of objects providing information about master and investment accounts matching the request parameters.

Response example

{
    "firstName": "John",
    "lastName": "Smith",
    "email": "username@example.com",
    "account_id": "2121944013",
    "group": "demo_standalone",
    "account_type": "master",
    "createdAt": "2024-02-09T10:32:47.000000Z"
}

Last updated

Was this helpful?