Skip to content

how to access the account from the strategy? #760

Answered by cjdsellers
jandykwan asked this question in Q&A
Discussion options

You must be logged in to vote

The best way is via the Portfolio which acts as a manager of sorts for all of the accounting:

self.portfolio.account(venue)

Or these methods and properties are available:

cdef class PortfolioFacade:

    cdef readonly bint initialized
    """If the portfolio is initialized.\n\n:returns: `bool`"""

    cdef readonly analyzer
    """The portfolios analyzer.\n\n:returns: `PortfolioAnalyzer`"""

    cpdef Account account(self, Venue venue)

    cpdef dict balances_locked(self, Venue venue)
    cpdef dict margins_init(self, Venue venue)
    cpdef dict margins_maint(self, Venue venue)
    cpdef dict unrealized_pnls(self, Venue venue)
    cpdef dict net_exposures(self, Venue venue)

    cpdef Money

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jandykwan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants