# Launch funding

> Price what a launch needs funded, fit holder buys to balances, recover stranded funds and convert funding into the launch's quote token.

Funding endpoints price a launch plan and move the native and quote balances held by the launch's wallets. Amounts are raw chain units: lamports on Solana, wei on EVM chains, and the quote token's atomic units for quote amounts.

The `/quote/*` endpoints convert between the chain's native token and a launch's quote token (for example USDC) inside the launch's own wallets. A multi-launch group is gas-token only: quote endpoints answer `400` for it.

Base URL: `https://api-mig.proxima.tools`

## Endpoints

- `GET /launch/funding/get-required-funding/{launch_id}`: Retrieve required funding
- `POST /launch/funding/get-expected-funding/{launch_id}`: Estimate funding for a plan
- `POST /launch/funding/fit-to-balances/{launch_id}`: Fit holder buys to balances
- `POST /launch/funding/rescue-funding/{launch_id}`: Rescue funding
- `POST /launch/funding/swap-to-quote/{launch_id}`: Swap funding to the quote token
- `POST /quote/swap/{launch_id}`: Swap between native and quote
- `POST /quote/estimate-out/{launch_id}`: Estimate swap output
- `POST /quote/estimate-in/{launch_id}`: Estimate swap input
- `POST /quote/max/{launch_id}`: Retrieve maximum swap inputs

## The Required funding object

What the launch's saved plan still needs before it can go out. Amounts are raw chain units: lamports on Solana, wei on EVM chains; quote amounts are in the quote token's atomic units.

- `is_funding_complete` (boolean): `true` when every wallet holds what the plan needs and no per-mint config is pending.
- `stoxes_config_pending` (boolean): `true` only for an instant Stoxes MEV plan whose curve config is not on chain yet.
- `lesgo_config_pending` (boolean): `true` for a Lesgo plan with a supply target whose curve config is not on chain yet.
- `funding_status` (enum): State of the launch's funding job. Possible values: `None`, `Running`, `Failed`.
- `native_funding` (object): Native-token funding.
  - `total_funding_native` (integer): Total native funding the plan needs, raw units.
  - `complete` (boolean): `true` when the native funding is in place.
- `quote_funding` (object): Quote-token funding, for launches quoted in a token other than the native one.
  - `complete` (boolean): `true` when the quote funding is in place.
  - `total_quote_funding` (integer): Total quote funding the plan needs, in the quote token's atomic units.
  - `total_funding_quote` (integer): Deprecated wire name of `total_quote_funding`; read `total_quote_funding` first.
- `breakdown` (object): How the native total splits across the plan. Integers are numbers on Solana and decimal strings on EVM chains.
  - `dev_supply_cost` (integer | string): Cost of the dev wallet's supply buy.
  - `dev_extra_funding` (integer | string): Extra funding the dev wallet needs on top of its buy (fees, rent, reserves).
  - `mev_extra_funding` (integer | string): Extra funding for the MEV wallets.
  - `holder_supply_cost` (integer | string): Cost of the holders' supply buys.
  - `holder_extra_funding` (integer | string): Extra funding the holder wallets need on top of their buys.
  - `funding_extra_funding` (integer | string): Overhead of the funding itself.
  - `fee_target_cost` (integer | string): Cost of the fee target, when the plan sets one.
  - `total` (integer | string): Sum of the breakdown.

```json
{
  "native_funding": {
    "total_funding_native": 4825000000,
    "complete": false
  },
  "quote_funding": {
    "total_quote_funding": 0,
    "complete": true
  },
  "is_funding_complete": false,
  "stoxes_config_pending": false,
  "lesgo_config_pending": false,
  "funding_status": "None",
  "breakdown": {
    "dev_supply_cost": 1500000000,
    "dev_extra_funding": 25000000,
    "mev_extra_funding": 0,
    "holder_supply_cost": 3000000000,
    "holder_extra_funding": 250000000,
    "funding_extra_funding": 50000000,
    "total": 4825000000
  }
}
```

## The Expected funding object

The funding a plan would need, priced from the request body rather than from a saved plan. Integer amounts are raw chain units; they arrive as numbers on Solana and as decimal strings on EVM chains.

- `expected_funding` (integer | string): Total native funding the plan would need, raw units.
- `expected_supply` (integer | string): Token supply the plan's wallets are expected to buy, raw token units.
- `breakdown` (object): How `expected_funding` splits. A multi-launch group (`count` above 1) returns the group fields instead of the single-launch ones.
  - `dev_supply_cost` (integer | string): Cost of the dev wallet's supply buy.
  - `dev_extra_funding` (integer | string): Extra funding the dev wallet needs on top of its buy (fees, rent, reserves).
  - `mev_extra_funding` (integer | string): Extra funding for the MEV wallets.
  - `holder_supply_cost` (integer | string): Cost of the holders' supply buys.
  - `holder_extra_funding` (integer | string): Extra funding the holder wallets need on top of their buys.
  - `funding_extra_funding` (integer | string): Overhead of the funding itself.
  - `fee_target_cost` (integer | string): Cost of the fee target, when the plan sets one.
  - `total` (integer | string): Sum of the breakdown.
  - `reserve_seed` (integer | string): Multi-launch groups only: seed held in reserve.
  - `dev_total` (integer | string): Multi-launch groups only: total for the dev wallets.
  - `shared_gas` (integer | string): Multi-launch groups only: gas shared across members.
  - `reserve_gas` (integer | string): Multi-launch groups only: gas held in reserve.
  - `funder_gas` (integer | string): Multi-launch groups only: gas the funder spends.
  - `cex_extra_funding` (integer | string): Multi-launch groups only: extra funding for CEX withdrawals.
