#
Dry Run Orders
#
Overview
Dry Run Orders provide a read-only mechanism to simulate order placement without affecting market state or account balances. This feature is useful for building user interfaces that need to display expected order outcomes before actual submission.
#
Purpose
Dry run orders allow developers and traders to:
- Preview margin requirements before placing orders
- Validate order parameters without market impact
- Build responsive trading interfaces with real-time feedback
- Test order scenarios without consuming actual resources
#
How to Use Dry Run Orders
#
Endpoint
POST http://control-gateway:8181/AccountAdmin/Order/DryRun
#
Request Format
The dry run endpoint accepts identical parameters to the standard order placement endpoint. Simply send your order request to the dry run endpoint instead of the live trading endpoint.
#
Response Format
{
"marginRequired": 0,
"marginAvailable": 0,
"totalUsedMargin": 0,
"riskUsed": 0,
"riskAvailable": 0,
"rejectReason": "ImmediateMatchPostOnly",
"rejectionType": "InvalidTickSize",
"amendRejectionType": "InvalidTickSize"
}
#
Response Fields
#
Margin Information
#
Risk Information
#
Rejection Information
#
Important Limitations
#
No Market Impact
- Dry run orders never interact with the market
- No executions are generated
- Account state remains completely unchanged
- Orders cannot be canceled (they don't exist after the response)
- Dry run responses do not leak information about hidden orders in the market
- Actual execution results may differ from dry run results if hidden orders are present
- This protects market integrity while providing useful simulation data
#
Contingent Order Behavior
- Contingent and conditional flags are ignored on dry run orders
- Orders are treated as if they would trigger immediately
OneTriggersTheOther
andOneCancelsTheOther
behaviors are not simulated
#
Best Practices
#
Performance Considerations
- Use dry run orders judiciously to avoid unnecessary server load
- Consider debouncing rapid dry run requests in real-time interfaces