philidor-io Portfolio API

The Portfolio API from philidor-io — 2 operation(s) for portfolio.

Operations 2

POST /v1/portfolio/overlap Portfolio overlap / effective-N (preview) #
GET /v1/address/{address}/positions Get portfolio positions for an address #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/philidor-io:philidor-io-portfolio-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

philidor-io-portfolio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Philidor Io Portfolio API
  version: 1.2.0
  description: 'Operations tagged Portfolio across 2 of this provider''s published API definitions: philidor-openapi.json, philidor-io-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.philidor.io
  description: Production
- url: http://localhost:3003
  description: Local
tags:
- name: Portfolio
paths:
  /v1/portfolio/overlap:
    post:
      tags:
      - Portfolio
      summary: Portfolio overlap / effective-N (preview)
      description: 'Computes the effective number of independent bets in a portfolio using look-through to underlying factors: naiveEffectiveN treats each position as independent, effectiveN collapses positions that share underlying factors (through wrapper ancestry), and overlapRatio = effectiveN / naiveEffectiveN (1 = no overlap). Also returns the top shared factors and the most-overlapping position pairs (cosine similarity of factor-share vectors). status=authoritative when every position resolved, partial when only some did. Preview feature: dark unless enabled; Redis-only and fail-closed (503) when the look-through materialization is unavailable OR no requested position resolved (zero coverage).'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortfolioOverlapRequest'
      responses:
        '200':
          description: Effective-N / overlap decomposition for the portfolio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioOverlapResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '400':
          description: Bad request (malformed positions)
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: API key required
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Tier not eligible
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Feature disabled
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded; retry after Retry-After seconds
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Look-through materialization unavailable, corrupt, or zero coverage (no requested position resolved) — fail-closed, retry later
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
      - ApiKeyAuth: []
      operationId: postV1PortfolioOverlap
      parameters:
      - name: X-Request-Id
        in: header
        required: false
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,64}$
        description: Optional correlation id, echoed unchanged when valid; otherwise a UUID is generated.
    servers:
    - url: https://api.philidor.io
      description: Production
    - url: http://localhost:3003
      description: Local
  /v1/address/{address}/positions:
    get:
      tags:
      - Portfolio
      summary: Get portfolio positions for an address
      description: Returns all DeFi vault positions held by an Ethereum address across supported chains, with USD valuations and risk metrics.
      parameters:
      - schema:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address
          example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
        required: true
        name: address
        in: path
      - name: X-Request-Id
        in: header
        required: false
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,64}$
        description: Optional correlation id, echoed unchanged when valid; otherwise a UUID is generated.
      responses:
        '200':
          description: Portfolio positions with aggregates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressPositionsResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '400':
          description: Invalid address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '429':
          description: Rate limit exceeded; retry after Retry-After seconds
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
      security:
      - {}
      - ApiKeyAuth: []
      operationId: getV1AddressAddressPositions
    servers:
    - url: https://api.philidor.io
      description: Production
    - url: http://localhost:3003
      description: Local
