Back to Webhook Messages
Webhook Messages

Invalid Formula Runtime

A formula could not be evaluated. Check for division by zero, incompatible types, invalid math function arguments, or an unsupported integer passed to round() as a rounding mode (use rounding.* names or integers 1–8). See invalid-formula-runtime in the reference manual.

The formula parsed successfully but failed during evaluation. Common causes:

  • Division by zero (or an operation that PHP rejects for the types involved).
  • Type mismatches for an operator (for example invalid use of arithmetic on non-numeric values after coercion).
  • Invalid math function arguments — wrong count or type passed to abs, ceil, floor, max, min, or round.
  • Unsupported rounding mode integer — the third argument to round() must be a rounding.* property or an integer from 1 to 8. Other integers (for example 99) are rejected.

Runtime failures occur after references resolve; if a field name is wrong, you may get invalid formula reference instead.

Typical error details (webhook log)

The formula in field limitPrice failed to evaluate. Check for issues like division by zero or incompatible types.

The formula in field x calls abs() with an invalid value. Expected a number, but got a string.

The formula in field x passes 99 as a rounding mode to round(), which is not supported. Use a rounding.* name (for example rounding.halfEven) or an integer from 1 to 8.

Incorrect (division by zero)

{
  "ticker": "SPY",
  "action": "buy",
  "qty": "0",
  "x": "=1 / signal.qty"
}

Fix — guard with a conditional or send a non-zero literal

{
  "ticker": "SPY",
  "action": "buy",
  "qty": "10",
  "x": "=1 / signal.qty"
}

Or use a ternary (for example default to 0 when signal.qty == 0) so the divisor is never zero.

Incorrect (invalid rounding mode integer)

{
  "ticker": "SPY",
  "action": "buy",
  "x": "=round(2.5, 0, 99)"
}

Use a named mode:

{
  "ticker": "SPY",
  "action": "buy",
  "value": "2.5",
  "x": "=round(signal.value, 0, rounding.halfEven)"
}

Incorrect (incompatible types for the operation)

Ensure numeric strings are valid numbers (commas in numbers are stripped the same way as elsewhere in signal parsing). Boolean coercion recognizes true / false string literals.

Adjust the expression or the payload values, then resend the webhook. See invalid formula syntax for allowed functions and invalid formula reference for rounding mode names.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

TradersPost operates as a non-custodial automated trading platform, enabling users to connect alerts from their preferred trading platforms to their selected brokerage or exchange accounts. It abstains from the transmission, custody, or management of customer funds, covering both traditional and cryptocurrency assets. Typically, registration requirements set by regulatory entities such as the SEC, FINRA, or FinCEN apply to entities that hold or transmit customer funds. To ensure ongoing compliance, TradersPost regularly engages with regulatory authorities to confirm its adherence to all relevant local and federal laws.

TradersPost does not provide alerts, signals, research, analysis, or trading advice of any kind. It is designed to assist traders and investors in making their own trading decisions based on their alerts. The platform does not offer recommendations regarding securities to buy or sell, nor does it provide trading or investing advice. The platform and its features, capabilities, and tools are provided 'as-is' without any warranty.

Risk Disclosure: The use of automated trading systems involves inherent risks, including the potential for significant financial loss. These systems operate based on predetermined algorithms that may not fully adapt to changing market conditions, possibly making them unsuitable for some investors. Individuals are advised to thoroughly assess their financial situation and risk tolerance before using this platform.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

© 2026 TradersPost, Inc. All rights reserved.