I’m running a Python script that’s sleeps for a while then sends a bunch of queries one after the other, before sleeping and repeating again. This is a new project but the query is one I ripped from another project and it’s been working fine. For some reason I keep getting the following error message on the first query, then the next ones are fine. The only difference between the various queries is the contract address, the code is exactly the same. I pulled the query out and dropped it into the IDE and it worked without issue.
So I checked it again and I had a different error message. This one said something about it taking 35 seconds to complete the query, so I’m thinking I’m accidentally pulling too many transactions. I just need a quick and dirty way of getting the latest price but this particular query is for BNB to USDT. I have a limit option thing set to 1 but does that mean it’s just filtering it to one result after fetching every result ever?
I added time: {after: “2022-03-25T19:18:48.666773”}
to the line after quoteCurrency under dexTrades. I thought that limit: 1 would make it only bring in the last result but I guess it was pulling them all then filtering the output.