feat: add sell-if-deficit command to Scrypt adapter#3474
Open
TaprootFreak wants to merge 2 commits intodevelopfrom
Open
feat: add sell-if-deficit command to Scrypt adapter#3474TaprootFreak wants to merge 2 commits intodevelopfrom
TaprootFreak wants to merge 2 commits intodevelopfrom
Conversation
Adds conditional selling of EUR for BTC on Scrypt when Bitcoin on-chain
has a deficit. Falls through to existing EUR→USDT sell if no BTC is needed.
DB setup required:
- Create action: system=Scrypt, command=sell-if-deficit,
params={"tradeAsset":"BTC","checkAssetId":113}, onFailId=233
- Update rule 313: set redundancyStartActionId to new action
Creates the Scrypt sell-if-deficit action (EUR→BTC when Bitcoin has a deficit, fallback to EUR→USDT via onFail=233) and updates rule 313 to use it as the redundancy start action.
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
sell-if-deficitcommand to ScryptAdapter that conditionally sells EUR for BTC when Bitcoin on-chain (asset 113) has a balance below its rule's minimumonFailto the existing sell EUR → USDT action (233)DB setup required after merge
Flow
Test plan