Order Flow
The Automations page (/trading-terminal) uses a trigger-based trading system. Instead of placing orders directly like an exchange UI, you create triggers — reusable trade configurations that can be fired manually, from TradingView alerts, or from any webhook source. (For direct manual trading with a chart and order form, use the Terminal.)
The Big Picture
Create Trigger → Fire Trigger → Execute on Exchange → View Result
- Create a trigger with your trade parameters (symbol, side, size, leverage, TP/SL)
- Fire the trigger — manually from the UI, or automatically via TradingView/webhook
- Crodl executes the order on your exchange via API
- Track the result in the Executed Triggers tab and via Discord/Telegram notifications
This trigger-based approach means you can set up your trades once and reuse them. Connect a trigger to a TradingView alert and your strategy executes automatically — no manual intervention needed.
Page Layout
The Automations page has two tabs per exchange:
Open Triggers Tab
Create and manage triggers that open new positions. This is where you define your entries.
Close Triggers Tab
Create and manage triggers that close existing positions. This is where you define your exits.
Below the tabs, a trading data section has five tabs:
- Active Positions — live WebSocket feed of your open positions
- Open Orders — live WebSocket feed of your pending limit and TP/SL orders
- Executed Triggers — history of trigger executions with status
- Order History — individual fills and trades from the exchange
- Allocation IDs — allocation buckets with opened/remaining size per
allocation_id
There is no chart on the Automations page. Charting lives in the Terminal (/main), which runs Crodl's own chart engine.
Creating an Open Trigger
The open trigger form walks you through every parameter:
1. Basic Configuration
| Field | Description |
|---|---|
| Side | Long or Short |
| Trigger Name | A label to identify this trigger (e.g., "BTC Long Breakout") |
| API Key | Which exchange connection to use |
| Symbol | Searchable dropdown of all available trading pairs |
| Order Type | Market, Limit, Post Only, FOK, or IOC |
| Strategy Journal | Optional reporting-only chooser for strategy_dashboard_id. Use it to run without journaling, create a new journal ID, or reuse an existing journal on the same key. |
The trigger form presents strategy journaling as a dedicated chooser instead of a raw text field. If you create or reuse an ID there, Crodl writes that value into strategy_dashboard_id.
2. Position Settings
| Field | Description |
|---|---|
| Margin Mode | Isolated or Cross |
| Leverage | Your desired multiplier — the form shows and enforces the selected pair's maximum |
| Position Mode | One-Way (netting) or Hedge |
3. Quantity
| Field | Description |
|---|---|
| Quantity Type | How to measure size — USD (Margin), USD (Position), Percentage, or Asset |
| Quantity Amount | The value (e.g., 50 USD, 10%, or 0.5 BTC) |
Quantity types explained:
- Amount (USD - Margin) — Dollar amount of margin to allocate. With 10x leverage and $50 margin, your position size is $500
- Amount (USD - Position) — Dollar value of the total position
- Percentage — Percentage of your available balance
- Asset — Exact amount in the base currency (e.g., 0.01 BTC)
4. Limit Price (non-market orders only)
For Limit, Post Only, FOK, and IOC orders:
| Field | Description |
|---|---|
| Price Mode | Absolute price or percentage from last price |
| Price Value | The price or percentage value |
5. Take-Profit / Stop-Loss (optional)
Each can be independently enabled or disabled:
| Field | Description |
|---|---|
| Execution Type | Market or Limit |
| Mode | Absolute price or percentage from entry |
| Trigger Price | Price that activates the TP/SL |
| Order Price | Execution price (Limit type only) |
If you set an Allocation ID on an open trigger, attached TP/SL is still shared at the position level. In other words, you can keep one TP/SL on the position, but it is not isolated per allocation.
6. Advanced Policies
| Field | Description |
|---|---|
| Opposite Side Close | Auto-close opposite position before opening |
| Cancel Unfilled | Cancel pending orders on this symbol first |
| Pyramiding | Allow or block stacking multiple positions |
| Allocation ID | Optional strategy bucket ID if you want this trigger to track and close independently from other strategies on the same symbol/side (market orders only) |
Then click Create Open Trigger.
Trade guardrails (max_notional_usd and guard_action) are webhook payload fields, not form fields. Add them to the trigger JSON you paste into TradingView (or any webhook sender) to cap position notional. See Triggers → Optional Trade Guardrails.
Creating a Close Trigger
Close triggers are simpler — no leverage, margin mode, or position settings needed:
| Field | Description |
|---|---|
| Trigger Name | Label for this trigger |
| API Key | Which exchange connection to use |
| Symbol | Trading pair to close |
| Side | Close Long or Close Short |
| Order Type | Market, Limit, Post Only, FOK, IOC |
| Quantity Type | How much to close (percentage is most common) |
| Quantity Amount | e.g., 100 for full close, 50 for half |
| Cancel Unfilled | Cancel pending orders before closing |
| Allocation ID | Optional strategy bucket to close a specific allocation instead of the full net position (market orders only) |
| Strategy Journal | Optional strategy_dashboard_id to group this close with the matching journal |
Use percentage-based close triggers for flexibility. A "Close 50%" trigger works regardless of your position size, letting you scale out in stages.
If a close trigger includes an Allocation ID, percentage-based closes are calculated from that allocation's remaining size, not the whole exchange position.
If an open or close includes strategy_dashboard_id, Crodl auto-creates or updates the matching journal for that exchange and API key. You do not need to manually start a session first.
Firing a Trigger
Once created, triggers can be fired in four ways:
Manual Execution
Click the play button on any trigger row. A confirmation dialog summarizes the trade (symbol, side, order type, leverage) — confirming executes a live trade on the exchange immediately.
TradingView Alerts
- Copy the trigger's JSON config (click the copy icon on the trigger row)
- Create a TradingView alert with your entry condition
- Set the webhook URL to
https://api.crodl.com/webhooks/trading - Paste the JSON into the alert message
- When the alert fires, your trigger executes automatically
External Webhooks
Any system that can send an HTTP POST with JSON can fire your triggers. See the Triggers page for the full webhook API reference.
MCP Clients
Claude, Codex, and other MCP clients can queue the same open and close payloads through MCP Access. MCP uses scoped bearer keys and injects the webhook security_token server-side for direct trade tools. When you need to copy a saved trigger into TradingView, use the single-trigger payload tool with explicit token reveal.
What "Queued" Means
Firing a trigger is fire-and-forget: Crodl validates the payload, queues the execution, and immediately returns 202 Accepted. The trade itself runs in the background — the UI shows "Trigger queued" rather than a fill confirmation.
Execution results arrive through:
- The Executed Triggers tab (status, error detail, timing)
- Discord/Telegram notifications, if you have connected them in Settings
- The Active Positions / Open Orders panels updating over WebSocket as the exchange confirms
Managing Triggers
From the trigger list, each row has action buttons:
| Action | Icon | Description |
|---|---|---|
| Copy JSON | Clipboard | Open the full trigger config (including your security_token) to copy for webhooks |
| Copy Webhook URL | Link | Copy the webhook endpoint URL |
| Run | Play | Fire the trigger manually (with confirmation) |
| Edit | Pencil | Open the trigger in edit mode |
| Delete | Trash | Remove the trigger (with confirmation) |
Click the expand chevron on any row to view the full configuration.
Closing a Position from the UI
You don't need a pre-made close trigger to exit a position. From the Active Positions panel:
- Find the position you want to close
- Click the Close button
- A confirmation dialog shows the position details (symbol, side, leverage, quantity, average entry price) and a percentage selector — 100% by default, or choose a partial amount
- Click Yes, Close (or Close N% for a partial close)
- Crodl submits a market close for the chosen percentage and the panel updates as the exchange confirms
There is also a Flash Close action for an immediate 100% market close, and a Reverse action that closes the position and opens the same size on the opposite side at market.
Partial closes are percentage-based — the backend resolves the actual size against your live position at execution time.
Execution Pipeline
When a trigger fires (manually, via TradingView, or webhook), Crodl processes it in this order:
1. Validate payload
2. Authenticate via security token
3. Return 202 Accepted (async execution)
4. Cancel unfilled orders (if configured)
5. Close opposite position (if opposite_side_close enabled)
6. Check pyramiding rules
7. Apply optional open-trade guardrails
8. Place order on exchange
9. Record execution result
The entire pipeline runs asynchronously — you get an immediate 202 Accepted response, and the execution happens in the background via a job queue.
When opposite_side_close is enabled alongside cancel_unfilled, the cancel step may execute twice — once before the opposite-side close and once before placing the new order.
Tracking Executions
Every trigger fire is tracked in the Executed Triggers tab, filterable by kind (open/close) and status:
| Column | Description |
|---|---|
| Time | When the execution was created |
| Kind | Open or Close |
| Symbol | Trading pair |
| Side | Long, Short, Close Long, Close Short |
| Type | Order type |
| Qty / Price | Requested quantity and price |
| Status | Success, Failed, Partial, Accepted, Canceled |
| Queue / Exec / Total | Timing breakdown: queue time + execution time = total |
| Details | Expand for the full execution detail, including error messages |
Execution Statuses
| Status | Meaning |
|---|---|
| Success | Order placed and filled on the exchange |
| Failed | Execution failed (see error detail for reason) |
| Partial | Order partially filled |
| Accepted | Order accepted by exchange, pending fill |
| Canceled | Execution was cancelled |
Order History
The Order History tab shows individual fills from your exchange:
- Time, instrument, side, and position side (Long/Short)
- Fill price and size
- Fill PnL and fees
- Expandable details per fill
This data comes directly from the exchange API and shows every fill, including partial fills on limit orders.
Live Positions & Orders
The Active Positions and Open Orders panels connect to your exchange via a shared WebSocket for real-time updates:
- Position and order data updates automatically (no manual refresh needed)
- A single WebSocket connection per exchange delivers both positions and open orders
- Connection status shown: Live, Connecting, Reconnecting, Error, Paused, Idle
- Last updated timestamp displayed
- Each position shows: contracts, size, average price, margin, PnL, estimated liquidation price, mark price, TP/SL, and margin ratio
- Open orders (including TP/SL) update within seconds of any change on the exchange
Dashboard Views
The main dashboard has two modes:
- Default keeps the current exchange dashboard exactly as before
- Strategy switches to the journaling and reporting view at
/dashboard?view=strategy
The strategy view is designed for grouping trades by strategy_dashboard_id while leaving execution behavior unchanged. It is journal-first:
- Pick the exchange
- Pick the API key
- Pick the exact
strategy_dashboard_id - Review the journal header, current state, recent trades, and activity feed
Journals are created automatically from triggers and webhook payloads that include strategy_dashboard_id. Once a journal exists, you can review and manage it from the dashboard without changing how the underlying trigger executes.