mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
exchange_wrapper_standards: Add order execution limit errors to acceptableErrors list (#2096)
* Initial plan * Add order execution limit errors to acceptableErrors list Add all order execution limit validation errors from the limits package to the acceptableErrors list. This fixes intermittent test failures when exchanges have different minimum/maximum limits for price and amount that don't match the hardcoded test values. The test uses hardcoded values (150) for price and amount, but exchanges like Binance have varying limits (e.g., BTCUSDPERP has a minimum price of 1000). By treating these limit validation errors as acceptable, the test properly validates that exchanges correctly enforce their limits without causing false test failures. Fixes the CheckOrderExecutionLimits failure for Binance coinmarginedfutures BTCUSDPERP where the hardcoded price of 150 is below the minimum limit of 1000. Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com> * Remove self-explanatory comments from limit errors Remove comments that don't add information beyond the error names for the newly added order execution limit errors, as requested in code review feedback. Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com>
This commit is contained in:
@@ -645,6 +645,16 @@ var acceptableErrors = []error{
|
||||
limits.ErrExchangeLimitNotLoaded, // Is thrown when the limits aren't loaded for a particular exchange, asset, pair
|
||||
limits.ErrOrderLimitNotFound, // Is thrown when the order limit isn't found for a particular exchange, asset, pair
|
||||
limits.ErrEmptyLevels, // Is thrown if limits are not provided for the asset
|
||||
limits.ErrPriceBelowMin,
|
||||
limits.ErrPriceExceedsMax,
|
||||
limits.ErrPriceExceedsStep,
|
||||
limits.ErrAmountBelowMin,
|
||||
limits.ErrAmountExceedsMax,
|
||||
limits.ErrAmountExceedsStep,
|
||||
limits.ErrNotionalValue,
|
||||
limits.ErrMarketAmountBelowMin,
|
||||
limits.ErrMarketAmountExceedsMax,
|
||||
limits.ErrMarketAmountExceedsStep,
|
||||
accounts.ErrNoBalances,
|
||||
accounts.ErrNoSubAccounts,
|
||||
ticker.ErrTickerNotFound,
|
||||
|
||||
Reference in New Issue
Block a user