Webhook Message

Invalid Take Profit Value Required

Invalid take profit value. You are required to have a relative or absolute take profit.

This message indicates that the take profit value provided in the request is invalid because either a relative or absolute take profit value is required. TradersPost requires that one of these parameters be specified to define the take profit. Without a value for either parameter, the request will not be processed.

Invalid take profit value example where neither a relative or absolute take profit value is provided:

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

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"
    }
}

In the above examples, a valid take profit order includes either a relative or absolute take profit, ensuring clear and precise instructions for the take profit mechanism.

Ready to automate your trading? Sign up for free today.