ProFunding Docs

Find the Exit

Peak-exit automation. Slices your position out only at favorable moments, and gets you flat before funding turns against you.

What it does

Find the Exit is a server-side job that watches an open delta-neutral position and closes it in slices, but only when the moment is good. Instead of dumping the whole position at whatever the book offers, it waits for price-PnL to approach the best level it has seen, takes a profitable bite, and repeats until you're flat.

Two promises:

  1. It's patient when it can be. Slices fire only near the historical peak of your exit quality, not on a fixed clock.
  2. It's decisive when it must be. If the next funding tick would start charging you and it's seconds away, the remainder force-closes at market. You never drift into paying funding because the algorithm was holding out for a better price.

How the gate works

Every few seconds the job snapshots your remaining position and both legs' live orderbooks, then asks: is closing right now close enough to the best moment I've seen?

  • It tracks the best per-unit exit PnL observed since the job started
  • A slice fires only when the current moment reaches a required fraction of that peak
  • The required fraction starts strict and relaxes as your deadline approaches: picky for most of the window, then ramping down sharply near the end. The same way a human trades it: "I have time, I'm picky… now I really need to be out."

The deadline is whichever comes first: your configured max wait, or the next funding tick that would charge you (with a safety buffer).

Slice sizing

Each slice is the largest size that stays profitable after slippage on both legs, checked against the live orderbooks and each venue's minimum order size. Thin books produce smaller, more frequent slices; deep books let it exit faster. A slice that can't clear the profitability bar is skipped, and the job waits for the next poll.

Starting a job

  • From the position card. Open the close options and pick Find the Exit. A preview shows the algorithm's current reasoning (the target, the peak it's tracking, and the deadline) before you commit. Set your max wait and start.
  • From MCP. find_exit_previewfind_exit_start, then find_exit_status / find_exit_cancel. See the tools reference.
  • From Telegram. Running jobs show under /orders; cancel with /cancel. See Telegram.

The decision log

Every poll's decision is recorded and rendered in the position card's operation panel: slices fired (with sizes and prices, dollar-first) and skips (with the reason: below target, book too thin, waiting). Long-running jobs stay collapsed with a one-line summary and a cancel button in the header, so they don't take over the page.

Safety

  • One job per pair. Enforced at the database level; you can't accidentally start two.
  • External-close detection. If you (or Guard) close the position some other way, the job notices and completes instead of fighting you.
  • Restart-proof. Jobs resume after a backend restart with a live-position integrity check; fills are committed as they happen.
  • Plays nice with Guard. If a Guard auto-close (TP/SL/funding flip) fires on the same pair, it cancels the find-exit job before closing.
  • Keeps you posted. Soft Telegram pings at 4 and 12 hours elapsed if the job is still working.

Find the Exit needs stored credentials for both legs, since it runs server-side. See Credentials.

FAQ

How does Find the Exit decide when to close a slice?

Every few seconds it snapshots the remaining position and both legs' live orderbooks and checks whether the current exit quality is close enough to the best it has seen since the job started. The required fraction of that peak starts strict and relaxes as the deadline approaches.

What stops Find the Exit from missing the funding tick?

The deadline is whichever comes first: your configured max wait, or the next funding tick that would charge you, with a safety buffer. If the next tick is seconds away, the remaining position force-closes at market so you never drift into paying funding.

How is each slice sized?

Each slice is the largest size that stays profitable after slippage on both legs, checked against live orderbooks and each venue's minimum order size. A slice that can't clear the profitability bar is skipped and the job waits for the next poll.

Does Find the Exit require stored credentials?

Yes, for both legs, since the job runs server-side.

What happens if I close the position manually while Find the Exit is running?

External-close detection notices and the job completes instead of fighting you; if a Guard auto-close fires on the same pair, it cancels the find-exit job before closing.

On this page