- `max_loss` (integer | string): Estimated maximum loss of the plan, raw units.
- `max_loss_post_migration` (integer | string): Estimated maximum loss once the token has migrated, raw units.
- `quote_transfer_fee_bps` (integer | null): Transfer fee charged by the launch's quote token, in basis points.
- `per_member_max_loss` (array<integer | string>): Multi-launch groups only: estimated maximum loss of each member launch.
- `count` (integer): Number of launches the estimate covers.
- `supply_cost_bps` (integer | null): Cost of the bought supply, in basis points.
- `estimated_duration_ms` (integer): Estimated duration of the launch run, in milliseconds.
- `mcap_live` (number | string | null): Projected market cap at launch, micro-USD.
- `mcap_before_cleanup` (number | string | null): Projected market cap before cleanup, micro-USD.
- `mcap_post_cleanup` (number | string | null): Projected market cap after cleanup, micro-USD.
- `mcap_migration` (number | string | null): Market cap at which the token migrates, micro-USD.
- `allowlist` (object): Allowlist launches only: the planned run, shaped like the [Allowlist plan summary](/reference/allowlist/#object-allowlist-plan-summary) object.

```json
{
  "expected_funding": 4825000000,
  "expected_supply": 182500000000000,
  "breakdown": {
    "dev_supply_cost": 1500000000,
    "dev_extra_funding": 25000000,
    "mev_extra_funding": 0,
    "holder_supply_cost": 3000000000,
    "holder_extra_funding": 250000000,
    "funding_extra_funding": 50000000,
    "total": 4825000000
  },
  "max_loss": 412000000,
  "max_loss_post_migration": 655000000,
  "quote_transfer_fee_bps": null,
  "supply_cost_bps": 1825,
  "estimated_duration_ms": 42000,
  "mcap_live": 9400000000,
  "mcap_before_cleanup": 11250000000,
  "mcap_post_cleanup": 10800000000,
  "mcap_migration": 69000000000
}
```

### Retrieve required funding

`GET /launch/funding/get-required-funding/{launch_id}`

Returns how much native and quote funding the launch's saved plan needs and whether it is in place. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: allowed.
- Retry: Safe to retry.

The funding page and the launch flow read this to decide whether the launch can start.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

Returns a Required funding object.

- `is_funding_complete` (boolean): `true` when every wallet holds what the plan needs and no per-mint config is pending.
- `stoxes_config_pending` (boolean): `true` only for an instant Stoxes MEV plan whose curve config is not on chain yet.
- `lesgo_config_pending` (boolean): `true` for a Lesgo plan with a supply target whose curve config is not on chain yet.
- `funding_status` (enum): State of the launch's funding job. Possible values: `None`, `Running`, `Failed`.
- `native_funding` (object): Native-token funding.
  - `total_funding_native` (integer | string): Total native funding the plan needs, raw units. A decimal string on EVM chains.
  - `complete` (boolean): `true` when the native funding is in place.
- `quote_funding` (object): Quote-token funding, for launches quoted in a token other than the native one.
  - `complete` (boolean): `true` when the quote funding is in place.
  - `total_quote_funding` (integer | string): Total quote funding the plan needs, in the quote token's atomic units. A decimal string on EVM chains.
  - `total_funding_quote` (integer): Deprecated wire name of `total_quote_funding`; read `total_quote_funding` first.
- `breakdown` (object): How the native total splits across the plan. Integers are numbers on Solana and decimal strings on EVM chains.
  - `dev_supply_cost` (integer | string): Cost of the dev wallet's supply buy.
  - `dev_extra_funding` (integer | string): Extra funding the dev wallet needs on top of its buy (fees, rent, reserves).
  - `mev_extra_funding` (integer | string): Extra funding for the MEV wallets.
  - `holder_supply_cost` (integer | string): Cost of the holders' supply buys.
  - `holder_extra_funding` (integer | string): Extra funding the holder wallets need on top of their buys.
  - `funding_extra_funding` (integer | string): Overhead of the funding itself.
  - `fee_target_cost` (integer | string): Cost of the fee target, when the plan sets one.
  - `total` (integer | string): Sum of the breakdown.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 404 | `not_found` | `No launch data saved` | Solana: the saved plan is incomplete, for example it has no funder or no holder wallets. A plan with no method answers `No launch method saved`. | Save a complete plan with [Update the launch plan](/reference/launches/#update-launch-plan), then read the funding again. |
| 400 | `bad_request` | `No launch method saved` | EVM: the launch has no saved plan yet. The same check answers `No funder wallet configured`, `No holder wallets saved` or `No holder amounts saved` for a partial plan. | Save a complete plan with [Update the launch plan](/reference/launches/#update-launch-plan), then read the funding again. |
| 400 | `bad_request` | `configure the group plan first` | The launch is a multi-launch group container whose group plan has not been saved. | Save the group plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |

#### Example request

```bash
curl "https://api-mig.proxima.tools/launch/funding/get-required-funding/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "native_funding": {
    "total_funding_native": 4825000000,
    "complete": false
  },
  "quote_funding": {
    "total_quote_funding": 0,
    "complete": true
  },
  "is_funding_complete": false,
  "stoxes_config_pending": false,
  "lesgo_config_pending": false,
  "funding_status": "None",
  "breakdown": {
    "dev_supply_cost": 1500000000,
    "dev_extra_funding": 25000000,
    "mev_extra_funding": 0,
    "holder_supply_cost": 3000000000,
    "holder_extra_funding": 250000000,
    "funding_extra_funding": 50000000,
    "total": 4825000000
  }
}
```

### Estimate funding for a plan

`POST /launch/funding/get-expected-funding/{launch_id}`

Prices a launch plan sent in the body and returns the funding it would need. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Prices the plan without saving or sending anything.

The launch wizard calls this while the plan is being edited, before it is saved. The client serializes large integers (`dev_supply`, `buy_native`, `buy_supply`, `fee_target`) and the delay, slippage and count fields as decimal strings. For a multi-launch group container the body is ignored and the saved group plan is priced.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Body parameters

- `mint_pubkey` (string, required): Token mint (Solana) or token address (EVM) of the launch.
- `launch_platform` (string, required): Launch platform identifier, e.g. `pumpfun`.
- `launch_method` (enum, required): Launch method of the plan. Possible values: `Mev`, `Stagger`, `Manual`, `Allowlist`.
- `scheduled_mode` (boolean, required): `true` for a scheduled (snipe) launch.
- `is_imported` (boolean, required): `true` when the token already exists and was imported.
- `dev_supply` (string, required): Supply the dev wallet buys, as an integer string.
- `front_mev_count` (integer, optional): Number of front MEV wallets.
- `back_mev_count` (integer, optional): Number of back MEV wallets. Must be 0 on EVM chains.
- `temp_holder_count` (integer, optional): Number of temporary holder wallets.
- `holder_count` (integer, required): Number of holder wallets.
- `buy_native` (string, optional): Native amount each holder spends, raw units, as an integer string. Send this or `buy_supply`.
- `buy_supply` (string, optional): Supply the holders buy, as an integer string. Send this or `buy_native`.
- `funding_type` (enum, required): How the wallets get funded. Possible values: `Classic`, `Cex`.
- `buy_delay` (string, optional): Delay between holder buys, as an integer string.
- `front_to_back_delay_ms` (string, optional): Delay between the front and back MEV legs in milliseconds, as an integer string.
- `back_to_temp_delay_ms` (string, optional): Delay between the back MEV and temporary holder legs in milliseconds, as an integer string.
- `slippage` (string, optional): Slippage in basis points, as an integer string.
- `fee_target` (string, optional): Fee target, raw units, as an integer string. Solana only; ignored on EVM chains.
- `count` (string, optional): Multi-launch attempt count, as an integer string. Above 1 the estimate uses the launch-group model (EVM).

#### Returns 200 OK

Returns an Expected funding object.

- `expected_funding` (integer | string): Total native funding the plan would need, raw units.
- `expected_supply` (integer | string): Token supply the plan's wallets are expected to buy, raw token units.
- `breakdown` (object): How `expected_funding` splits. A multi-launch group (`count` above 1) returns the group fields instead of the single-launch ones.
  - `dev_supply_cost` (integer | string): Cost of the dev wallet's supply buy.
  - `dev_extra_funding` (integer | string): Extra funding the dev wallet needs on top of its buy (fees, rent, reserves).
  - `mev_extra_funding` (integer | string): Extra funding for the MEV wallets.
  - `holder_supply_cost` (integer | string): Cost of the holders' supply buys.
  - `holder_extra_funding` (integer | string): Extra funding the holder wallets need on top of their buys.
  - `funding_extra_funding` (integer | string): Overhead of the funding itself.
  - `fee_target_cost` (integer | string): Cost of the fee target, when the plan sets one.
  - `total` (integer | string): Sum of the breakdown.
  - `reserve_seed` (integer | string): Multi-launch groups only: seed held in reserve.
  - `dev_total` (integer | string): Multi-launch groups only: total for the dev wallets.
  - `shared_gas` (integer | string): Multi-launch groups only: gas shared across members.
  - `reserve_gas` (integer | string): Multi-launch groups only: gas held in reserve.
  - `funder_gas` (integer | string): Multi-launch groups only: gas the funder spends.
  - `cex_extra_funding` (integer | string): Multi-launch groups only: extra funding for CEX withdrawals.
- `max_loss` (integer | string): Estimated maximum loss of the plan, raw units.
- `max_loss_post_migration` (integer | string): Estimated maximum loss once the token has migrated, raw units.
- `quote_transfer_fee_bps` (integer | null): Transfer fee charged by the launch's quote token, in basis points.
- `per_member_max_loss` (array<integer | string>): Multi-launch groups only: estimated maximum loss of each member launch.
- `count` (integer): Number of launches the estimate covers.
- `supply_cost_bps` (integer | null): Cost of the bought supply, in basis points.
- `estimated_duration_ms` (integer): Estimated duration of the launch run, in milliseconds.
- `mcap_live` (number | string | null): Projected market cap at launch, micro-USD.
- `mcap_before_cleanup` (number | string | null): Projected market cap before cleanup, micro-USD.
- `mcap_post_cleanup` (number | string | null): Projected market cap after cleanup, micro-USD.
- `mcap_migration` (number | string | null): Market cap at which the token migrates, micro-USD.
- `allowlist` (object): Allowlist launches only: the planned run, shaped like the [Allowlist plan summary](/reference/allowlist/#object-allowlist-plan-summary) object.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 422 | `unprocessable` | `No launch data saved` | Solana: the launch runs a stored script and its saved plan is incomplete, for example no funder or holder wallets. | Complete the saved plan with [Update the launch plan](/reference/launches/#update-launch-plan), then price it again. |
| 400 | `bad_request` | `invalid body: <path>: <cause>` | The body is not valid JSON, or a field is missing or has the wrong type. | Fix the field named in `message` and send the request again. |
| 400 | `bad_request` | `configure the group plan first` | The launch is a multi-launch group container whose group plan has not been saved. A group prices its saved plan and ignores the body. | Save the group plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |
| 500 | `internal_error` | `Too many front mev wallets` | Solana: `front_mev_count` is above what the platform and quote allow. | Lower `front_mev_count` and price the plan again. |
| 500 | `internal_error` | `Too many back mev wallets` | Solana: `back_mev_count` is above the maximum. | Lower `back_mev_count` and price the plan again. |
| 500 | `internal_error` | `Mev mode requires at least 1 front mev` | Solana: a `Mev` plan has `front_mev_count` set to 0. | Set `front_mev_count` to at least 1 for a `Mev` plan. |
| 500 | `internal_error` | `Front MEV wallets are not allowed for manual launches` | Solana: a `Manual` plan sets `front_mev_count`. Siblings: `Back MEV wallets are not allowed for manual launches`, `Temp holder wallets are not allowed for manual launches`, `fee_target is not supported for manual launches`. | Send a `Manual` plan with no MEV or temporary holder wallets and no `fee_target`. |
| 500 | `internal_error` | `Scheduled mode must be true` | Solana: `is_imported` is `true` while `scheduled_mode` is `false`. | Set `scheduled_mode` to `true` for an imported token. |
| 500 | `internal_error` | `Invalid pubkey` | Solana: `mint_pubkey` is not a valid address. | Send the launch's mint address in `mint_pubkey`. |
| 400 | `bad_request` | `back_mev is not supported on evm launches` | EVM: `back_mev_count` is not 0. | Send `back_mev_count: 0` on EVM chains. |
| 400 | `bad_request` | `temp_holder requires at least one front_mev wallet` | EVM: `temp_holder_count` is set without front MEV wallets. The same check answers `temp_holder count must be >= front_mev count` and `temp_holder count must be <= holder count`. | Keep `temp_holder_count` between `front_mev_count` and `holder_count`, with at least one front MEV wallet. |
| 400 | `bad_request` | `this platform does not run a temp_holder cascade` | EVM: the launch platform does not run a front MEV, temporary holder, holder cascade. | Send `temp_holder_count: 0` for this platform. |
| 400 | `bad_request` | `a mev launch on this platform requires front_mev wallets` | EVM: a `Mev` plan on a platform that needs front MEV wallets has `front_mev_count` set to 0. | Set `front_mev_count` to at least 1. |
| 400 | `bad_request` | `Front MEV wallets are not allowed for manual launches` | EVM: a `Manual` plan sets `front_mev_count`. | Send `front_mev_count: 0` for a `Manual` plan. |
| 400 | `bad_request` | `Scheduled mode must be true for imported launches` | EVM: `is_imported` is `true` while `scheduled_mode` is `false`. | Set `scheduled_mode` to `true` for an imported token. |
| 400 | `bad_request` | `holder buy amount must be buy_supply on an instant Mev launch and buy_native on every other, matching the unit the plan is stored in` | EVM: the holder amount uses the wrong unit for the plan: `buy_supply` is required on an instant `Mev` launch and `buy_native` on every other. | Send `buy_supply` for an instant `Mev` plan and `buy_native` otherwise. |
| 400 | `bad_request` | `count must be between 1 and 15` | EVM: `count` is outside 1 to 15. | Send a `count` from 1 to 15. |
| 404 | `not_found` | `this launch is not an allowlist curve launch` | Solana: `launch_method` is `Allowlist` but the launch has no allowlist curve run. | Use `Allowlist` only for a launch created as an allowlist curve launch. |
| 409 | `conflict` | `a run that has started keeps its plan` | Solana, `Allowlist`: the run has started, so its plan can no longer be priced again. | Read the run from [Retrieve allowlist run status](/reference/allowlist/#get-allowlist-status) instead. |
| 422 | `unprocessable` | `with <wallets> wallets the ten largest holdings reach <top_ten_bps> bps of supply, at or over the launch's <limit_bps> bps` | Solana, `Allowlist`: with this many holders the ten largest holdings, the pool vault included, reach the launch's top-ten limit. | Raise `holder_count` so the holdings spread under the limit. |
| 422 | `upstream_failure` | `price api issue: the sol price is unavailable` | Solana, `Allowlist`: no SOL price is available to convert the plan's quote needs. The body adds `service`. | Retry in a few seconds. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/funding/get-expected-funding/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "mint_pubkey": "5hQy8cNvR2kT7mXbW4pLz9GdE3sJfA6uYrK1tVnHpump",
  "launch_platform": "pumpfun",
  "launch_method": "Stagger",
  "scheduled_mode": false,
  "is_imported": false,
  "dev_supply": "30000000000000",
  "front_mev_count": 0,
  "back_mev_count": 0,
  "temp_holder_count": 0,
  "holder_count": 12,
  "buy_native": "250000000",
  "funding_type": "Classic",
  "buy_delay": "1200",
  "slippage": "1500"
}'
```

#### Example response

```json
{
  "expected_funding": 4825000000,
  "expected_supply": 182500000000000,
  "breakdown": {
    "dev_supply_cost": 1500000000,
    "dev_extra_funding": 25000000,
    "mev_extra_funding": 0,
    "holder_supply_cost": 3000000000,
    "holder_extra_funding": 250000000,
    "funding_extra_funding": 50000000,
    "total": 4825000000
  },
  "max_loss": 412000000,
  "max_loss_post_migration": 655000000,
  "quote_transfer_fee_bps": null,
  "supply_cost_bps": 1825,
  "estimated_duration_ms": 42000,
  "mcap_live": 9400000000,
  "mcap_before_cleanup": 11250000000,
  "mcap_post_cleanup": 10800000000,
  "mcap_migration": 69000000000
}
```

### Fit holder buys to balances

`POST /launch/funding/fit-to-balances/{launch_id}`

Lowers each underfunded holder's planned buy to what its wallet balance covers. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. A repeat recomputes from the current balances and leaves holders already fitted as they are, so it answers an empty `adjusted` list. It never raises a buy back.

Lets a draft launch go out without topping up short holders. Available for Solana launches with the Stagger or Manual method and a SOL quote. The dev wallet and the creation payer are not touched: the launch still refuses to start while either is short. Takes no body.

> Rewrites the holders' planned buy amounts in the saved plan.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

- `ok` (boolean): Always `true` on success.
- `adjusted` (array<object>): Holders whose buy was lowered.
  - `pubkey` (string): Holder wallet.
  - `from` (string): Previous planned buy, lamports.
  - `to` (string): New planned buy, lamports.
- `funded` (boolean): Whether the launch now passes the funding check the launch call makes.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `Buying what the balances allow is only available on Solana` | The launch is on an EVM chain. | Fund the holders instead: only Solana launches (IDs starting with `101`) can be fitted. |
| 500 | `internal_error` | `No launch data saved` | The saved plan is incomplete, for example it has no funder or no holder wallets. A plan with no method answers `No launch method saved`. | Save a complete plan with [Update the launch plan](/reference/launches/#update-launch-plan), then fit again. |
| 409 | `conflict` | `Token already launched` | The launch is no longer a draft. | Read the launch with [Retrieve a launch](/reference/launches/#retrieve-launch): only a draft can be fitted. |
| 500 | `internal_error` | `Funding already running` | The launch's funding job is still running. | Wait for the funding job to finish or cancel it from [List funding jobs](/reference/funding/#list-funding-jobs), then fit again. |
| 400 | `bad_request` | `A scripted launch plan cannot be fitted to balances` | The launch's plan is a script. | Fund the holders instead with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets). |
| 400 | `bad_request` | `Buying what the balances allow is only available for Stagger and Manual launches` | The launch method is not Stagger or Manual. | Fund the holders instead: only `Stagger` and `Manual` plans can be fitted. |
| 400 | `bad_request` | `Buying what the balances allow needs a SOL quoted launch` | The launch is quoted in a token other than SOL. | Fund the holders instead: only SOL-quoted launches can be fitted. |
| 500 | `internal_error` | `RPC error while fetching wallet balances` | The wallet balances could not be read from the RPC. Nothing was changed. | Retry after a short wait. |
| 422 | `unprocessable` | `No wallet holds enough to buy anything` | A pump.fun Stagger launch with no dev buy: fitted to their balances, every holder's buy drops to 0, so the launch would buy nothing. Nothing was saved. | Fund the holder wallets with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets) before fitting. |
| 409 | `conflict` | `The launch is no longer a draft` | The launch left draft while the buys were being fitted, so nothing was saved. | Read the launch with [Retrieve a launch](/reference/launches/#retrieve-launch): only a draft can be fitted. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/funding/fit-to-balances/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "adjusted": [
    {
      "pubkey": "3pGh8WcR5vTn2YkLz9QmXbE7aDs4FjU6wHrN1tKyPqVe",
      "from": "250000000",
      "to": "187500000"
    },
    {
      "pubkey": "6rVb2NqT8xK4mWc9HsZpG7eYjD3uLfA5tRnE1kQwXzMh",
      "from": "250000000",
      "to": "0"
    }
  ],
  "funded": true
}
```

### Rescue funding

`POST /launch/funding/rescue-funding/{launch_id}`

Sweeps SOL left on the launch's funding proxy accounts back to the funder. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Each call sweeps what the proxy accounts hold at that moment back to the funder, so a repeat only moves what is left and answers `No fund to rescue` once they are empty.

Applies to Classic funding on Solana. When a proxy cannot pay its own transaction fee, the funder pays it. The linked funding job is cancelled. Other funding types answer `No fund to rescue`. Takes no body.

> Moves funds on-chain from the proxy accounts to the funder wallet.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

Returns `ok` and a `message`: `Successfully withdrew`, or `No fund to rescue` when the proxies are empty.

- `ok` (boolean): Always `true` on success.
- `message` (string): Human-readable confirmation.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `unsupported_chain` | `this endpoint is not supported for this chain` | The launch is not on Solana. The body adds `chain`. | Call it only for Solana launches (IDs starting with `101`). |
| 500 | `internal_error` | `Funding already running` | The launch's funding job is still running. | Wait for the funding job to finish or cancel it from [List funding jobs](/reference/funding/#list-funding-jobs), then rescue again. |
| 422 | `unprocessable` | `Funder <funder> holds <balance> lamports, under the <floor> needed to pay the rescue fee for <count> proxy account(s). Fund it and rescue again.` | Some proxy accounts cannot pay their own fee and the funder holds too little to pay it for them. Nothing is sent for those proxies. | Send SOL to the funder wallet, then rescue again. |
| 422 | `unprocessable` | `<count> proxy account(s) still hold <lamports> lamports after the rescue; rescue again` | Some proxy accounts still hold lamports two seconds after the sweep, because a transfer did not land in time. The funding job is cancelled anyway. | Call it again: each call sweeps only what the proxies still hold. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/funding/rescue-funding/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "message": "Successfully withdrew"
}
```

### Swap funding to the quote token

`POST /launch/funding/swap-to-quote/{launch_id}`

Buys, in each launch wallet, the quote token it still needs, paying with its native funding. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. Read [Retrieve required funding](/reference/launch-funding/#get-required-funding) first: once `quote_funding.complete` is `true` there is nothing left to buy. A repeat only buys what each wallet still lacks, but cannot see a swap that is still landing.

Used on launches quoted in a token other than the native one, after native funding is complete. Each wallet keeps what it needs for its own gas. Takes no body.

> Executes swaps on-chain from the launch wallets.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

Returns `ok` and a `message`. Besides `Successfully swapped`, the call can succeed with `Native quote launch, no swap needed`, `No funding needed` or `Total native funding not completed` without swapping. On EVM chains the body also carries `swapped` (`wallet`, `tx_hash`) and `failed` lists, the message can be `All wallets already hold their quote`, and a partial run answers HTTP 200 with `ok: false` and `Swapped <n> of <m> wallets` or `Failed to approve quote spenders`.

- `ok` (boolean): `true` on success. On EVM chains, `false` with HTTP 200 when some wallets failed.
- `message` (string): Human-readable confirmation.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `launch groups are gas-token only` | The launch is a multi-launch group container, which only holds the gas token. | Call it on a single launch: a multi-launch group has no quote token. |
| 422 | `unprocessable` | `<quote_mint> is too thin for this funding: buying <quote_atoms> costs <spent> lamports and selling it back returns <recovered>, <excess_bps> bps over the <band_bps> bps allowed` | Solana: the quote's market is too thin: buying the funding's quote and selling it back would lose more than the allowed band. Variants: `<quote_mint> sells back to nothing`, `<quote_mint> cannot be bought: <reason>`. | Fund the wallets with the quote token directly, or plan a launch with a deeper quote. |
| 500 | `internal_error` | `Tx unconfirmed after maximum retries` | Solana: a wallet's swap got no confirmation after three attempts and may still land. Other wallets may already have swapped. | Wait a minute, then check [Retrieve required funding](/reference/launch-funding/#get-required-funding) before calling again. |
| 500 | `internal_error` | `Tx failed after maximum retries` | Solana: a wallet's swap failed on chain on every attempt. Other wallets may already have swapped. | Call it again: wallets that already hold their quote are skipped. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/funding/swap-to-quote/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "message": "Successfully swapped"
}
```

### Swap between native and quote

`POST /quote/swap/{launch_id}`

Swaps between the native token and the launch's quote token in the selected launch wallets. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. Look for the call's `launch.swap` event in [List a launch's activity events](/reference/history/#list-launch-events) before sending it again: it lists each wallet's outcome and is written when the batch finishes. A repeat with explicit amounts swaps them a second time.

Each wallet is handled on its own and reported in `results`; one wallet failing does not fail the call. With `exact_in`, `amount` is the input to spend and `0` sweeps the whole input balance. With `exact_out`, `amount` is the output to receive and `0` skips the wallet. Omit `wallets` to sweep every launch wallet (the funder excluded) as `exact_in`. The client sends wallet amounts as integer strings.

> Executes swaps on-chain from the launch wallets.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Body parameters

- `direction` (enum, required): `native_to_quote` spends the native token to buy the quote token; `quote_to_native` sells the quote token for the native token. Possible values: `quote_to_native`, `native_to_quote`.
- `swap_mode` (enum, optional): Which end of each swap `amount` fixes. Possible values: `exact_in`, `exact_out`.
- `wallets` (array<object>, optional): Wallets to swap from. Each must belong to the launch; the funder may be named explicitly.
  - `address` (string, required): Wallet address.
  - `amount` (string, optional): Amount, raw units, as an integer string.
- `slippage_bps` (integer, optional): Slippage tolerance in basis points.

#### Returns 200 OK

- `ok` (boolean): `true` when the batch ran.
- `results` (array<object>): One entry per wallet.
  - `wallet` (string): Wallet address.
  - `token` (string): Token involved, when relevant.
  - `status` (enum): Outcome for this wallet. Possible values: `swapped`, `skipped`, `failed`.
  - `reason` (string): Why the wallet was skipped or failed.
  - `amount` (string): Fixed-end amount, raw units.
  - `tx_hash` (string): EVM only: hash of the swap transaction. Solana results carry no signature.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `launch groups are gas-token only` | The launch is a multi-launch group container, which only holds the gas token. | Call it on a single launch: a multi-launch group has no quote token. |
| 422 | `unprocessable` | `No quote mint for this launch` | The launch is quoted in the chain's native token, so there is no quote token to swap. | Call it only for launches quoted in a token other than the native one. |
| 400 | `bad_request` | `invalid body: <path>: <cause>` | The body is not valid JSON, or a field is missing or has the wrong type. | Fix the field named in `message` and send the request again. |
| 400 | `bad_request` | `invalid wallet pubkey: <address>` | Solana: an entry of `wallets` is not a valid address. | Send base58 Solana addresses in `wallets[].address`. |
| 400 | `bad_request` | `invalid wallet address: <address>` | EVM: an entry of `wallets` is not a valid address. | Send `0x` addresses in `wallets[].address`. |
| 422 | `unprocessable` | `wallet <address> not in launch` | Solana: an entry of `wallets` is not a wallet of this launch. On EVM chains that wallet is reported as `skipped` instead. | Name only the launch's own wallets, as listed by [Retrieve a launch](/reference/launches/#retrieve-launch). |
| 422 | `unprocessable` | `Sale fees are still settling; retry the swap shortly` | Solana: fees from a recent sell are still settling on the launch's wallets (waited 30 seconds). | Retry in a few seconds. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/quote/swap/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "direction": "native_to_quote",
  "swap_mode": "exact_out",
  "wallets": [
    {
      "address": "3pGh8WcR5vTn2YkLz9QmXbE7aDs4FjU6wHrN1tKyPqVe",
      "amount": "25000000"
    },
    {
      "address": "6rVb2NqT8xK4mWc9HsZpG7eYjD3uLfA5tRnE1kQwXzMh",
      "amount": "25000000"
    }
  ],
  "slippage_bps": 100
}'
```

#### Example response

```json
{
  "ok": true,
  "results": [
    {
      "wallet": "3pGh8WcR5vTn2YkLz9QmXbE7aDs4FjU6wHrN1tKyPqVe",
      "status": "swapped",
      "amount": "25000000"
    },
    {
      "wallet": "6rVb2NqT8xK4mWc9HsZpG7eYjD3uLfA5tRnE1kQwXzMh",
      "status": "skipped",
      "reason": "insufficient input"
    }
  ]
}
```

### Estimate swap output

`POST /quote/estimate-out/{launch_id}`

Prices an exact-input swap between the native token and the quote token without executing it. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Read-only: nothing is sent.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Body parameters

- `direction` (enum, required): `native_to_quote` spends the native token to buy the quote token; `quote_to_native` sells the quote token for the native token. Possible values: `quote_to_native`, `native_to_quote`.
- `amount` (string, required): Input amount, raw units, as an integer string. Must be greater than 0.
- `slippage_bps` (integer, optional): Slippage tolerance in basis points.

#### Returns 200 OK

Returns the route's quote. Amounts are raw units, as decimal strings.

- `ok` (boolean): `true` when a route was found.
- `swap_mode` (enum): Which end of the swap is fixed. Possible values: `ExactIn`, `ExactOut`.
- `input_mint` (string): Mint (or token address) spent.
- `output_mint` (string): Mint (or token address) received.
- `in_amount` (string): Input amount, raw units.
- `out_amount` (string): Output amount, raw units.
- `other_amount_threshold` (string): Slippage-adjusted bound on the non-fixed end: minimum output for `ExactIn`, maximum input for `ExactOut`.
- `price_impact_pct` (string | null): Price impact of the route, in percent. Always `null` on EVM chains, and `null` on Solana when the route reports none.
- `slippage_bps` (integer): Slippage applied to the threshold, in basis points.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `amount must be greater than 0` | `amount` is 0. | Send an `amount` greater than 0. |
| 400 | `bad_request` | `launch groups are gas-token only` | The launch is a multi-launch group container, which only holds the gas token. | Call it on a single launch: a multi-launch group has no quote token. |
| 422 | `unprocessable` | `No quote mint for this launch` | The launch is quoted in the chain's native token, so there is no quote token to swap. | Call it only for launches quoted in a token other than the native one. |
| 400 | `bad_request` | `invalid body: <path>: <cause>` | The body is not valid JSON, or a field is missing or has the wrong type. | Fix the field named in `message` and send the request again. |
| 500 | `internal_error` | `jupiter quote failed` | Solana: the swap router returned no route for this amount. A timeout answers `jupiter quote timed out`. | Retry, or try a smaller amount. |
| 422 | `unprocessable` | `no route for that size on <chain>` | EVM: no pool can fill this amount. | Try a smaller amount. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/quote/estimate-out/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "direction": "native_to_quote",
  "amount": "1000000000",
  "slippage_bps": 50
}'
```

#### Example response

```json
{
  "ok": true,
  "swap_mode": "ExactIn",
  "input_mint": "So11111111111111111111111111111111111111112",
  "output_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "in_amount": "1000000000",
  "out_amount": "187420311",
  "other_amount_threshold": "186483209",
  "price_impact_pct": "0.0004",
  "slippage_bps": 50
}
```

### Estimate swap input

`POST /quote/estimate-in/{launch_id}`

Prices an exact-output swap between the native token and the quote token without executing it. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Read-only: nothing is sent.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Body parameters

- `direction` (enum, required): `native_to_quote` spends the native token to buy the quote token; `quote_to_native` sells the quote token for the native token. Possible values: `quote_to_native`, `native_to_quote`.
- `amount` (string, required): Output amount wanted, raw units, as an integer string. Must be greater than 0.
- `slippage_bps` (integer, optional): Slippage tolerance in basis points.

#### Returns 200 OK

Returns the route's quote. Amounts are raw units, as decimal strings.

- `ok` (boolean): `true` when a route was found.
- `swap_mode` (enum): Which end of the swap is fixed. Possible values: `ExactIn`, `ExactOut`.
- `input_mint` (string): Mint (or token address) spent.
- `output_mint` (string): Mint (or token address) received.
- `in_amount` (string): Input amount, raw units.
- `out_amount` (string): Output amount, raw units.
- `other_amount_threshold` (string): Slippage-adjusted bound on the non-fixed end: minimum output for `ExactIn`, maximum input for `ExactOut`.
- `price_impact_pct` (string | null): Price impact of the route, in percent. Always `null` on EVM chains, and `null` on Solana when the route reports none.
- `slippage_bps` (integer): Slippage applied to the threshold, in basis points.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `amount must be greater than 0` | `amount` is 0. | Send an `amount` greater than 0. |
| 400 | `bad_request` | `launch groups are gas-token only` | The launch is a multi-launch group container, which only holds the gas token. | Call it on a single launch: a multi-launch group has no quote token. |
| 422 | `unprocessable` | `No quote mint for this launch` | The launch is quoted in the chain's native token, so there is no quote token to swap. | Call it only for launches quoted in a token other than the native one. |
| 400 | `bad_request` | `invalid body: <path>: <cause>` | The body is not valid JSON, or a field is missing or has the wrong type. | Fix the field named in `message` and send the request again. |
| 500 | `internal_error` | `jupiter quote failed` | Solana: the swap router returned no route for this amount. A timeout answers `jupiter quote timed out`. | Retry, or try a smaller amount. |
| 422 | `unprocessable` | `no route for that size on <chain>` | EVM: no pool can fill this amount. | Try a smaller amount. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/quote/estimate-in/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "direction": "native_to_quote",
  "amount": "50000000",
  "slippage_bps": 50
}'
```

#### Example response

```json
{
  "ok": true,
  "swap_mode": "ExactOut",
  "input_mint": "So11111111111111111111111111111111111111112",
  "output_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "in_amount": "266781504",
  "out_amount": "50000000",
  "other_amount_threshold": "268115411",
  "price_impact_pct": "0.0001",
  "slippage_bps": 50
}
```

### Retrieve maximum swap inputs

`POST /quote/max/{launch_id}`

Returns the largest input each launch wallet can swap in the given direction, and their total. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Read-only: nothing is sent.

For `native_to_quote`, the maximum is the spendable native balance after the fee reserve; for `quote_to_native`, the whole quote balance. The app uses it to cap inputs so a "max" swap is not skipped.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Body parameters

- `direction` (enum, required): `native_to_quote` spends the native token to buy the quote token; `quote_to_native` sells the quote token for the native token. Possible values: `quote_to_native`, `native_to_quote`.
- `wallets` (array<string>, optional): Wallet addresses to include. Omit or send an empty array for all launch wallets.

#### Returns 200 OK

- `ok` (boolean): Always `true` on success.
- `wallets` (array<object>): Per-wallet maximum.
  - `address` (string): Wallet address.
  - `max_in` (string): Maximum input, raw units.
- `total_max_in` (string): Sum of `max_in`, raw units.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `launch groups are gas-token only` | The launch is a multi-launch group container, which only holds the gas token. | Call it on a single launch: a multi-launch group has no quote token. |
| 422 | `unprocessable` | `No quote mint for this launch` | The launch is quoted in the chain's native token, so there is no quote token to swap. | Call it only for launches quoted in a token other than the native one. |
| 400 | `bad_request` | `invalid body: <path>: <cause>` | The body is not valid JSON, or a field is missing or has the wrong type. | Fix the field named in `message` and send the request again. |
| 400 | `bad_request` | `invalid wallet pubkey: <address>` | Solana: an entry of `wallets` is not a valid address. | Send base58 Solana addresses in `wallets`. |
| 400 | `bad_request` | `invalid wallet address: <address>` | EVM: an entry of `wallets` is not a valid address. | Send `0x` addresses in `wallets`. |
| 422 | `unprocessable` | `wallet <address> not in launch` | An entry of `wallets` is not a wallet of this launch. | Name only the launch's own wallets, as listed by [Retrieve a launch](/reference/launches/#retrieve-launch). |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/quote/max/101000000004217" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "direction": "quote_to_native",
  "wallets": [
    "3pGh8WcR5vTn2YkLz9QmXbE7aDs4FjU6wHrN1tKyPqVe",
    "6rVb2NqT8xK4mWc9HsZpG7eYjD3uLfA5tRnE1kQwXzMh"
  ]
}'
```

#### Example response

```json
{
  "ok": true,
  "wallets": [
    {
      "address": "3pGh8WcR5vTn2YkLz9QmXbE7aDs4FjU6wHrN1tKyPqVe",
      "max_in": "24871002"
    },
    {
      "address": "6rVb2NqT8xK4mWc9HsZpG7eYjD3uLfA5tRnE1kQwXzMh",
      "max_in": "25000000"
    }
  ],
  "total_max_in": "49871002"
}
```
