I am building an app that uses the Oanda API to retrieve historical forex data. There are 28 forex pairs and 10 years worth of historical data. Since none of this data changes I was planning on saving it into my database rather than blowing up the API.

My goal is to initially populate the database for all pairs and then update the data once per minute from then on.

What I can't figure out is how to do this effectively.

Where should the logic for this live inside the Django app?
How can I execute the initial population of the data so that it will save?

It's the saving that is giving me the most problems. As far as I can tell Django only likes to save model instances from the shell.

Any help would be greatly appreciated.