Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

[BUG] Find available cash and account value inside strategy. #159

Open
TyrionSnow1911 opened this issue Aug 2, 2020 · 1 comment
Open

Comments

@TyrionSnow1911
Copy link

Been trying for a while now to figure out how to get the cash and account value information from inside the strategy. Been looking through the library code for a while and these functions seem to not exist?

Is there anyway we could get these two features added? Or maybe they already do but it's not obvious?

@SundaresanN
Copy link

You can get account details like AvailableFunds etc., by

class Teststrategy(Algo):
def on_start(self):
account = self.get_account()
print(account.get("AvailableFunds"))

get_account method is not documented, it returns dict key value pairs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants