Skip to Content
API ReferencePortfolio

Portfolio

Portfolio balances and fee components for the authenticated user.

Endpoints

MethodPathDescription
GET/api/portfolio/Portfolio summary
GET/api/portfolio/componentPortfolio 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

ParameterTypeRequiredDescription
None-NoNo parameters for this endpoint.

Response

// See @loafmarkets/shared-types for the response type type Response = Record<string, unknown>;

Example response:

{ "success": true }

Errors

StatusCodeDescription
400validation_errorRequest failed schema validation.
401unauthorizedMissing or invalid authentication.
404not_foundResource not found (where applicable).
500internal_errorUnexpected 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

ParameterTypeRequiredDescription
None-NoNo parameters for this endpoint.

Response

// See @loafmarkets/shared-types for the response type type Response = Record<string, unknown>;

Example response:

{ "success": true }

Errors

StatusCodeDescription
400validation_errorRequest failed schema validation.
401unauthorizedMissing or invalid authentication.
404not_foundResource not found (where applicable).
500internal_errorUnexpected server error.

Requires API key authentication.

Last updated on