# Create a migration plan **POST /byron-wallets/{walletId}/migrations/plan** Generate a plan for migrating the UTxO balance of this wallet to another wallet, without executing the plan. This operation generates a plan that transfers as much of the wallet's balance as possible, by creating as many selections as may be necessary to migrate the entire balance. Each selection created is the basis for a transaction. In order to minimize the total transaction fee required, UTxO entries are coalesced together to the greatest extent possible in the resulting selections. No attempt is made to preserve the wallet's UTxO distribution. The plan is generated on a best-effort basis. If there is insufficient ada available to pay for the entire UTxO set to be migrated, then only a subset of the wallet's UTxO set will be included in the resultant plan. ## Servers - https://localhost:8090/v2: https://localhost:8090/v2 () ## Parameters #### Path parameters - **walletId** (string(hex)) ## Body parameters Content-type: application/json - **addresses** (array[string(base58) | bech32]) A sequence of characters that encodes (in Base58 or Bech32) a sequence of bytes which represents an address on the Cardano blockchain. Sequences in Base58 encoding are expected to be legacy Byron addresses, whereas sequences in Bech32 encoding correspond to current Shelley addresses. For more details, see [CIP-0019 — Cardano addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019) . ## Responses ### 406: Not Acceptable #### Body Parameters: application/json (object) - **message** (string) May occur when providing an invalid 'Accept' header. - **code** (string) ### 404: Not Found #### Body Parameters: application/json (object) - **message** (string) May occur when a given walletId does not match with any known wallets (because it has been deleted, or has never existed). - **code** (string) - **info** (object) ### 403: Forbidden #### Body Parameters: application/json (object) - **message** (string) May occur when trying to migrate a wallet that is empty or full of dust. - **code** (string) ### 202: Accepted #### Body Parameters: application/json (object) - **selections** (array[object]) The complete set of selections required for a migration. Each selection is the basis for a single transaction. The ordering of selections within the list is not significant. After conversion into transactions, the transactions can be broadcast to the network in any order to perform the migration. - **total_fee** (object) The total amount to be paid in fees for a migration. This is the total sum of the fees of the individual selections. - **balance_leftover** (object) The total balance of assets that **cannot** be migrated. The **ada** component of this balance is the total sum of all dust ada entries in the UTxO set. An ada entry is considered to be dust if its value is not large enough to pay for the marginal cost of including it in a transaction. The **assets** component of this balance is the total sum of all non-ada assets that cannot currently be migrated. Tokens of a non-ada asset cannot be migrated if there is insufficient ada available to pay for their inclusion in a transaction. - **balance_selected** (object) The total balance of assets that **can** be migrated. [Powered by Bump.sh](https://bump.sh)