Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: add a margin CLI option that prints the current margin for the trader #3

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Apr 3, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

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

  • Added a new Margin subcommand to the CLI, enabling users to fetch their current margin ratio.
  • Implemented the MarginCommand struct in src/args.rs to handle the new subcommand's arguments.
  • Integrated the margin retrieval functionality in src/main.rs to ensure the new subcommand is processed correctly.
  • Created src/margin.rs to define the logic for fetching and calculating the margin ratio from the blockchain.
  • The feature supports an optional trader address parameter; if not provided, it defaults to the address of the wallet configured in the CLI tool.

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:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented Apr 3, 2024

Rollback Files For Sweep

  • Rollback changes to src/margin.rs
  • Rollback changes to src/main.rs
  • Rollback changes to src/args.rs

This is an automated message generated by Sweep AI.

@sweep-ai sweep-ai bot added the sweep Sweep your software chores label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Sweep your software chores
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: add a margin CLI option that prints the current margin for the trader
1 participant