Back to Webhook Messages
Webhook Messages

Invalid Take Profit Value Required

The take profit configuration is invalid. A relative (amount or percent), absolute (limitPrice), or portfolio PnL (pnlAmount) take profit value is required.

This message indicates that the take profit value provided in the request is invalid because a relative (percent or amount), absolute (limitPrice), or portfolio PnL (pnlAmount) take profit value is required. TradersPost requires that one of these parameters be specified. Without a value for any of these modes, the request will not be processed.

This error fires only when takeProfit is present but null or empty (for example {}).

Invalid take profit example where no valid take profit value is provided:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "takeProfit": {}
}

Valid relative takeProfit.percent example:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "takeProfit": {
        "percent": "5"
    }
}

Valid relative takeProfit.amount example:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "takeProfit": {
        "amount": "5"
    }
}

Valid absolute takeProfit.limitPrice example:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "takeProfit": {
        "limitPrice": "105"
    }
}

Valid portfolio PnL takeProfit.pnlAmount example (dollar profit target; TradersPost converts it using entry quantity calculated before the order is sent to the broker and the symbol's point value - for futures, dollar value per price point from the quote; for options, the contract multiplier (100 per contract for standard equity options)):

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "takeProfit": {
        "pnlAmount": 100
    }
}

In the above examples, a valid take profit order uses one of these modes: relative, absolute, or PnL - not several at once. Combining pnlAmount with percent, amount, or limitPrice returns an error that takeProfit.pnlAmount cannot be combined with those fields.

Ready to put Invalid Take Profit Value Required 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.