Back to Strategy Fields
Strategy Fields

Exit bid-ask spread filter

The Max bid-ask spread setting (the Exit bid-ask spread filter) sets a maximum allowed bid-ask spread for exit orders (closing a long or covering a short). If the current spread exceeds this cap when an exit is planned, the exit order is rejected to reduce the chance of fills in illiquid or very wide-spread conditions.

Choose the unit with the buttons: $ for a fixed amount in the symbol’s quote currency (for example 0.02 is 0.02 in that currency—often $0.02 on a USD-quoted stock), % for a percent cap (for example 0.5 means 0.5%), or Off to disable the filter. Only one unit is active on the strategy or subscription at a time.

Spread is evaluated from live bid and ask on the quote used for that exit. In dollar mode, TradersPost compares the absolute bid–ask width (|ask − bid|) against your configured maximum. In percent mode the live spread percentage is |ask − bid| / midpoint × 100, where midpoint is (ask + bid) / 2 when that value is non-zero; if the midpoint is zero, TradersPost uses the quote mark as the denominator when it is non-zero. This feature requires market data (quotes) from your broker; if the broker does not support quotes, the filter is not applied (exits are not blocked for spread).

The entry bid-ask spread filter is separate: see Entry bid-ask spread filter.

Webhook bidAskSpreadFilter and bidAskSpreadFilterPercent (exit)

For action: "exit" (and equivalent exit signals), the webhook may send bidAskSpreadFilter (dollar amount in the quote currency) to cap spread for that exit. Sending both bidAskSpreadFilter and bidAskSpreadFilterPercent in the same payload is rejected.

The effective exit cap is taken from the webhook when either:

  • The global Signal overrides is enabled on the strategy or subscription, or
  • Allow signal override next to the Max bid-ask spread control is enabled

When those conditions apply and the payload includes bidAskSpreadFilter, the dollar amount is the exit cap and the configured percent is ignored for that signal. When they apply and the payload includes bidAskSpreadFilterPercent instead, the percent is the exit cap and the configured dollar amount is ignored. When they apply but the payload omits both keys, the configured Max bid-ask spread on the strategy or subscription is used (whichever mode is selected there).

If neither the global Signal overrides nor Allow signal override next to the Max bid-ask spread control is enabled, both keys in the webhook are ignored for exit planning and only the strategy or subscription’s configured exit spread filter applies.

Example webhook payloads

Exit using only the configured exit spread filter:

{
    "ticker": "AAPL",
    "action": "exit"
}

Exit with a per-signal cap in dollars (requires the global Signal overrides and/or Allow signal override next to the Max bid-ask spread control as above):

{
    "ticker": "AAPL",
    "action": "exit",
    "bidAskSpreadFilter": 0.02
}

Exit with a per-signal cap as a percent:

{
    "ticker": "AAPL",
    "action": "exit",
    "bidAskSpreadFilterPercent": 0.5
}

Ready to put Exit bid-ask spread filter to work?

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.