Each level had an increasing level of what you needed to do, with the first level being to buy some stock (which you could do from the UI).
Most levels had you operating some kind of marketing making system, where you had to constantly update passive positions that made money as bots traded against them, and the prices shifted.
The last level required you to "hack" the system to get info you weren't supposed to have, in order to identify the insider trader in the middle of 50 other bots. It was quite different from all the other levels.
Here was the level solving code from my second run through: