CrossTrade Docs
CrossTrade.io
  • Welcome!
    • Set Up Guide
  • Getting Started
    • Installation
    • User Dashboard
      • XT Control Panel
      • Command Tester
      • Command Builder
    • Alert History
    • TradingView Alerts
      • Dynamic Variables
      • XT Alert Builder
      • Example Indicators
      • Example Strategies
    • VPS Connection Guide
  • Webhooks
    • Overview
    • Commands
      • Place Order
      • Flat Place Order
      • Close Position
      • Reverse
      • Reverse Position
      • Flatten Positions
      • Flatten Everything
      • Cancel Order
      • Cancel Orders
      • Cancel All Orders
      • Cancel Replace
      • Change Order
      • Close Strategy
    • Advanced Options
      • Multi-Account Placement
      • Flatten First
      • Require Market Position
      • Max Positions
      • Bracket Orders
      • Percentage and Tick Prices
      • Limit Order Timeouts
      • Trading Window
      • Bypass Trade Windows
      • Delay Timer
      • Rate-Limiting
      • Alert Commenting
      • Kill Switch
      • Notes
    • Examples & Use Cases
    • Troubleshooting
  • Account Manager
    • Overview
      • How It Works
      • Dashboard
      • Global Settings
      • Frequently Asked Questions (FAQ)
    • Monitors
      • Profit/Loss Thresholds
      • Minimum Profit Drawdown
      • Trailing Drawdown
      • Advanced Usage
    • Account Settings
      • Auto-Flattening
      • Trading Windows
    • Management Logs
  • NinjaTrader
    • ATM Strategies
      • Creating ATM Template
    • Optimizing NinjaTrader Performance
    • Enabling Multi-Provider Mode
  • CrossTrade API
    • Overview
    • Authentication
    • Rate Limiting
    • Webhook Trading
    • Accounts
      • GET Accounts Summary
      • GET Accounts
      • GET Account
    • Positions
      • GET Positions
      • GET Position
      • POST Close Position
      • POST Reverse
      • POST Reverse Position
      • POST Flatten Positions
      • POST Flatten Everything
    • Orders
      • GET Orders
      • GET Order
      • GET Order Status
      • POST Cancel Order
      • POST Cancel Orders
      • POST Cancel All Orders
      • POST Place Order
      • POST Flat Place Order
      • POST Replace Order
      • PUT Change Order
    • Strategies
      • GET Strategies
      • GET Strategy
      • POST Close Strategy
    • Executions
      • GET Executions
      • GET Execution
    • Quotes
      • GET Quote
  • Changelog
    • XT Versions
    • All Updates
  • Affiliate Program
    • Media Kit
  • Social Links
    • Discord
    • TradingView
    • YouTube
    • X (Twitter)
    • Instagram
    • Facebook
    • Reddit
    • Website
    • Blog
Powered by GitBook
On this page
  • Valid Values
  • Example Payload
  1. Webhooks
  2. Advanced Options

Delay Timer

PreviousBypass Trade WindowsNextRate-Limiting

Last updated 1 month ago

A delay timer can be set on any individual alert message. This can be useful if multiple commands are being sent in rapid succession but you want to offset one or more of the commands to allow time for processing.

For example, if you have have a custom alert situation where both a CLOSEPOSITION and a PLACE alert are being sent roughly at the same time and you want to avoid a race condition, you can inject a delay before the PLACE order command gets executed. This will provide sufficient time for the CLOSEPOSITION command to execute before PLACE.

The delay timer is evaluated first, prior to any other action or field. However, if you are using to send an order to multiple accounts, CrossTrade creates a cloned request for each account in the comma-separated list. All fields in the alert message are cloned, including the delay timer. This implies that the delay will precede each individual request.

Valid Values

The delay timers can be any floating-point number of seconds with a maximum delay of 300 seconds (5 minutes).

delay=1; (1 second delay)

delay=3.5; (3.5 second delay)

delay=6.78; (6.78 second delay)

delay=60; (60 second delay)

Example Payload

The following example will set a 3-second delay timer on the following PLACE order command:

key=your-secret-key; command=PLACE; account=sim101; instrument=ES 06-25; action=BUY; qty=1; order_type=MARKET; TIF=DAY; delay=3;

Multi-Account Placement