You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OKX returns error code 51006 for tiny orders or where the API can't figure out the price for the given token.
This recently created alert noise for orders selling the ICP token.
The change adds OKX error code 51006 ("Input value is too low") to the set mapped to Error::NotFound in handle_api_error. This is the correct classification — okx::Error::NotFound is treated as a benign "no swap available" outcome (crates/solvers/src/infra/dex/mod.rs:104), same as the existing 51005/82000/82104/82112 codes, so it will suppress the alert noise described in the PR rather than surfacing as an API error.
Consistent with existing style (documented inline comment, groups with the other not-found codes). No issues found.
Minor (non-blocking) nit not worth a change: 51006 sits after the 82xxx codes rather than next to its sibling 51005, but the list isn't strictly numerically ordered anyway.
· okx-handle-input-value-too-low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
OKX returns error code
51006for tiny orders or where the API can't figure out the price for the given token.This recently created alert noise for orders selling the ICP token.
Changes
explicitly handle error code
51006