Depositors

Get depositor portfolio

Returns a depositor's portfolio broken down by vault and aggregated at the portfolio level. Per-vault data includes: annualized yield (APY calculated as IRR/money-weighted return), holding period, interest earned, start/end position values, total deposited/withdrawn, share balances, and deposit/withdraw counts — all in both native token amounts (raw integer strings) and USD where pricing is available. The portfolio-level summary aggregates these metrics across all vaults in USD, including a combined APY. Use the expand parameter to include per-vault transaction timelines (with running balances), organization details, and daily time series (vault-daily-stats for per-vault, portfolio-daily-stats for portfolio-level, or daily-stats for both). Uses FIFO accounting for cost basis tracking. Supports optional date range filtering — when startDate is provided, all prior transactions are used to compute the opening position. Requires authentication.

get/v3/depositors/portfolio

Request

  • Base URL: https://api.creditcoop.xyz
  • URL: https://api.creditcoop.xyz/v3/depositors/portfolio
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://clerk.creditcoop.xyz/oauth/authorize, token URL https://clerk.creditcoop.xyz/oauth/token)

Query parameters

protocolVersionstring[]

Filter by protocol version(s). Comma-separated or repeated (e.g. ?protocolVersion=v1,v2 or ?protocolVersion=v1&protocolVersion=v2). Omit to return all versions.

addressstring required

Depositor owner address — the ERC-4626 holder of vault shares (per balanceOf). Returns portfolio performance for shares currently owned by this address. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

networkIdstring

CAIP-2 network ID (e.g., "eip155:1", "eip155:8453"). If omitted, results span all chains.

startDatestring
Example:2025-01-01

ISO 8601 date for the start of the measurement window (earliest: 2020-01-01). Prior transactions are used to compute the opening position.

endDatestring
Example:2025-03-19

ISO 8601 date for the end of the measurement window (inclusive). Defaults to now.

expandstring[]

Comma-separated list of fields to expand. Valid values: "transactions" (includes per-vault transaction timelines (with running balances)), "organization" (includes full organization object with links for each vault), "vault-daily-stats" (includes per-vault daily stats timeseries), "portfolio-daily-stats" (includes portfolio-level daily stats timeseries (USD-denominated, summed across vaults)), "daily-stats" (alias — expands to both vault-daily-stats and portfolio-daily-stats).

Response

Default Response

addressstring required

Depositor owner address queried — the ERC-4626 share holder.

networkIdstring nullable required

CAIP-2 network filter applied (null if querying all chains)

startDatestring date-time nullable required

Start of measurement window (resolved from param or earliest activity; null if no activity)

endDatestring date-time nullable required

End of measurement window (resolved from param or current time; null if no activity)

Example response

{
  "vaults": [
    {
      "organization": {
        "id": "550e8400-e29b-41d4-a716-446655440000"
      },
      "dailyStats": [
        {
          "date": "2025-01-15"
        }
      ]
    }
  ],
  "portfolio": {
    "dailyStats": [
      {
        "date": "2025-01-15"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.