etf4u icon indicating copy to clipboard operation
etf4u copied to clipboard

deployable to heroku using fastapi

Open ohjho opened this issue 2 years ago • 0 comments

this closes #2; the API is now accessible at https://etf4u.herokuapp.com/

to query any given etf, simply do https://etf4u.herokuapp.com/query/{etf_ticker}, for example see the request for SPY

the API endpoint is a lite version of your main function. it only handles one ticker at a time; the idea is that the extra logic (e.g. include, exclude, clamp, combining...) can be applied after the API call

had to rewrite requirements.txt using pipreq (sorry don't know how poetry work)

also using a timed version of the lru_cache that comes with functools instead

and finally the API actually ignores the vanguard adapter because I ran into some issues getting seleium to work on Heroku (followed this guide to no avail). might deploy inside a docker container (i.e. like this one if it's a big deal). so to summarize, all the Vanguard ETFs are handled by the etfdb adapter.

ohjho avatar Mar 01 '22 09:03 ohjho