Trigger Overrides

Learn how to override specific values in a trigger.

By default, when a trigger is executed, it uses the values defined when the trigger was created. However, you can override certain values during execution to adjust behavior without modifying the trigger itself.

Important:

please check spelling and the expected types for values you are adding,

  • bool = true or false

  • string = "string"

  • float = 1.0

  • int = 1

Important:

Any value not passed as an override will default to the value set by the trigger. If an incorrect name is used, the default value will also be applied if it is not recognized.

What you can't override:

  • Trigger ID (string, required): This is the unique identifier of the trigger you want to execute. You must provide this in the request to identify which trigger to execute.

What you can override for Futures:

  • trigger_quantity_value (float): This allows you to override the quantity value of the trigger. For example, you can set it to 50.0 if you want to execute the trigger with a different quantity than originally configured.This works with trigger_quantity_type

  • trigger_quantity_type (string): You can override the type of quantity the trigger uses (e.g., "dollar" or "asset" or "percentage"), allowing you to specify how the trigger_quantity_value is measured.

  • trigger_order_type (string): This override lets you change the order type (e.g., "market" or "limit") for the execution. Use this if you want to switch from a market order to a limit order or vice versa, keep in mind when passing limit you need to add trigger_limit_price.

  • trigger_limit_price (float): For limit orders, you can specify a different price by overriding the limit price. For example, you might set this to 60000.0 to indicate the price at which the order should be executed, when using limit price you need to add trigger_order_type as limit.

  • trigger_leverage_type (string): When working with futures triggers, you can override the leverage type (e.g., "isolated" or "cross") to change how leverage is applied during execution,keep in mind if exchange has limitation on switching leverage type if there is an open position.

  • trigger_leverage_value (int): You can adjust the leverage value for futures triggers. For example, you might set this to 5 to apply 5x leverage.

  • trigger_tp_type (string): This allows you to override the take profit type. For example, you might specify percentage or dollar or price.

  • trigger_tp_value (float): You can override the take profit value itself. For example, you could set this to 10.0 to trigger a take profit when the price reaches 10% above the entry price if trigger_tp_type is set to percentage.

  • trigger_sl_type (string): Similar to take profit, you can override the stop loss type. This could be percentage or dollar or price, depending on how you want the stop loss to be calculated.

  • trigger_sl_value (float): You can override the stop loss value, setting it to a specific percentage or value that determines when the stop loss should be triggered.

  • trigger_opposite_close (boolean): This flag allows you close opposite position before placing new one.

What you can override for Spot:

  • trigger_quantity_value (float): This allows you to override the quantity value of the trigger. For example, you can set it to 50.0 if you want to execute the trigger with a different quantity than originally configured.This works with trigger_quantity_type

  • trigger_quantity_type (string): You can override the type of quantity the trigger uses (e.g., "dollar" or "asset" or "percentage"), allowing you to specify how the trigger_quantity_value is measured.

  • trigger_order_type (string): This override lets you change the order type (e.g., "market" or "limit") for the execution. Use this if you want to switch from a market order to a limit order or vice versa, keep in mind when passing limit you need to add trigger_limit_price.

  • trigger_limit_price (float): For limit orders, you can specify a different price by overriding the limit price. For example, you might set this to 60000.0 to indicate the price at which the order should be executed, when using limit price you need to add trigger_order_type as limit.

Extra's:

Important:

This is Not Available on Binance.

  • trigger_cancel_unfilled (bool): This will cancel all Limit orders on specific symbol. This can be added to futures and spot and to both entry and closing triggers.
  • trigger_pyramiding (bool): Defailt value 'true'. If set to 'false' then it won't open a new same side direction. Example If you have a "Long" position and you trigger another "Long" position with trigger_pyramiding set to "false" it will ignore the new order.

Example of trigger_cancel_unfilled:

{"trigger_id":"your_trigger_id","trigger_cancel_unfilled":true}

Example of trigger_pyramiding:

{"trigger_id":"your_trigger_id","trigger_pyramiding":false}

Webhook URL for Executing a Trigger

https://api.crodltrading.com/v1/trigger-id

Example of just a trigger:

{"trigger_id":"625ad8240264479689947a722e36a79a"}

Example of override trigger:

{"trigger_id":"625ad8240264479689947a722e36a79a","trigger_quantity_value":30}

Template to copy for futures

{
  "trigger_id": "625ad8240264479689947a722e36a79a",
  "trigger_quantity_value": 30,
  "trigger_quantity_type": "percentage",
  "trigger_order_type": "market",
  "trigger_leverage_type": "isolated",
  "trigger_leverage_value": 3,
  "trigger_tp_type": "percentage",
  "trigger_tp_value": 1,
  "trigger_sl_type": "percentage",
  "trigger_sl_value": 1,
  "trigger_opposite_close": false
}

Template to copy for spot

{
  "trigger_id": "625ad8240264479689947a722e36a79a",
  "trigger_quantity_value": 30,
  "trigger_quantity_type": "dollar",
  "trigger_order_type": "limit",
  "trigger_limit_price": 50000
}