# Launch execution

> Fund the wallets of a launch, launch it and follow its progress.

Once a launch has a plan, fund its wallets from the funder, then launch it. The launch and snipe calls answer with a stream of [Launch progress events](#object-launch-progress-event) instead of a single JSON body, so read the response incrementally.

A scheduled launch (`scheduled_mode`) deploys first and buys later with [Snipe a scheduled launch](#snipe-launch). The remaining calls prepare platform accounts before a launch or recover funds afterwards.

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

## Endpoints

- `POST /launch/distribute/{launch_id}`: Fund the launch wallets
- `POST /launch/sol/stoxes/prepare-config/{launch_id}`: Prepare a Stoxes config
- `POST /launch/sol/lesgo/prepare-config/{launch_id}`: Prepare a Lesgo config
- `POST /launch/{launch_id}`: Launch a token
- `POST /snipe/{launch_id}`: Snipe a scheduled launch
- `POST /tracker/deploy/{chain_id}/{dex}`: Deploy from the X tracker
- `POST /launch/streamflow/resume/{launch_id}`: Resume a Streamflow airdrop
- `GET /launch/get-mev-contract/{launch_id}`: List MEV contracts
- `POST /launch/rescue-mev-contract/{launch_id}`: Rescue MEV contracts

## The Launch progress event object

One `data:` line of the launch and snipe event streams. The stream ends after the last step or the first failure.

- `step` (integer): Current step, starting at 1.
- `total` (integer): Number of steps.
- `ok` (boolean): `false` when this step failed.
- `message` (string): What the step did.
- `token_address` (string): Token address, once deployed.
- `bundle3_failed_mevs` (array<integer>): Indexes of front MEV wallets whose bundle failed.
- `bundle4_failed_temps` (array<integer>): Indexes of temporary holders whose bundle failed.
- `proxies_rescued` (integer): Proxy contracts emptied back to their owners.

```json
{
  "step": 2,
  "total": 4,
  "ok": true,
  "message": "Token deployed",
  "token_address": "HtSTV4r6EZBnJfTQkWLf1ZbTC8UjUxL9evrE67EmuzyF"
}
```

### Fund the launch wallets

`POST /launch/distribute/{launch_id}`

Starts sending native from the funder to every wallet of the launch plan. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. A repeat only tops up wallets still below target, but on EVM nothing refuses it while an earlier job is still sending, so the wallets can be funded twice. Read [Retrieve required funding](/reference/launch-funding/#get-required-funding) and the `funding.execute` event in [List a launch's activity events](/reference/history/#list-launch-events) first.

On Solana, and on EVM when the plan has a `funding_delay`, funding runs in the background after the call returns and the response carries its `funding_job_id`. On EVM with no delay, the transfers are sent before the call returns. For a `Cex` launch, `plan` lists the exchange sources to route through.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Body parameters

- `plan` (array<string>, optional): IDs of the exchange sources to fund through. Sent only when non-empty.
- `cex_provider` (enum, optional): Exchange route provider. Possible values: `husher`.

#### Returns 200 OK

- `ok` (boolean): `true` when the funding started or nothing was needed.
- `message` (string): Human-readable outcome, for example `No funding needed` when every wallet is already at its target. Absent from an immediate EVM transfer.
- `funding_job_id` (string): ID of the funding job started in the background. Absent when nothing was needed and from an immediate EVM transfer.
- `tx_hash` (string): EVM with no `funding_delay`: hash of the first transfer.
- `tx_hashes` (array<string>): EVM with no `funding_delay`: hashes of every transfer, sent before the call returned.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `token already launched` | EVM: the token is already deployed. A staged scheduled launch can still fund its holders. | Fund launch wallets before the launch; afterwards, move native with [Create a funding draft](/reference/funding/#create-a-funding-draft). |
| 400 | `bad_request` | `no wallets configured to fund` | EVM: the saved plan has no wallet to fund. | Add wallets to the plan with [Update the launch plan](/reference/launches/#update-launch-plan), then fund again. |
| 400 | `bad_request` | `No cex kinds provided` | A `Cex` launch was funded with no exchange in `plan`. | Send at least one exchange in `plan`, chosen from [List funding sources](/reference/funding/#list-funding-sources). |
| 422 | `unprocessable` | `Funder don't have enough funds` | Solana: the funder cannot cover the transfers plus its safety reserve. Nothing was sent. The existing typo is the API's. | Top up the funder or lower the planned buys, then fund again. |
| 422 | `unprocessable` | `funder <funder> cannot cover this distribution (<amount> wei); top it up and retry` | EVM: the node refused the transfers because the funder cannot pay for them. | Top up the funder named in the message, check [Retrieve required funding](/reference/launch-funding/#get-required-funding), then fund again. |
| 422 | `unprocessable` | `At least one wallet's funding amount is below the minimum of every selected exchange` | Solana `Cex` launch: a wallet's amount is below the minimum of every exchange in `plan`. | Add an exchange with a lower minimum to `plan` (see [List funding sources](/reference/funding/#list-funding-sources)) or raise the wallet's planned buy. |
| 422 | `unprocessable` | `Wallet cannot spend: <wallets>. Its account was turned into a durable nonce or carries data, so its key is compromised; replace it` | Solana: a plan wallet's account was turned into a durable nonce or carries data, so it cannot send. The message lists each wallet with its role. | Replace the listed wallets in the plan with [Update the launch plan](/reference/launches/#update-launch-plan) and stop using their keys. |
| 500 | `internal_error` | `Funding already running` | Solana: a funding job started by an earlier call is still running. | Wait for the running job to finish, then read [Retrieve required funding](/reference/launch-funding/#get-required-funding) before funding again. |
| 500 | `internal_error` | `No launch method saved` | Solana: no launch plan has been saved for this launch yet. | Save a plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/distribute/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Example response

```json
{
  "ok": true,
  "funding_job_id": "3f2b7c1e-8a4d-4f6b-9c2e-5d1a0b7e9f34",
  "message": "Successfully started distribution"
}
```

### Prepare a Stoxes config

`POST /launch/sol/stoxes/prepare-config/{launch_id}`

Lands the per-token Stoxes config on Solana before an instant `Mev` launch. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Resumable: a repeat continues from the step where the previous call stopped, and once the config landed it answers `already_landed: true` without sending anything.

The dev wallet pays the config rent. Calling it again after the config landed is safe and answers `already_landed: true` with only `ok`, `config` and `already_landed`.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

- `ok` (boolean): `true` when the request succeeded.
- `config` (string): Stoxes config account.
- `damm_config` (string): Meteora DAMM config account.
- `token_decimals` (integer): Token decimals.
- `already_landed` (boolean): The config existed before this call.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 400 | `unsupported_chain` | `this endpoint is not supported for this chain` | The launch is not on Solana. The body adds `chain`. | Call this endpoint only for Solana launches. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `This launch is not a stoxes launch` | The launch was not created on Stoxes. | Call it only for launches created with `dex` set to `stoxes`. |
| 400 | `bad_request` | `An imported market already has its config` | The launch was imported: its market already has a config. | Skip this step for imported launches. |
| 404 | `not_found` | `No launch method saved` | No launch plan has been saved for this launch yet. | Save a plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |
| 422 | `unprocessable` | `stoxes compact launch lookup is not ready` | Stoxes is not accepting launches right now. | Retry later. |
| 422 | `unprocessable` | `the launch's config never finished` | The config did not finish, or Stoxes failed it. Other messages come from the same step, such as `the platform never read the config as finalized` or the platform's own failure reason. | Call this endpoint again: it resumes from the step that did not finish. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/sol/stoxes/prepare-config/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Example response

```json
{
  "ok": true,
  "config": "DkA5nngzxcYj2gDvnLfaYvURufYaB19AMV6QDASrecvT",
  "damm_config": "GoLaX2BGrP7x3TXMxahjvPfRTeKsMDVd3vMhQT7y3X3x",
  "token_decimals": 6,
  "already_landed": false
}
```

### Prepare a Lesgo config

`POST /launch/sol/lesgo/prepare-config/{launch_id}`

Lands the per-token Lesgo config on Solana before the launch. (Bearer JWT · deprecated)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Resumable: a repeat continues from the step where the previous call stopped, and once the config landed it answers `already_landed: true` without sending anything.

Lesgo launches are being withdrawn: recent API builds no longer serve this route or the other `/launch/sol/lesgo/*` routes.

Calling it again after the config landed is safe and answers `already_landed: true` with only `ok`, `config` and `already_landed`.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

- `ok` (boolean): `true` when the request succeeded.
- `config` (string): Lesgo config account.
- `damm_config` (string | null): Meteora DAMM config account.
- `pool` (string | null): Pool account.
- `token_decimals` (integer | null): Token decimals.
- `already_landed` (boolean): The config existed before this call.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 400 | `unsupported_chain` | `this endpoint is not supported for this chain` | The launch is not on Solana. The body adds `chain`. | Call this endpoint only for Solana launches. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `This launch is not a lesgo launch` | The launch was not created on Lesgo. | Call it only for launches created with `dex` set to `lesgo`. |
| 400 | `bad_request` | `An imported market already has its config` | The launch was imported: its market already has a config. | Skip this step for imported launches. |
| 404 | `not_found` | `No launch method saved` | No launch plan has been saved for this launch yet. | Save a plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |
| 422 | `unprocessable` | `the lesgo config transaction did not land` | The config transaction was sent but did not land. Other messages come from the same step, such as `the lesgo config could not be sent: <reason>`. | Call this endpoint again: it reads a config already on chain instead of creating a second one. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/sol/lesgo/prepare-config/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Example response

```json
{
  "ok": true,
  "config": "DkA5nngzxcYj2gDvnLfaYvURufYaB19AMV6QDASrecvT",
  "damm_config": "GoLaX2BGrP7x3TXMxahjvPfRTeKsMDVd3vMhQT7y3X3x",
  "pool": null,
  "token_decimals": 6,
  "already_landed": false
}
```

### Launch a token

`POST /launch/{launch_id}`

Deploys the token and runs the launch plan, streaming progress. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. A launch never deploys twice: a repeat is refused while it runs and once the token is deployed. After a dropped stream, read `launch_status` in [List the license's launches](/reference/licenses/#list-mints) and the deploy events in [List a launch's activity events](/reference/history/#list-launch-events) before launching again.

Send no body. On success the response is a server-sent event stream: each `data:` line carries a [Launch progress event](#object-launch-progress-event).

An `Allowlist` launch answers once with JSON `{"ok": true, "launch_method": "Allowlist"}` instead of a stream.

> When the metadata upload is unfinished or failed, the launch is refused with `code: media_not_ready` and a `media_state` of `pending` or `failed`; the SDK throws `MediaNotReadyError`.

> Script plans launch through the same path. See [Launch a script plan](/reference/launch-scripts/#launch-script-plan).

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

Streams Launch progress events, one `data:` line each.

- `step` (integer): Current step, starting at 1.
- `total` (integer): Number of steps.
- `ok` (boolean): `false` when this step failed.
- `message` (string): What the step did.
- `token_address` (string): Token address, once deployed.
- `bundle3_failed_mevs` (array<integer>): Indexes of front MEV wallets whose bundle failed.
- `bundle4_failed_temps` (array<integer>): Indexes of temporary holders whose bundle failed.
- `proxies_rescued` (integer): Proxy contracts emptied back to their owners.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 403 | `forbidden` | `admin role required: this launch's plan is a script` | The launch has a script plan and your session has no script access. EVM answers `admin role required`. | Launch script plans from an admin session, or save a regular plan with [Update the launch plan](/reference/launches/#update-launch-plan). |
| 409 | `conflict` | `Token is currently deploying` | A launch of this token is already running. | Do not launch again: follow the running launch in [List a launch's activity events](/reference/history/#list-launch-events). |
| 409 | `conflict` | `Funding not completed` | Solana: the wallets do not hold the plan's minimum funding. | Fund the wallets with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets) and launch once [Retrieve required funding](/reference/launch-funding/#get-required-funding) reports the funding in place. |
| 400 | `bad_request` | `token already launched` | EVM: the token is already deployed. | Do not launch again; read the launch with [Retrieve a launch](/reference/launches/#retrieve-launch). |
| 500 | `internal_error` | `Token already launched` | Solana: the token is already deployed. | Do not launch again; read the launch with [Retrieve a launch](/reference/launches/#retrieve-launch). |
| 500 | `internal_error` | `No launch method saved` | Solana: no launch plan has been saved for this launch yet. | Save a plan with [Update the launch plan](/reference/launches/#update-launch-plan) first. |
| 422 | `unprocessable` | `This platform owns its opening block: its launches are stagger or manual` | Solana: the plan's `launch_method` is `Mev` on a platform that does not support it. | Set `launch_method` to `Stagger` or `Manual` with [Update the launch plan](/reference/launches/#update-launch-plan). |
| 422 | `unprocessable` | `Stoxes block0 needs its config on chain first: POST /launch/sol/stoxes/prepare-config/{id}, then fund again` | Solana: an instant `Mev` Stoxes launch whose per-token config is not on chain yet. | Call [Prepare a Stoxes config](/reference/launch-execution/#prepare-stoxes-config), fund the wallets again with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets), then launch. |
| 422 | `unprocessable` | `Lesgo needs its config on chain first: POST /launch/sol/lesgo/prepare-config/{id}, then fund again` | Solana: a Lesgo launch whose per-token config is not on chain yet. | Call [Prepare a Lesgo config](/reference/launch-execution/#prepare-lesgo-config), fund the wallets again with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets), then launch. |
| 422 | `unprocessable` | `Wallet cannot spend: <wallets>. Its account was turned into a durable nonce or carries data, so its key is compromised; replace it` | Solana: a plan wallet's account was turned into a durable nonce or carries data, so it cannot send. The message lists each wallet with its role. | Replace the listed wallets in the plan with [Update the launch plan](/reference/launches/#update-launch-plan) and stop using their keys. |

#### Example request

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

#### Example response

```text
[
  {
    "step": 1,
    "total": 4,
    "ok": true,
    "message": "Uploading metadata"
  },
  {
    "step": 2,
    "total": 4,
    "ok": true,
    "message": "Token deployed",
    "token_address": "HtSTV4r6EZBnJfTQkWLf1ZbTC8UjUxL9evrE67EmuzyF"
  },
  {
    "step": 3,
    "total": 4,
    "ok": true,
    "message": "Dev buy confirmed"
  },
  {
    "step": 4,
    "total": 4,
    "ok": true,
    "message": "Launch complete"
  }
]
```

### Snipe a scheduled launch

`POST /snipe/{launch_id}`

Runs the buys of a scheduled launch whose token is already deployed, streaming progress. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. A snipe runs once: as soon as it starts, the launch leaves `Staged` and a repeat is refused. After a dropped stream, read `launch_status` in [List the license's launches](/reference/licenses/#list-mints) and the buys in [List a launch's activity events](/reference/history/#list-launch-events).

For launches saved with `scheduled_mode`. The bundle runs without the deploy and dev buy, which already happened. On Solana the snipe can also fire on its own after `auto_snipe_delay_ms`.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

Streams Launch progress events, one `data:` line each.

- `step` (integer): Current step, starting at 1.
- `total` (integer): Number of steps.
- `ok` (boolean): `false` when this step failed.
- `message` (string): What the step did.
- `token_address` (string): Token address, once deployed.
- `bundle3_failed_mevs` (array<integer>): Indexes of front MEV wallets whose bundle failed.
- `bundle4_failed_temps` (array<integer>): Indexes of temporary holders whose bundle failed.
- `proxies_rescued` (integer): Proxy contracts emptied back to their owners.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 500 | `internal_error` | `Cannot execute snipe on this current launch` | Solana: the launch is not a scheduled launch waiting to be sniped, for example because it was already sniped. | Snipe only a `scheduled_mode` launch whose `launch_status` in [List the license's launches](/reference/licenses/#list-mints) is `Staged`. |
| 400 | `bad_request` | `launch is not staged for snipe` | EVM: the launch is not a scheduled launch waiting to be sniped. | Snipe only a `scheduled_mode` launch whose `launch_status` in [List the license's launches](/reference/licenses/#list-mints) is `Staged`. |
| 400 | `bad_request` | `no holder wallets to snipe` | EVM: the plan has no holder wallet to buy with. | Add holders to the plan with [Update the launch plan](/reference/launches/#update-launch-plan). |
| 409 | `conflict` | `Token is currently deploying` | Solana: a launch or snipe of this token is already running. EVM answers `snipe already running`. | Do not snipe again: follow the running one in [List a launch's activity events](/reference/history/#list-launch-events). |
| 409 | `conflict` | `Subs funding not completed` | Solana: the holder wallets do not hold their minimum funding. EVM answers `Holder funding not completed`, or `Launch funding not completed` on a pons `Mev` launch. | Fund the wallets with [Fund the launch wallets](/reference/launch-execution/#fund-launch-wallets), then snipe. |
| 422 | `unprocessable` | `This launch's plan is a script: POST /launch/{ext_id} runs it` | Solana: the launch has a script plan, which snipes as part of its own run. | Run it with [Launch a script plan](/reference/launch-scripts/#launch-script-plan). |
| 422 | `unprocessable` | `an allowlist launch is never sniped: its curve admits only its own wallets` | Solana: allowlist launches are never sniped. | Follow the allowlist run with [Retrieve allowlist run status](/reference/allowlist/#get-allowlist-status) instead. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/snipe/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```text
[
  {
    "step": 1,
    "total": 2,
    "ok": true,
    "message": "Holder buys sent"
  },
  {
    "step": 2,
    "total": 2,
    "ok": true,
    "message": "Snipe complete"
  }
]
```

### Deploy from the X tracker

`POST /tracker/deploy/{chain_id}/{dex}`

Creates the token, saves its launch plan and launches it in one request. (Admin JWT · internal)

- Token: Upgraded session token of an account with admin rights.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. A repeat creates and launches a second token. If the stream dropped, look for the new launch in [List the license's launches](/reference/licenses/#list-mints) (the `created` stage carries its `launch_id`) before deploying again.

Used by the admin X tracker. The body is the [create-launch](/reference/launches/#create-launch) metadata plus a `plan` part. The response is an event stream once the upload is accepted: stage events report each phase and are interleaved with [Launch progress events](#object-launch-progress-event).

Stages: `created` (with `launch_id`), `planned`, `media`, `short` (some wallets lack funds; the stream ends) and `error` (with `message`).

> Every other metadata part of [Create a launch](/reference/launches/#create-launch) is sent the same way.

> A refusal before the stream starts answers JSON with a `message`.

#### Path parameters

- `chain_id` (enum, required): Chain to deploy on. The tracker uses `sol`. Possible values: `sol`, `eth`, `bsc`, `base`, `robinhood`, `monad`, `arc`, `xlayer`.
- `dex` (string, required): Launch platform ID in lowercase, for example `pumpfun`, `bonkfun`, `meteoradbc`, `fourmeme`, `flap` or `uniswapv2`.

#### Form fields

- `name` (string, required): Token name.
- `symbol` (string, required): Token ticker.
- `image` (file, required): Token image.
- `plan` (string, required): Launch plan as JSON, shaped like the body of [Update the launch plan](/reference/launches/#update-launch-plan).
- `tracker` (string, optional): `true`: the launch comes from the X tracker.
- `description` (string, optional): Token description.

#### Returns 200 OK

Streams stage events, then Launch progress events.

- `stage` (enum): Phase reported by a stage event. Possible values: `created`, `planned`, `media`, `short`, `error`.
- `launch_id` (integer | null): Public ID of the launch, on `created`, `short` and `error` (`null` when creation failed).
- `message` (string): Error text, on `error`.

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/tracker/deploy/sol/pumpfun" \
  -H "Authorization: Bearer $PROXIMA_JWT" \
  -F "name=<name>" \
  -F "symbol=<symbol>" \
  -F "image=@./image.png" \
  -F "plan=<plan>" \
  -F "tracker=<tracker>" \
  -F "description=<description>"
```

#### Example response

```text
[
  {
    "stage": "created",
    "launch_id": 101250846193377
  },
  {
    "stage": "planned"
  },
  {
    "stage": "media"
  },
  {
    "step": 1,
    "total": 3,
    "ok": true,
    "message": "Token deployed",
    "token_address": "HtSTV4r6EZBnJfTQkWLf1ZbTC8UjUxL9evrE67EmuzyF"
  }
]
```

### Resume a Streamflow airdrop

`POST /launch/streamflow/resume/{launch_id}`

Resumes the Streamflow airdrop of an `airdrop` MEV launch on Solana. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Safe to retry. Idempotent: wallets that already claimed are counted in `skipped` and receive nothing more.

Safe to call again: wallets already claimed are skipped. The SDK waits up to 120 seconds for the answer.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

- `ok` (boolean): `false` when at least one wallet failed to claim. The status is still 200.
- `distributor` (string): Streamflow distributor account.
- `claimed` (integer): Wallets claimed in this run.
- `skipped` (integer): Wallets skipped, already claimed.
- `failed` (integer): Wallets that failed to claim.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `streamflow resume not supported for this chain` | The launch is not on Solana. | Call this endpoint only for Solana `airdrop` launches. |
| 422 | `unprocessable` | `launch has no holders with a target supply` | Direct airdrop: no holder has a target supply. | Check the holders' planned amounts with [Retrieve a launch](/reference/launches/#retrieve-launch); there is nothing to resume. |
| 422 | `unprocessable` | `launch has no temp holders with a target supply` | Airdrop through temporary holders: no temporary holder has a target supply. | Check the temporary holders with [Retrieve a launch](/reference/launches/#retrieve-launch); there is nothing to resume. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/streamflow/resume/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "distributor": "ANMQCTKS1HJC1gwbMGo1r62E1PLwWCXBGgZzvKvQcZY",
  "claimed": 12,
  "skipped": 30,
  "failed": 0
}
```

### List MEV contracts

`GET /launch/get-mev-contract/{launch_id}`

Lists the MEV proxy contracts of an EVM launch with their balances. (Bearer JWT)

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

> EVM launches only. The app polls it every 5 seconds on BSC `Mev` launches.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

- `ok` (boolean): `true` when the request succeeded.
- `mev_contracts` (array<object>): Proxy contracts of the launch. Empty when it has none.
  - `address` (string): Proxy contract address.
  - `role` (enum): Wallet role the proxy serves. Possible values: `front_mev`, `temp_holder`.
  - `owner` (string): Wallet that owns the proxy.
  - `token_balance` (string): Token balance in base units.
  - `native_balance` (string): Native balance in wei.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `get-mev-contract not supported for sol` | The launch is on Solana, which has no MEV proxy contracts. | Call this endpoint only for EVM launches. |
| 400 | `bad_request` | `token not launched` | The token is not deployed yet, so it has no proxies. | Call it after the launch. |

#### Example request

```bash
curl "https://api-mig.proxima.tools/launch/get-mev-contract/101482937561204" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "mev_contracts": [
    {
      "address": "0x959dadb30ec13dd11052df859f2663f43eeab12a",
      "role": "front_mev",
      "owner": "0xab2b93519e1fbc3bfc0e79f066f6b11af5d97d9c",
      "token_balance": "18250000000000000000000000",
      "native_balance": "0"
    },
    {
      "address": "0xcce967904e6db57ae72838ba12b60ccc1f76081c",
      "role": "temp_holder",
      "owner": "0xda8984160efb2fc27e207d259da92f381b9ef2a4",
      "token_balance": "0",
      "native_balance": "1200000000000000"
    }
  ]
}
```

### Rescue MEV contracts

`POST /launch/rescue-mev-contract/{launch_id}`

Moves the tokens and native left in the MEV proxy contracts back to their owners. (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 only sends for proxies that still hold tokens or native, so value is never moved twice. Read what is left with [List MEV contracts](/reference/launch-execution/#list-mev-contracts).

Tokens that can be transferred freely are sent back; tokens still on a bonding curve are sold through the proxy, then the native is swept to the owner.

> EVM launches only.

#### Path parameters

- `launch_id` (string, required): Public ID of the launch.

#### Returns 200 OK

- `ok` (boolean): Always `true`. A proxy whose send failed is skipped, not reported.
- `rescued` (integer): Proxies whose tokens were sent back or sold.
- `rescued_native` (integer): Proxies whose native was swept to the dev wallet.
- `strategy` (enum): `direct_transfer` when the token transfers freely, `mev_sell_then_sweep` when it is still on a bonding curve. Possible values: `direct_transfer`, `mev_sell_then_sweep`.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a valid launch ID. | Pass the `launch_id` returned when the launch was created, as listed by [List the license's launches](/reference/licenses/#list-mints). |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to your license. | Check the ID, and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `rescue-mev-contract not supported for sol` | The launch is on Solana, which has no MEV proxy contracts. | Call this endpoint only for EVM launches. |
| 400 | `bad_request` | `token not launched` | The token is not deployed yet, so it has no proxies. | Call it after the launch. |
| 400 | `bad_request` | `no MEV or temp_holder wallets` | The launch has no MEV or temporary holder wallets. | Nothing to rescue: only launches with front MEV or temporary holder wallets have proxies. |

#### Example request

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

#### Example response

```json
{
  "ok": true,
  "rescued": 2,
  "rescued_native": 3,
  "strategy": "mev_sell_then_sweep"
}
```
