Sending Trading Signals
Documentation for creating and formatting Verified Trading Bot trade notifications on the Compendium application.
How To Obtain An API Key
To link your trading strategy with Compendium, head back to the admin page of your Verified Trading Bot. Scroll down until you see the "View This Bot's Alert API Key" section, then click the "View My Bot API Key" button. This will reveal your private API key, which you can then input into the Compendium WebHook.
It's crucial to keep your API key confidential as it's used to identify calls. Sharing your API key can result in unauthorized signals being sent and potentially compromise the security of your group. If you suspect that your API key has been compromised, we recommend clicking the "Reroll API Key" button. Don't forget to update the API key in your webhooks to ensure that your strategy continues to post trades successfully.
Formatting WebHook Signals
Now that you have your API key it is time to learn how signals can be sent!
All signals should be sent to the following webhook URL as POST. If you are using TradingView it will automatically format webhook + JSON in the correct method.
Understanding JSON Formatting
You can learn more about specific JSON formatting at the link below.
Posting Webhooks From TradingView
Please follow TradingView's internal documentation for educational resources on posting Webhook orders from their system.
Webhook URL
The webhook URL for our verified trading bots router is different from our regular Signal Provider webhook. The webhook information is available on request through your designated representative channel in our official discord server.
A "success" return from the provided Webhook means that the URL was successfully pinged in your workflow. It does not mean that the signal
or orderchain
was formatted correctly and still may result in a trade post error.
Webhook JSON Format
The above JSON example shows a single signal in the orderchain
array. Please read the next section to understand how to fully utilize this new integration.
Understanding the orderchain
Array
orderchain
ArrayOur new signal system requires signal commands to be sent in the orderchain
array, even if you are only sending a single command. We can now offer supremely advanced capabilities by offering the capability to chain orders together. We have provided some simple examples below.
The orderchain
array has a capacity of accommodating a maximum of 5 signal types in a stacked manner and mandates the presence of at least one signal type to effectively transmit a trade notification signal. It is imperative to acknowledge that the execution of Orderchain commands is dependent on the sequence of WebHook post in which they are transmitted, thus dictating their placement order.
Single Signal Post Example
The following example shows the user sending a single signal in the orderchain
array to close all open positions.
Sending Multiple Signals At Once
The following example shows the user sending multiple signals in the orderchain
array. This specific example shows the user closing all open positions and then opening a new trade. This code snippet should be helpful if your trading strategy is always in a trade and needs to flip sides from "short" to "long" or vice-versa.
All Available Signal Parameters
All parameters should be sent as a "string" from your POST API call. This is to simplify connections from platforms like TradingView while normalizing our structure. It is also important to note that if you are passing a number, it should be treated as an integer
within the "string".
signal
String
ALWAYS REQUIRED - See valid values below
orderId
String
Required if signal
= cancel
orderType
String
Required if signal
= place. See valid values below
symbol
String
Required if signal
parameter requires.
marketType
String
Optional - if signal
is cancel
type, the orders canceled will be of marketType
.
side
String
Required if signal
= place
risk
String
Required if signal
= place
price
String
Required if orderType
requires it (eg limit)
mode
String
Optional - default value = cross
reduceOnly
String
Optional - default is false
postOnly
String
Optional - default value is false
ioc
String
Optional - default = false
fok
String
Optional - default = false
tpTrigger
String
Optional
tpPrice
String
Required if tpTrigger
submitted and tpOrderType
= limit
tpType
String
Optional - default = last
tpOrderType
String
Required if tpTrigger
submitted
slTrigger
String
Optional
slPrice
String
Required if slTrigger
submitted and slOrderType
= limit
slType
String
Optional - default = last
slOrderType
String
Required if slTrigger
submitted
Understanding Each Parameter
The following breakdown includes JSON Type, Required Conditions, & Valid Values for all available signal
parameters.
Last updated