GET
/
links
/
{id}
/
investments
/
holdings
curl --request GET \
  --url http://localhost:8080/links/{id}/investments/holdings \
  --header 'Authorization: Bearer <token>'
{
  "holdings": [
    {
      "account_id": "acc_6Tef269B6ZArSVpYrxtjBV",
      "security_id": "sec_bb6fi893jxdfNxyAjnb784",
      "quantity": 10,
      "price": 98.12,
      "price_datetime": "2023-02-16T09:14:11",
      "value": 987.15,
      "cost_basis": 781.38
    }
  ],
  "securities": [
    {
      "security_id": "sec_bb6fi893jxdfNxyAjnb784",
      "name": "Microsoft",
      "type": "equity",
      "currency": "USD",
      "ticker": "MSFT",
      "isin": "US5949181045",
      "sedol": "<string>",
      "close_price": 98.12,
      "close_datetime": "2023-02-16T09:14:11"
    }
  ],
  "accounts": [
    {
      "account_id": "acc_6Tef269B6ZArSVpYrxtjBV",
      "account_type": "depository.checking",
      "name": "Premier Checking",
      "account_mask": "3748",
      "balances": {
        "currency": "USD",
        "available": 340.12,
        "current": 445.89,
        "limit": 500
      }
    }
  ],
  "link": {
    "link_id": "mk_eqkWN34UEoa2NxyALG8pcV",
    "institution_id": "chase",
    "institution_name": "Chase",
    "provider": "mx",
    "state": "connected",
    "last_synced_at": "2023-02-16T09:14:11",
    "tags": [
      "user_type:admin"
    ],
    "products": {
      "accounts": {
        "refreshed_at": "2023-02-16T09:14:11",
        "last_attempted_at": "2023-02-16T09:14:11"
      },
      "identity": {
        "refreshed_at": "2023-02-16T09:14:11",
        "last_attempted_at": "2023-02-16T09:14:11",
        "settings": {
          "required": true,
          "prefetch": false
        }
      }
    }
  }
}

Note that this endpoint does not trigger a fetch of holdings from the institution; it merely returns holdings that have already been fetched.

To force a check for new/updated owner information, you must use the products endpoint.

If you have requested prefetch or an on-demand update, you should check the refreshed_at date for this product in the returned response and compare that against the previous refreshed_at date, which you can get from any previous response for this or any other account or link request.

If the refreshed_at date has not increased, then updated data is not yet available.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

moneykit-version
string
default:2023-02-18

Path Parameters

id
string
required

The unique ID for this link.

Query Parameters

account_ids
string[]

An optional list of account IDs to filter the results.

Response

200
application/json

Successful Response

The response is of type object.