Sweep: add a margin CLI option that prints the current margin for the trader #3
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.
PR Feedback (click)
Description
This pull request introduces a new feature to the CLI tool, allowing users to retrieve and display the current margin ratio for a specified trader address. This enhancement is aimed at providing traders with a quick and easy way to monitor their margin status directly from the command line.
Summary
Margin
subcommand to the CLI, enabling users to fetch their current margin ratio.MarginCommand
struct insrc/args.rs
to handle the new subcommand's arguments.src/main.rs
to ensure the new subcommand is processed correctly.src/margin.rs
to define the logic for fetching and calculating the margin ratio from the blockchain.This update enhances the tool's capabilities, making it more versatile for users interested in managing their trading positions and financial health more effectively.
Fixes #1.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.