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

v1.7.24: Add function to reclaim funds #334

Merged

Conversation

jaredvu
Copy link
Contributor

@jaredvu jaredvu commented May 1, 2024

  • Function looks to loop through existing subaccounts to find funds w/o positions/orders. It then initiates a transfer back to the parent subaccount.
  • Fix Subaccount initialization to provide correct subaccountNumber

@jaredvu jaredvu requested a review from johnqh May 1, 2024 22:10
Copy link

linear bot commented May 1, 2024

@prashanDYDX
Copy link
Contributor

Tests?

helper.ioImplementations.threading?.async(ThreadingType.main) {
this.reclaimUnutilizedFundsTimer = helper.ioImplementations.timer?.schedule(
(10.seconds).inWholeSeconds.toDouble(),
null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use this repeat duration instead of recursively calling this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current recursive implementation waits for a successful callback reponse for each transfer and goes through the entire list of childSubaccounts then creates a fresh 10 sec timer before repeating. I don't think I can achieve the same effect with repeat.

@jaredvu jaredvu changed the title v1.6.55: Add function to reclaim funds v1.7.23: Add function to reclaim funds May 17, 2024
@jaredvu jaredvu changed the title v1.7.23: Add function to reclaim funds v1.7.24: Add function to reclaim funds May 17, 2024
@jaredvu jaredvu merged commit efd94c7 into main May 20, 2024
3 checks passed
@jaredvu jaredvu deleted the jared/tra-238-add-function-to-reclaim-unutilized-funds-from branch May 20, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants