GetCustomerAccountGroups¶
Endpoint¶
GET /customer/account/groups
Description¶
Returns public trading groups that the authenticated customer can use for self-service account opening.
The server resolves the customer brand from SESSION_CUSTOMER. The method does not accept account_mode or currency query filters; the frontend should build the UI from the returned groups.
Authorization¶
Requires SESSION_CUSTOMER token.
Response¶
{
"brand": "default",
"can_open_demo": 1,
"can_open_real": 0,
"kyc_required_for_real": 1,
"kyc_approved": false,
"rows": [
{
"group": "demo-usd",
"brand": "default",
"currency": "USD",
"account_mode": "DEMO",
"account_mode_id": 0,
"default_leverage": 100,
"default_deposit": 10000.0,
"maxpositions": 100,
"available": true,
"kyc_required": false
}
],
"count": 1
}
If a real group is visible but blocked by KYC, it is returned with:
{
"available": false,
"kyc_required": true,
"block_reason": "KYC_REQUIRED"
}
Group Rules¶
GroupRecord.brandmust match the customer brand.GroupRecord.public_openingmust be1.GroupRecord.account_modedefinesDEMO(0) orREAL(1).- Brand flags
can_open_demoandcan_open_realcontrol which modes are returned. kyc_required_for_realblocks real account opening until customer KYC is approved.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Invalid session payload |
401 |
INVALID_CUSTOMER_SESSION |
Customer id is missing in session |
403 |
BRAND_NOT_AVAILABLE |
Customer brand is disabled or missing |
404 |
NOT_FOUND |
Customer was not found |