# Migrating from the legacy API

# Migrating from the legacy API

This guide helps you transition your integrations from the deprecated legacy API (`https://api.bitpanda.com/v1`) to the new, enhanced Bitpanda Public API (`https://api.public.bitpanda.com/v1`).

The new REST API consolidates previous endpoints, introduces historical tracking, and adds completely new capabilities such as programmatic trading and staking management.

---

## Endpoint Mapping Reference

Use the table below to find the new equivalents for your legacy endpoints:

| Legacy Endpoint (`https://api.bitpanda.com`) | New Public API Endpoint (`https://api.public.bitpanda.com`) | Description / Changes |
| :--- | :--- | :--- |
| `GET /v1/wallets`<br>`GET /v1/fiatwallets`<br>`GET /v1/asset-wallets` | `GET /v1/portfolio` | Consolidates all fiat and asset wallets into a unified portfolio view. |
| *— (No equivalent)* | `GET /v1/portfolio-history` | **New feature:** Track your portfolio balances and performance over time. |
| `GET /v1/trades`<br>`GET /v1/wallets/transactions`<br>`GET /v1/fiatwallets/transactions`<br>`GET /v1/assets/transactions/commodity` | `GET /v1/operations` | Groups all historical movements, trades, and transaction types into a unified timeline. |
| `GET /v1/ticker` | `GET /v1/assets`<br>`GET /v1/currencies`<br>`GET /v1/tickers/{assetId}` | Split into discrete endpoints to fetch assets details, currencies, or specific price tickers cleanly. |
| *— (Trading was not offered)* | `POST /v1/quotes`<br>`POST /v1/quotes/{id}/accept` | **New feature:** Request commercial quotes and execute trades programmatically. |
| *— (Earn was not offered)* | `GET /v1/earn/configs`<br>`POST /v1/earn/actions/{action}` | **New feature:** View staking configurations and manage your Bitpanda Earn stakes. |

---

## Key Changes Checklist

* **Base URL Update:** Update your integrations to point to the new base URL at `https://api.public.bitpanda.com/v1`.
* **New Scopes Required:** Review the required scopes on your API keys before switching over. Actions like trading or interacting with Earn now require distinct `Trade (Write)` or `Earn (Write)` permissions.
* **Unified Entities:** Instead of calling separate endpoints for `wallets` and `fiatwallets`, update your application models to look at the consolidated data returned by `/v1/portfolio` and `/v1/operations`.