components:
  schemas:
    RpcReadCoverage:
      type: object
      properties:
        requested_calls:
          type: integer
          minimum: 0
        successful_calls:
          type: integer
          minimum: 0
        failed_calls:
          type: integer
          minimum: 0
        unresolved_calls:
          type: integer
          minimum: 0
      required:
      - requested_calls
      - successful_calls
      - failed_calls
      - unresolved_calls
    ChainResult:
      type: object
      properties:
        chain_id:
          type: number
        chain_name:
          type: string
        status:
          type: string
          enum:
          - success
          - error
          - timeout
          - partial
        vault_count:
          type: number
        error_message:
          type:
          - string
          - 'null'
        rpc_coverage:
          $ref: '#/components/schemas/RpcReadCoverage'
      required:
      - chain_id
      - chain_name
      - status
      - vault_count
      - error_message
    PortfolioAggregates:
      type: object
      properties:
        total_value_usd:
          type: number
        weighted_risk_score:
          type:
          - number
          - 'null'
        weighted_risk_tier:
          type: string
          enum:
          - Prime
          - Core
          - Edge
          - Unrated
        weighted_apr:
          type:
          - number
          - 'null'
        position_count:
          type: number
        chain_count:
          type: number
        risk_distribution:
          type: array
          items:
            $ref: '#/components/schemas/RiskDistribution'
      required:
      - total_value_usd
      - weighted_risk_score
      - weighted_risk_tier
      - weighted_apr
      - position_count
      - chain_count
      - risk_distribution
    PortfolioOverlapResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            snapshotId:
              type: string
            builtAt:
              type: string
            validTime:
              type: string
            status:
              type: string
              enum:
              - authoritative
              - partial
              description: '''authoritative'' = all positions resolved; ''partial'' = only some resolved (see coverage.resolvedShare) so metrics are non-authoritative.'
            totalUsd:
              type: number
            positionHhi:
              type: number
            factorHhi:
              type: number
            naiveEffectiveN:
              type: number
            effectiveN:
              type: number
            overlapRatio:
              type: number
            positions:
              type: array
              items:
                type: object
                properties:
                  vaultKey:
                    type: string
                  amountUsd:
                    type: number
                  weight:
                    type: number
                  resolved:
                    type: boolean
                required:
                - vaultKey
                - amountUsd
                - weight
                - resolved
            topFactors:
              type: array
              items:
                type: object
                properties:
                  factorKey:
                    type: string
                  symbol:
                    type:
                    - string
                    - 'null'
                  weight:
                    type: number
                  positionCount:
                    type: number
                  vaultKeys:
                    type: array
                    items:
                      type: string
                  synthetic:
                    type: boolean
                required:
                - factorKey
                - symbol
                - weight
                - positionCount
                - vaultKeys
                - synthetic
            pairs:
              type: array
              items:
                type: object
                properties:
                  a:
                    type: string
                  b:
                    type: string
                  cosine:
                    type: number
                  sharedFactors:
                    type: array
                    items:
                      type: string
                required:
                - a
                - b
                - cosine
                - sharedFactors
            coverage:
              type: object
              properties:
                resolvedPositions:
                  type: number
                unresolvedPositions:
                  type: number
                resolvedUsd:
                  type: number
                resolvedShare:
                  type: number
                unresolvedVaultKeys:
                  type: array
                  items:
                    type: string
              required:
              - resolvedPositions
              - unresolvedPositions
              - resolvedUsd
              - resolvedShare
              - unresolvedVaultKeys
          required:
          - snapshotId
          - builtAt
          - validTime
          - status
          - totalUsd
          - positionHhi
          - factorHhi
          - naiveEffectiveN
          - effectiveN
          - overlapRatio
          - positions
          - topFactors
          - pairs
          - coverage
      required:
      - data
    PortfolioOverlapRequest:
      type: object
      properties:
        positions:
          type: array
          items:
            type: object
            properties:
              vaultKey:
                type: string
                pattern: ^\d+:0x[0-9a-f]{40}$
              amountUsd:
                type: number
                exclusiveMinimum: 0
            required:
            - vaultKey
            - amountUsd
          minItems: 1
          maxItems: 100
          description: Portfolio positions. vaultKey is `{chainId}:{lowercase address}`; duplicate keys are merged by summing amountUsd.
        maxFactors:
          type: integer
          exclusiveMinimum: 0
          maximum: 200
          default: 25
        maxPairs:
          type: integer
          exclusiveMinimum: 0
          maximum: 500
          default: 50
      required:
      - positions
    ErrorEnvelope:
      description: Error body. `legacy_code` is present for one compatibility release when an older endpoint previously emitted a lowercase route-specific code.
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - request_id
          properties:
            code:
              type: string
              pattern: ^[A-Z][A-Z0-9_]*$
              example: NOT_FOUND
            message:
              type: string
              example: Vault not found
            request_id:
              type: string
              description: Correlation id, also in the X-Request-Id header.
            legacy_code:
              type: string
              description: Previous lowercase code during the one-release migration window.
            pricing_url:
              type: string
              description: Present on a tier gate. Same URL as refusal.upgrade_url.
            refusal:
              description: Present on 401/403 for a gated data family (PHI-312). Same object as one row of GET /v1/access/families. x402_price is null until pay-per-request is live.
              type: object
              required:
              - restricted_fields
              - family
              - required_plan
              - upgrade_url
              - x402_price
              properties:
                restricted_fields:
                  type: array
                  items:
                    type: string
                family:
                  type: string
                required_plan:
                  type:
                  - string
                  - 'null'
                  enum:
                  - Free
                  - Analyst
                  - Pro
                  - Data
                  - Decisioning
                  - Embedded
                  - null
                upgrade_url:
                  type: string
                  example: https://philidor.io/pricing
                x402_price:
                  type: 'null'
          additionalProperties: true
    RiskDistribution:
      type: object
      properties:
        tier:
          type: string
          enum:
          - Prime
          - Core
          - Edge
          - Unrated
        count:
          type: number
        value_usd:
          type: number
        percent:
          type: number
      required:
      - tier
      - count
      - value_usd
      - percent
    AddressPositionsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            aggregates:
              $ref: '#/components/schemas/PortfolioAggregates'
            positions:
              type: array
              items:
                $ref: '#/components/schemas/Position'
            chain_results:
              type: array
              items:
                $ref: '#/components/schemas/ChainResult'
          required:
          - aggregates
          - positions
          - chain_results
      required:
      - data
    Position:
      type: object
      properties:
        vault_id:
          type: string
        vault_address:
          type: string
        vault_name:
          type: string
        chain_id:
          type: number
        chain_name:
          type: string
        protocol_id:
          type: string
        protocol_name:
          type: string
        protocol_logo:
          type:
          - string
          - 'null'
        curator_name:
          type:
          - string
          - 'null'
        asset_symbol:
          type:
          - string
          - 'null'
        balance_raw:
          type: string
        balance_usd:
          type: number
        share_of_vault:
          type: number
        tvl_usd:
          type: number
        apr_net:
          type:
          - number
          - 'null'
        base_apr:
          type:
          - number
          - 'null'
        risk_score:
          type:
          - number
          - 'null'
        risk_tier:
          type: string
          enum:
          - Prime
          - Core
          - Edge
          - Unrated
        is_shutdown:
          type: boolean
        kind:
          type: string
          enum:
          - vault
          - idle
        token_address:
          type:
          - string
          - 'null'
        token_symbol:
          type:
          - string
          - 'null'
        price_usd:
          type:
          - number
          - 'null'
        price_source:
          type:
          - string
          - 'null'
      required:
      - vault_id
      - vault_address
      - vault_name
      - chain_id
      - chain_name
      - protocol_id
      - protocol_name
      - protocol_logo
      - curator_name
      - asset_symbol
      - balance_raw
      - balance_usd
      - share_of_vault
      - tvl_usd
      - apr_net
      - base_apr
      - risk_score
      - risk_tier
      - is_shutdown
  headers:
    Retry-After:
      description: Seconds to wait before retrying (429, 503, 504).
      schema:
        type: integer
        minimum: 0
    X-RateLimit-Limit:
      description: Requests allowed in the active window for this caller.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the window resets.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in the active window.
      schema:
        type: integer
    X-Request-Id:
      description: Correlation id for the request. A valid inbound X-Request-Id (1-64 word characters or dashes) is echoed; otherwise one is generated. Quote it when reporting a failure.
      schema:
        type: string
  securitySchemes:
    IndexTokenAuth:
      type: http
      scheme: bearer
      description: Separate index preview/client token. Commercial API keys do not unlock private index routes.
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Philidor API key (`Authorization: Bearer pk_live_...`). Optional on public endpoints, where it raises rate limits and unlocks tiered capabilities. The administrative surfaces additionally require operator-set metadata.admin_surface=true; mutations require metadata.admin_role=admin_editor or admin_operator under the same write-role enforcement as admin sessions. A plan tier alone never grants administrative access.'
    AdminCookieAuth:
      type: apiKey
      in: cookie
      name: philidor_admin_session
      description: Administrative session. Additionally IP-allowlisted.
    DashboardCookieAuth:
      type: apiKey
      in: cookie
      name: philidor_dashboard_session
      description: Dashboard session cookie (httpOnly).
x-refined-from:
- philidor-openapi.json
- philidor-io-openapi.json