Portfolio
Portfolio balances and fee components for the authenticated user.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/portfolio/ | Portfolio summary |
GET | /api/portfolio/component | Portfolio component |
Portfolio summary
GET /api/portfolio/
Returns portfolio page data for the authenticated user.
Request
import axios from 'axios';
const response = await axios.get('https://api.loafmarkets.com/api/portfolio/', {
headers: { Authorization: `Bearer ${process.env.LOAF_API_KEY}` },
});
console.log(response.data);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| None | - | No | No parameters for this endpoint. |
Response
// See @loafmarkets/shared-types for the response type
type Response = Record<string, unknown>;Example response:
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
400 | validation_error | Request failed schema validation. |
401 | unauthorized | Missing or invalid authentication. |
404 | not_found | Resource not found (where applicable). |
500 | internal_error | Unexpected server error. |
Requires API key authentication.
Portfolio component
GET /api/portfolio/component
Returns fee schedule and component data used by the portfolio UI.
Request
import axios from 'axios';
const response = await axios.get('https://api.loafmarkets.com/api/portfolio/component', {
headers: { Authorization: `Bearer ${process.env.LOAF_API_KEY}` },
});
console.log(response.data);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| None | - | No | No parameters for this endpoint. |
Response
// See @loafmarkets/shared-types for the response type
type Response = Record<string, unknown>;Example response:
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
400 | validation_error | Request failed schema validation. |
401 | unauthorized | Missing or invalid authentication. |
404 | not_found | Resource not found (where applicable). |
500 | internal_error | Unexpected server error. |
Requires API key authentication.
Last updated on