List Portfolios
Retrieves all portfolios managed by the organization. This endpoint supports cursor-based pagination for efficient handling of large portfolio datasets.
Endpoint
Organization API only — this endpoint requires an organization-level API key.
GET https://ddp.definitive.fi/v2/organizationQuery Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
| limit | number | No | Maximum number of portfolios to return (1–100) | 10 |
| cursor | string | No | Cursor for pagination (use nextCursor from last response) | - |
Examples
// First page
const json = await AuthHelpers.signAndSend({
path: "/v2/organization",
method: "GET",
queryParams: { limit: "10" },
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
// Subsequent page
const nextPageJson = await AuthHelpers.signAndSend({
path: "/v2/organization",
method: "GET",
queryParams: {
limit: "10",
cursor: "2025-05-15 04:06:07.59881",
},
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});Response
{
data: [
{
portfolioId: "00000000-0000-0000-0000-000000000001",
portfolioName: "Trading Portfolio",
createdAt: "2024-08-05T20:48:11.584Z"
}
// ... additional portfolios
],
pagination: {
hasMore: true,
nextCursor: "2025-05-15 04:06:07.59881",
limit: 10
}
}Pagination
- First request: Omit the
cursorparameter - Subsequent pages: Pass the
nextCursorvalue from the previous response - End of data: When
hasMoreisfalse, there are no more portfolios to return - Cursor value: Represents the last
createdAttimestamp from the response page
Pagination Loop Example
let cursor = null;
let allPortfolios = [];
do {
const queryParams = { limit: "50" };
if (cursor) queryParams.cursor = cursor;
const response = await AuthHelpers.signAndSend({
path: "/v2/organization",
method: "GET",
queryParams,
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
allPortfolios.push(...response.data);
cursor = response.pagination.nextCursor;
} while (response.pagination.hasMore);