Goal seek
A simple HTTP API to calculate interest rates and years to save up a target amount.
More details on our Python examples can be found in our GitHub repository.
You will need to download the simple goal seek example from us,
upload it to your GRID account and replace REPLACE_WITH_YOUR_SPREADSHEET_ID
with its workbook id.
See our quick start guide for more details.
Make sure your API key is set in the environment variable GRID_API_TOKEN
, or passed as an argument to the Grid
class.
To start the goal seek server, run the following:
Open the URL below to see how high the interest rate would need to be to reach $150,000:
http://localhost:8000/seek_interests?target_amount=150000
You should get a response like:
To see how many years it would take to save up $200,000:
http://localhost:8000/seek_years?target_amount=200000
You should get a response like: