Join us live for TradersPost Tutor Sessions today at 1pm EST. Join us to learn, ask questions, and level up your automation game. Watch on YouTube
Webhook Message

Invalid Sentiment

The provided sentiment value is invalid. The sentiment field must be one of the following values: bullish, bearish, or flat.

This message indicates that an invalid sentiment was provided in the request. TradersPost requires that the sentiment parameter be specified as one of the following values: bullish, bearish, or flat. For compatibility with TradingView, the values long, short or flat are also accepted as synonyms for bullish, bearish and flat respectively. However, it is recommended to use the standard values when you are not using TradingView.

Any other value will be considered invalid and the request will not be processed.

Here is an example using the {{strategy.market_position}} variable from TradingView to populate the sentiment field.

{
    "ticker": "{{ticker}}",
    "action": "{{strategy.order.action}}",
    "sentiment": "{{strategy.market_position}}",
}

The variables above are placeholders for the TradingView strategy's order action and market position. The webhook alert message will be replaced by TradingView with the actual values when the alert is triggered:

{
    "ticker": "AAPL",
    "action": "buy",
    "sentiment": "long",
}

Read more about TradingView alert variable values.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

Start now