Retrieves all accounts associated with the authenticated user.
Endpoint: GET {{base_url}}/accounts
Response:
{
"data": [
{
"_id": "6189e76a93f2e543b9b0c123",
"account_name": "Master Account",
"assets": "1",
"account_value": "0",
"portfolio": "0.00",
"user_id": "6189e76a93f2e543b9b0c456",
"subaccount": false,
"createdAt": "2023-01-15T12:30:45.123Z",
"updatedAt": "2023-01-15T12:30:45.123Z"
}
],
"status": true,
"message": "Accounts and assets listed successfully"
}
Retrieves specific account details by account ID.
Endpoint: GET {{base_url}}/accounts/:account_id
Parameters:
account_id
(path): The ID of the account to retrieveExample Request:
GET {{base_url}}/accounts/6189e76a93f2e543b9b0c123
Response:
{
"status": "success",
"status_code": "200",
"message": "successful request",
"data": [
{
"_id": "6189e76a93f2e543b9b0c123",
"balance": "0",
"name": "Master Account",
"created_at": "2023-01-15T12:30:45.123Z"
}
]
}
Retrieves all assets associated with a specific account.
Endpoint: GET {{base_url}}/accounts/:account_id/assets
Parameters:
account_id
(path): The ID of the accountExample Request: