Request contract
DELETE /api/v1/portfolios/{portfolioId}. Remove an exchange connection, encrypted credential and account-scoped stored portfolio data. Send the personal token in X-API-Key and keep it outside browser code and public logs.
Response and metering
A successful response confirms removal without returning the deleted secret or provider payload. Successful metered responses publish X-Credit-Cost and X-Credits-Remaining so usage can be recorded without another request.
Production behavior
Deletion in ChainsFlow does not revoke the original API key. Tell the user to revoke it in the exchange security settings. Handle application/problem+json errors by stable code, preserve the correlation ID and never retry a mutation unless the workflow is idempotent.