Vectorize EVERYTHING

Thus far all the Moralis “convenience functions” seem to run in scalar mode. You can have the price for any token you like at any block you like. One…data…point…per…call.

If you want to see any dynamics at all you wind up creating legions of API calls in a map or for loop. And it’s HORRIFYINGLY inefficient, slow, and unreliable to have the internet in every step of the loop.

[Every function that takes a network,
Every function that takes an address,
Every function that takes a to_block,
] NEEDS TO OPTIONALLY TAKE AN ARRAY.

And yes that opens up a data size issue. So…I dunno… Limit each API call to 1000 or even 100 responses? I.e. require {(network.length * address.length * to_block) <= 100.}

We can work with that. It’d still be 100x faster and more reliable than what we have now. And it doesn’t seem like that hard a change to make.

Do the loops on the server side, not across the entire internet.

Then we can create proper historical charts and algorithms.

We’re going to bludgeon the Moralis servers with wave after wave of legions of tiny little API calls anyway until you make it happen. #DeathBy1000APICalls