SerendipityOrg / TradeMan

Final resting place of TradeMan!
3 stars 5 forks source link

Sweep: Use the kite documentation to write a function to check available margin for given userlist #17

Open omkarh25 opened 11 months ago

omkarh25 commented 11 months ago

Details

place the new file appropriately in project structure

Checklist - [X] Create `MarketUtils/margin_utils.py` ✓ https://github.com/SerendipityOrg/TradeMan/commit/d1abf2fd9ae6af97f8558b9fcfa63a0c19a4969f [Edit](https://github.com/SerendipityOrg/TradeMan/edit/sweep/check-margin/MarketUtils/margin_utils.py) - [X] Create `MarketUtils/test_margin_utils.py` ✓ https://github.com/SerendipityOrg/TradeMan/commit/f1efe0dd27fb5785ed6b70c86f84c409fb19be5b [Edit](https://github.com/SerendipityOrg/TradeMan/edit/sweep/check-margin/MarketUtils/test_margin_utils.py) ![Flowchart](https://raw.githubusercontent.com/SerendipityOrg/TradeMan/sweep/assets/6d21e4a172d57bd3234cbad36613c2ce8f80d9426b624c1a04dace2dce1f3c53_17_flowchart.svg)
sweep-ai[bot] commented 11 months ago

Here's the PR! https://github.com/SerendipityOrg/TradeMan/pull/18. See Sweep's process at dashboard.

Sweep Basic Tier: I'm using GPT-4. You have 2 GPT-4 tickets left for the month and 0 for the day. (tracking ID: 3c5b3d3e11)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Actions (click)

Sandbox execution failed

The sandbox appears to be unavailable or down.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/SerendipityOrg/TradeMan/blob/5a5119967269ae50238ca7858e733a49aa5dec75/MarketUtils/Holdings/zerodhaholdings.py#L1-L42 https://github.com/SerendipityOrg/TradeMan/blob/5a5119967269ae50238ca7858e733a49aa5dec75/Brokers/Zerodha/kite_utils.py#L41-L92

I also found some related docs:

Summary of related docs from https://kite.trade/docs/pykiteconnect/v4/:

Based on the provided documentation snippets, the user needs to use the Kite Connect API to check the available margin for a given user list. To do this, they need to create a function and place it in the appropriate location within their project structure.

Sources:


Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/check-margin.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord