Diagnosing Order-Parameter and Margin Errors in Crypto Backtests
Summary
A trader reports that a crypto derivatives backtest accepts its first order but rejects later buys, sells, and position closes with a generic parameter error. Their investigation identifies an order price that was too small as one cause, then raises questions about how the platform represents starting funds, contract quantities, and available margin after losses.
Further experiments on BitMEX suggest that rejected sell orders and “insufficient funds” messages depend on order size and price, while a smaller contract quantity succeeds. The post does not establish a general explanation for the differing buy and sell outcomes, and it offers no confirmed platform-level fix. Its practical lesson is to check price and quantity units, contract specifications, and margin requirements when debugging backtest order rejections, while recognizing that an opaque error message may not identify the actual cause.
Key ideas
- A generic order-parameter error can conceal an invalidly small order price.
- The author’s tests suggest that contract quantity and price affect whether a derivatives order passes margin checks.
- Starting balance, coin holdings, and contract counts may represent different units in a backtesting platform.
- The post raises unanswered questions about asymmetric buy and sell rejections and does not provide a complete diagnosis.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.