Margin Calc is a Rust-based application that provides a graphical user interface (GUI) for fetching and displaying margin information for options trading using the Kite Trade API.
- Fetch and display option symbols.
- Retrieve and display margin information for selected option symbols.
- Automatic refresh of symbols every 60 seconds.
- Error handling and display for API requests.
- Rust (latest stable version)
- Cargo (latest stable version)
- Kite Trade API credentials (API key and access token)
-
Clone the repository:
git clone https://github.com/arshkumarsingh/margin-calc cd margin-calc
-
Build the project:
cargo build
-
Run the application:
cargo run
-
Enter your Kite Trade API credentials:
- API Key
- Access Token
-
Refresh symbols and fetch margin information:
- Click "Refresh Symbols" to load available option symbols.
- Select a symbol from the dropdown.
- Click "Get Margin" to fetch and display margin information for the selected symbol.
- src/api.rs: Contains functions for making API requests to the Kite Trade API.
- src/gui.rs: Implements the GUI using
eframe
andegui
for interaction with the user. - src/main.rs: Entry point for the application, setting up and running the GUI.
reqwest
: For making HTTP requests.serde
: For deserializing JSON responses.eframe
andegui
: For building the graphical user interface.tokio
: For asynchronous runtime.
Contributions are welcome! Please fork the repository and submit a pull request for any changes.
This project is licensed under the MIT License.
For any questions or issues, please open an issue on the GitHub repository.