I'm using the Python API to access the Solana RPC. My aim is to:
- Enter a token CA
- Enter a time
- Get a list of all the wallets that purchased the token before said time
I have a working script, but it is incredibly inefficient and takes a very very long time to run. I do this by obtaining ALL the signatures involved in a token. I then filter down to the signatures that occurred before the given time. I then have to get_transaction on all the remaining signatures, to then obtain the wallets involved.
The process is insanely slow, because there's hundreds of API calls involved. Am I missing something? Is there a much more efficient way to do this?