- API Reference
- Guides
Sell Automatically
Arm an auto-sell on a launch, check that it runs, change its rules and turn it off. Auto-buy works the same way.
An auto-sell session sells the launch’s token from its wallets, following rules you set, until its time or its budget runs out. This guide arms one, checks that it runs, changes it and turns it off. It follows what the web app’s auto-trade window sends. Auto-buy uses the same calls with its own paths.
You need:
- an upgraded session token in
$PROXIMA_JWT(Quickstart); - a Solana launch, here
101250846193377. It can be a draft (step 3 plans the session) or a token that is already live (step 3 runs it).
Token amounts are integer strings in base units (6 decimals for pump.fun). Market caps are in micro-USD, slippage in
basis points. delay is in milliseconds; time and start_delay are in seconds.
1. Read the current state
Get auto-sell status tells you what exists already.
curl https://api-mig.proxima.tools/launch/autosell/status/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT"{ "status": "None" }status | Meaning | What to do |
|---|---|---|
None | No session. | Arm one (steps 2 and 3). |
Planned | Saved, starts with the launch. | Change it with step 5, or discard it. |
Running, Paused | Live. | Change it with step 5. Plan and run answer 409 Task already running. |
Completed, Cancelled, Failed | Ended. | Arm a new one. Failed carries info.status_reason. |
Keep: status.
2. Write the rules
A session combines up to three modes in modes:
| Mode | Sells | Main fields |
|---|---|---|
TimedExactIn | A random amount between min_amount and max_amount every delay milliseconds | Up to 5 layers, each with optional min_mcap, max_mcap and end_condition |
McapLadder | sell_amount once the market cap reaches each target_mcap | Targets in strictly increasing order |
SwapBack | A share (replication_factor, in basis points) of each buy made by someone else | trigger_condition, min_token_per_swap, optional whitelist, up to 5 layers |
The session-level fields apply to every mode:
end_condition.timestops the session after that many seconds.0means the 30-day maximum.end_condition.amountstops it once that many tokens are sold."0"means no cap.slippageis in basis points.start_delaywaits that many seconds before the first sell.wallet_pubkeyslimits selling to some of the launch’s wallets.nulluses them all.
The app also refuses a time longer than max_autosell_session_duration from
GET /get-constants. This body sells 1.5M to 4M tokens every 45 seconds above a $120,000
market cap, plus 20M tokens at $150,000 and 40M at $300,000:
cat > autosell.json <<'EOF'{ "modes": [ { "TimedExactIn": { "layers": [ { "min_amount": "1500000000000", "max_amount": "4000000000000", "delay": 45000, "min_mcap": 120000000000, "end_condition": { "amount": "60000000000000", "time": 21600 } } ] } }, { "McapLadder": [ { "target_mcap": 150000000000, "sell_amount": "20000000000000" }, { "target_mcap": 300000000000, "sell_amount": "40000000000000" } ] } ], "end_condition": { "time": 0, "amount": "0" }, "slippage": 1500, "start_delay": 300, "wallet_pubkeys": null}EOFKeep: autosell.json. Later calls send the whole body again.
3. Arm it
Before the launch, plan the session. It is saved as Planned and starts when
Launch runs, before the deploy. Sending the plan again replaces it, so a
timed-out call can be repeated.
curl -X POST https://api-mig.proxima.tools/launch/autosell/plan/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT" \ -H "Content-Type: application/json" \ -d @autosell.json{ "ok": true, "message": "Successfully planned auto selling task" }On a token that is already live, run the session instead. It starts at once,
after start_delay if you set one, and is refused with Token not launched on a draft.
curl -X POST https://api-mig.proxima.tools/launch/autosell/run/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT" \ -H "Content-Type: application/json" \ -d @autosell.json{ "ok": true, "message": "Successfully started auto selling task" }Keep: nothing new. There is no session id: every call addresses the session by its launch id.
4. Check that it is armed
Read Get auto-sell status again. A planned session reads Planned
until the launch, then Running. If it could not start with the launch, it reads Failed and
info.status_reason says why. The app polls this every 5 seconds.
{ "status": "Running", "info": { "params": { "…": "the rules you sent" }, "started_at": 1793671512, "ended_at": null, "status_reason": null, "auto_sell_token_sold": 26500000000000, "auto_sell_native_profit": 2875000000, "auto_sell_usd_profit": 539060000, "modes": [ { "id": "timed", "layers": [{ "id": "as_4217_l0", "state": "Active", "token_sold": 6500000000000, "sol_spent": 655000000 }] }, { "id": "mcap_ladder", "layers": [ { "id": "as_4217_0", "state": "Exhausted", "token_sold": 20000000000000, "sol_spent": 2220000000 }, { "id": "as_4217_1", "state": "Active", "token_sold": 0, "sol_spent": 0 } ] } ] }}modes[].id is timed, mcap_ladder or replication. Each layer is Active, Paused or Exhausted. The
number inside a layer id is internal and differs from the launch id, so copy layer ids from here rather than
building them. modes stays empty until the session runs.
Keep: the layer ids you may want to pause or cancel.
5. Change it
Update auto-sell replaces the rules of a Planned, Running or Paused
session. Send the full body, not only the fields that change. On a live session, layers whose ids are still present
keep what they already sold.
curl -X POST https://api-mig.proxima.tools/launch/autosell/update/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT" \ -H "Content-Type: application/json" \ -d @autosell.json{ "ok": true, "message": "Auto sell params updated", "wallet_set_unchanged": false, "wallets_added": 0 }Keep: the body you sent. The next update starts from it.
To stop selling for a while without changing the rules, pause and
resume. With no body, they act on the whole session. With
{ "mode": "timed" }, on one mode. With { "layer_id": "as_4217_l0" }, on one layer. Pause needs a Running
session. Some launches run on an engine that only pauses whole sessions; there, mode and layer_id answer 422.
curl -X POST https://api-mig.proxima.tools/launch/autosell/pause/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT" \ -H "Content-Type: application/json" \ -d '{ "mode": "timed" }'{ "ok": true, "message": "Mode timed paused" }6. Turn it off
Cancel auto-sell with no body ends the whole session, whatever its
status, and sets it to Cancelled. Repeating it does no harm. With mode or layer_id, it removes only that part,
and the session must be Running or Paused.
curl -X POST https://api-mig.proxima.tools/launch/autosell/cancel/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT"{ "ok": true, "message": "Auto sell task successfully cancelled" }Discard auto-sell sets the status back to None, to drop a planned session
or clear an ended one. It is refused with 409 Cannot discard running session while the session is Running or
Paused: cancel it first.
curl -X POST https://api-mig.proxima.tools/launch/autosell/discard/101250846193377 \ -H "Authorization: Bearer $PROXIMA_JWT"Auto-buy
Auto-buy buys the token from the launch’s wallets. It has the same eight endpoints under
/launch/autobuy/ (plan, run, update, status, pause, resume, cancel, discard), the same statuses and the same
rules for retrying. A planned auto-buy also starts with the launch. The body differs in a few places:
| Auto-sell | Auto-buy | |
|---|---|---|
| Amounts | Tokens to sell | Quote currency to spend (lamports for SOL) |
SwapBack minimum | min_token_per_swap | min_sol_per_swap |
McapLadder step | sell_amount, targets increasing | buy_amount, targets decreasing |
| Layer ids | as_… | ab_… |
| Totals in the status | auto_sell_token_sold, auto_sell_native_profit, auto_sell_usd_profit | auto_buy_token_bought, auto_buy_native_spent, auto_buy_usd_spent |
Next steps
- Auto-sell reference: every field of the three modes.
- Launch a token: plan the session between saving the plan and launching.
- WebSocket channels: runner results pushed as they happen.
- Follow a launch in real time: watch balances and PnL move while the session sells.