Migration from v4 to v5.0

Key Difference between V4 and V5

V5 introduces a fundamental separation between snapshot and metrics:

  • snapshot — a state at a specific point in time
  • metrics — historical metrics over a selected time range (e.g. 1day, 1week)

Migration Guide: From /v4 to /v5.0

When calling through the unified gateway at https://api.1inch.com or the MCP product_api tool, use the gateway prefix /portfolio/portfolio/v5.0/... (prepend an extra /portfolio). The tables below show service / OpenAPI paths /portfolio/v5.0/... after routing.

General

V4 Endpoint V5.0 Endpoint Notes
/portfolio/v4/general/is_available /portfolio/v5.0/general/status Renamed
/portfolio/v4/general/supported_chains /portfolio/v5.0/general/supported_chains Same functionality
/portfolio/v4/general/supported_protocols /portfolio/v5.0/general/supported_protocols Same functionality
/portfolio/v4/general/current_value /portfolio/v5.0/general/current_value Wrapped response
/portfolio/v4/general/profit_and_loss Removed → see /metrics Moved to metrics
/portfolio/v4/general/value_chart /portfolio/v5.0/general/chart Renamed
(none) /portfolio/v5.0/general/address_check New endpoint

Tokens

V4 Endpoint V5.0 Endpoint Notes
/portfolio/v4/overview/erc20/current_value /portfolio/v5.0/tokens/snapshot Snapshot replaces current value
/portfolio/v4/overview/erc20/profit_and_loss /portfolio/v5.0/tokens/metrics Historical metrics
/portfolio/v4/overview/erc20/details Covered by snapshot + metrics Merged into snapshot and metrics

Protocols

V4 Endpoint V5.0 Endpoint Notes
/portfolio/v4/overview/protocols/current_value /portfolio/v5.0/protocols/snapshot Snapshot replaces current value
/portfolio/v4/overview/protocols/profit_and_loss /portfolio/v5.0/protocols/metrics Historical metrics
/portfolio/v4/overview/protocols/details Covered by snapshot + metrics Merged into snapshot and metrics

Did you find what you need?