# /api/v2/public/get_portfolio_margins stops working

Calls to /api/v2/public/get_portfolio_margins on Deribit API stopped working on May 13, 2025.

## What to use instead

Use /api/v2/private/simulate_portfolio (it needs an authenticated session).

The replacement is a private method: a caller of the public one needs API credentials.

- API: Deribit API (www.deribit.com)
- Kind: Endpoint removal
- Announced: May 13, 2025
- Takes effect: May 13, 2025
- Calls after that day: fail
- Calls it hits: `/api/v2/public/get_portfolio_margins`
- Source: [Announcement](https://docs.deribit.com/changelogs/jsonrpc)
- Verified: November 6, 2026, against Deribit API's own pages
- Page: https://www.okapi.bot/providers/deribit-api/breaking-changes/api-v2-public-get-portfolio-margins-stops-working/

## Deribit API's words

> The methods private/get_portfolio_margins and public/get_portfolio_margins have now been fully removed from the API, following a period of deprecation.

Okapi finds the calls this change hits in your repo and opens the pull request with the fix: https://github.com/apps/okapi-agent
