Manage a Portfolio

Prerequisites

  • Client ID
  • Client Secret
  • OAuth Token
  • Open Business

Every business is assigned a default allocation when it is created. In the sandbox MVP, this default allocation is set to 100% Managed Treasuries. However, customers have the flexibility to change their portfolio setup at any time, and these changes will be reflected in the "set portfolio" call.

In this guide, you’ll learn how to view your portfolios, change your portfolio preferences, and retrieve portfolio documents.

Set Portfolio Preferences

To look up an existing portfolio, send a GET request to /v1/businesses/{{business_id}}/portfolio.

You can update your portfolio configuration by making a POST request to /v1/businesses/{business_id}/portfolio and providing the necessary data for the changes.

We currently have three products that you can allocate money to –– Managed Treasuries, Managed Income, and Managed Money Market.

When making changes to your portfolio, the overall allocation should add up to 100%.

For example, you could set your portfolio to the following:

{
"products": [
    {
        "product": "managed_income",
        "percentage": 33.34
    },
    {
        "product": "managed_treasuries",
        "percentage": 33.33
    },
    {
        "product": "managed_money_market",
        "percentage": 33.33
    }
]
}

The API handles validation of percentages with precision to two decimal places.

Note: Our active management team is available to help you ensure your clients can make informed decisions about their portfolio allocations. Contact your Treasure team for more information.

Return a Business's Portfolio Balance History

To retrieve the portfolio balance history for a business, make a GET request to /v1/businesses/{business_id}/portfolio_history.

Balance history will not be available in the MVP of the Sandbox, but you will be able to retrieve the portfolio's balance at a specific point in time through the /v1/businesses/{{business_id}}/portfolio call.

Your portfolio history will look like the following:

[
    {
        "date": "2023-09-11",
        "total_unallocated": { "currency": "USD", "amount": "100.00" },
        "total_value": { "currency": "USD", "amount": "0.00" },
        "total_return": { "currency": "USD",  "amount": "0.00"},
        "products": [
            {
                "product": "managed_treasuries",
                "current_allocation": {
                    "percentage": 0.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "target_allocation": {
                    "percentage": 100.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "return": { "currency": "USD", "amount": "0.00" }
            },
            {
                "product": "managed_income",
                "current_allocation": {
                    "percentage": 0.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "target_allocation": {
                    "percentage": 100.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "return": { "currency": "USD", "amount": "0.00" }
            },
            {
                "product": "managed_money_market",
                "current_allocation": {
                    "percentage": 0.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "target_allocation": {
                    "percentage": 100.0,
                    "value": { "currency": "USD", "amount": "0.00" }
                },
                "return": { "currency": "USD", "amount": "0.00" }
            }
        ]
    }
]

A business' current_allocation may change depending on:

  • Deposits being allocated to the portfolio
  • Changes in market value
  • Rebalances done by Treasure to bring your customer’s portfolio in alignment with their target

Retrieve All Documents & Specific Document

You can retrieve all documents associated with a customer, such as monthly statements, by making a GET request to /v1/businesses/{business_id}/documents. Additionally, it's possible to retrieve a specific document for a business by providing the document ID to the same call, as follows: /v1/businesses/{business_id}/documents/{document_id}.

A webhook is sent when the document is ready, and the provided link leads to a PDF document.

The response body for retrieving all documents will look like the following:

{
    "id": "9e82dcf5-5676-11ee-a751-7f32ce80958a",
    "type": "custodian_statement",
    "date": "2023-09-18",
    "name": "2023-09-18 Statement",
    "url": "https://www.treasurefinancial.com/?example_url_for=9e82..."
}

Note: document links will expire after 24 hours and should not be cached.