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')
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.CommonModels.Session:

Login to investfly backend.

Parameters
  • username: Username
  • password: Password
Returns

Session object representing authenticated session

def logout(self):
def isLoggedIn(self) -> bool:
def getSession(self) -> investfly.models.CommonModels.Session:
@staticmethod
def parseDatetime(date_str: str) -> datetime.datetime: