Freetrade

Latest version: v0.0.6

Safety actively analyzes 641872 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

5838.0

5822.0

5766.0

5716.0

5700.0

0.0.6

Separated the class structure
* `Index` - no authentication is needed, deals with showing details of supported assets
* `API` - authentication is necessary, deals with getting ticker history from API, getting address from postcode, validating bank, onboarding a new user account.
* `DataStore` - authentication is necessary, deals with saving, updating and loading price histories of stocks

`Index`
If you want to get information about the supported list of stock tickers, it is not necessary to log in anymore.

See example:
python
from freetrade import FreeTrade

ft = FreeTrade()
assets = ft.index.get_assets()


`API`
However, other classes such as `API` and `DataStore` require authentication.

Below is an example:
python
from freetrade import FreeTrade

email = '...'
ft = FreeTrade(email)

postcode = 'E15JL'
address = ft.api.get_address_by_postcode(postcode)

prices = ft.api.get_ticker_history('TSLA', 'XNAS')

for history_date, price in prices.items():
print(f'{history_date}: ${price:.2f}')

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.