investfly.api.InvestflyApiClient

class InvestflyApiClient:

Investfly API Client. This class should be used as the entry point to make all API calls. After authentication, access marketApi or portfolioApi to make calls to /market or /portfolio endpoints

InvestflyApiClient(baseUrl: str = 'https://api.investfly.com', logEnabled: bool = False)
restApiClient
marketApi

Class used to make calls to /marketdata and /symbol endpoint to get market and symbol data

portfolioApi

Class used to make calls to /portfolio endpoint to get portfolio and brokerage account data

strategyApi

Class used to make calls to /strategy endpoint to operate on trading strategies

indicatorApi
def login(self, username, password) -> investfly.models.common.Session:

Login to investfly backend.

Args: username: Username for authentication. password: Password for authentication.

Returns: Session object representing authenticated session.

def logout(self):
def isLoggedIn(self) -> bool:
def getSession(self) -> investfly.models.common.Session:
def enableLogging(self, enable: bool = True):

Enable or disable HTTP request/response logging for this client.

Note: Logging configuration should be done separately by the application using standard Python logging.

Args: enable: Whether to enable logging.

@staticmethod
def parseDatetime(date_str: str) -> datetime.datetime: