CrossTrade Docs
Basic CommandsAdvanced Commands
  • Welcome!
    • Set Up Guide
  • Getting Started
    • Installation
    • User Dashboard
      • XT Control Panel
      • Manual Trader
      • 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
  • Example Payloads
  • Buy or Sell (Market Orders)
  1. Webhooks
  2. Commands

Flat Place Order

PreviousPlace OrderNextClose Position

Last updated 1 month ago

The FLATPLACE order command is virtually identical to using the PLACE order command with the flatten_first flag enabled. The only difference is syntax.

A potential benefit of using PLACE with flatten_first over FLATPLACE is if you want to allowing closing orders to filter through a using the closing_only_after filter. If after the closing only time, the flatten_first is allowed to pass through, whereas FLATPLACE would be blocked outright.

FLATPLACE only closes open positions in the underlying instrument. It will not close any open limit orders. Using a PLACE command with flatten_first will close both open positions and pending orders.

Example Payloads

This example message will trigger a simple market order for BUY or SELL actions that will remain in-force for the rest of the trading day.

Buy or Sell (Market Orders)

Using FLATPLACE Order Command

key=your-secret-key;
command=FLATPLACE;
account=sim101;
instrument=ES 06-25;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;

Using PLACE Order Command

key=your-secret-key;
command=PLACE;
account=sim101;
instrument=ES 06-25;
action=BUY;
qty=1;
order_type=MARKET;
tif=DAY;
flatten_first=true;

We will cease the examples here since all PLACE payloads will be identical to FLATPLACE payloads aside from the command name.

See the and pages for more use cases.

Trading Window
Place Order command
Examples