Articles on: Signals and Automation

Webhook Signals: Testing and Errors


How to test

There are two useful ways to test the webhook signals and code.


  1. In the JSON code, use "test": true to send the signal as a test signal. This will create Pending orders in Altrady that can be checked. Otherwise, live orders will be created.


Note: "test":true ONLY works for Open signals. It will be ignored for other signal types and a live order will be sent.


  1. Test using a paper trading account.
  2. Test the syntax in Swagger:
  • First, exclude any Trading View special names e.g. {{price}}, {{time}}. These can be replaced with appropriate fixed values, e.g 123.45 and "2024-08-31 03:00:00", respectively. If used, the value of the Signal ID must be unique in every signal, including for test signals in Swagger.
  • Paste
  • Use "test": true while testing. If this is not used, the signal will be sent to the bot and potentially a position will be opened/closed etc.
  • Try it now
    See below for error messages when testing in Swagger or sending live signals



Error messages in Swagger and Runtime errors

Successful Result: Response Code = 201 (200, 202, 203, 204 etc)
A 20x response code means the syntax was correct, the bot was found, the secret matched, exchange and symbol matched bot and the signal was received.
Some types of signals do not return a Response Body, e.g. Close, Start, Stop and Increase signals.


The Response Body includes success and error messages. Response Code is 20x if successful.


Most error messages are self-explanatory.
  • Check the Signal Bot Settings and JSON code articles for details of how to specific values.
  • The exception is the first one listed in the table below, which is always the result of a syntax error in the JSON code. Check carefully and make sure if matches our documentation.
  • Incorrect setting names for optional settings are ignored, instead of resulting in an error. E.g. "adjustfee": false does not result in an error and is instead defaulted to "adjust_fee": true.


Error Message

Meaning

message body does not match declared formatResolution: when specifying application/json as content-type, you must pass valid application/json in the request's 'body'

Syntax error in the JSON. Double check commas, brackets, braces, double quotes, etc. This error can also occur if the code was created or edited in a non-text editor.

Signal bot not found

Invalid API key

Invalid secret

API Key is valid and found, but API secret is incorrect

Market not found

The value for market does not match any market. Recheck the format for the market or use Altrady's default format "EXCH_QUOTE_BASE", e.g. "KUCN_USDT_BTC"

Exchange missing

Either exchange was not specified, or the value was not valid.

side is missing

"side": "long" or "side": "short" is required for this signal action

order_type is missing

"order_type": "limit" or "order_type": "market" is required for this signal action

price is missing

the setting for "price" is required for this signal action, but is missing. When a Limit order is specified for a Close signal, the signal_price setting must be included

signal_price is invalid, price is missing

This is a double whammy. "signal_price" should not be used for this signal type. And "price" is required but missing.

price is invalid, price must be greater than zero

The value for the "price" setting is zero, or non-numeric.

404: Not Found

There were no syntax errors. For a Close signal, this means that no positions were found to Close.


Checking the signal

The signal **sent **by Trading view can be seen in the TV Alert Log.
The signal details in Altrady can be viewed on the Overview, Positions and Error Log pages of the Signal Bot, by clicking on the i next to the market name.



Signal Bot Error Log

The SIgnal Bot error log lists errors that occur after the signal is successfully received, but the signal is not actioned.
Common warnings and errors are described here: Signal Bot Processing, FAQ and Error Log messages


Updated on: 23/06/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!